Spawned java app hangs until first is killed

I am spawning a new process using
<code>
Process proc = Runtime.getRuntime().exec(commandLine, // command line
                         null, // environment
                         new java.io.File(strExeDir)); // run directory
</code>
The new process is a 2nd JVM called with the following command line:
<code>
C:\jdk1.4.2_03\jre\\bin\javaw.exe -jar "my.jar"
</code>
"my.jar" contains a manifest.mf with a Main-Class and Class-Path entries. my.jar can be executed with no problems by running that command outside of my application.
The process is spawned without an Exception being thrown. The spawned process outputs some of my initial logging statements, but then hangs until the first app is killed, no matter how long I wait.
can anyone tell me why?
Thanks in advance,
Mike

Originally, my app was launching, logging a few lines
of code, and hanging.
Since I made the change to cmd /c start, it is now
executing properly. The second app appears when it
should and functions properly without hanging. (An
oddity is, I never see a console window with cmd /c or
cmd /k. )That's probably because you are using javaw.exe, not java.exe. Citing the documentation, "The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear." If your app has a problem, you would apparently benefit if it had a chance to display something about itself - so try to use 'java' instead of javaw.
In the original way, I was spawning a new process and
executing javaw.exe directly. Now I am spawning a new
process to execute cmd.exe to indirectly run javaw.
I am working on an ant script to pull all the class
files from the dependenices into my jar. This way I
can eliminate the class-path parameter from the
manifest.mf. Apparently, this application has runI think to have a class path (which changes from machine to machine) in the JAR file manifest (which is not supposed to change) is a bad idea. Why don't you just launch your second JVM with the "-classpath" parameter?
successfully in the past, and it was using this
technique. I don't really like the idea of putting
other peoples' class files in my own jar, so when they
asked me to make some mods, I decided to separate
them. I created a lib subdirectory and dumped all the
jars in it, referencing them by relative paths, i.e.,
lib/log4j.jar, in the manifest. However, this has led
me to the current problem.
Does this clarify what I'm doing?
The question remains, when I execute javaw.exe in my
execute(), why would it wait for app #1 to exit before
continuing with app #2?As I said, try java instead of javaw to see if it reports anything. Also, you may try to give not a single string to your Runtime.exec() method, but an array of Strings, each containing and individual "word" from your command string. For me at least the latter method always worked.

Similar Messages

  • Java apps hang when trying to open file dialog

    I have several Java applications installed on my Windows Vista machine
    All work perfectly except when accessing any file dialogs.
    If a file dialog is required, the application just hangs
    The only way to resolve this is to open task manager and kill the javaw.exe process
    Does anyone know what is wrong.
    I am using Java 6 update 17 and have tried re-installing the environment.

    ATyas wrote:
    I don't think the problem lies with the vendor apps.
    All Java applications from whatever source exibit this problem. These are independently developed applications from independent vendors.
    I don't have a Java application on my machine that does not exhibit this issue.
    I thought that the problem must be permisions, but am not sure where to look.One or more of the following could be the source of the problem.
    - The apps
    - Your computer
    - The VM
    The first can in fact be the problem because you are not running all possible apps on your computer. Far as you know all the apps that you run use the same library.
    No one here has access to your computer so no one will be able to fix it. No one here has access to those apps so we can fix those either.
    If and only if the vendor of the apps determined that there is a bug in the VM then they could localize it and report it. Without localization and assurance that it is the VM no one can fix it.
    Keep in mind as well that Vista has been out for years. So it seems likely that a general problem with the VM like that would have been discovered by now. Doesn't mean it doesn't exist, but again the vendor of the apps is more likely to discover it.
    For yourself trying running the apps in super user mode (whatever it is called.) If it is a permissions problem then that demonstrates it. Note that if it is permission problem then it most assuredly is one that the vendors must deal with. Just as any other app on Vista must do.

  • App hangs on tab click if connection in use

    If tab one is using connection1 and running a script and i click on tab2 which is also connected using connection1, the app hangs until tab1 finishes the script it was running and connection1 is again free.
    Shouldnt each tab really open a new connection with the same parameters as the connection from the connections list? If not then it should at least not let you select any tabs using connection1 while connection1 is busy so that you can continue working on tabs with other connections.
    I am using 1.5.0.53 on windowsxp.
    Thanks

    By default, all worksheets use the same single threaded connection. To get a worksheet with an unshared connection, use ctrl-shift-N

  • Hi, my java app seems "stopping there"

    hi
    yes, my java app stop there itself
    it has run for 2 days
    but now, it doesn't work
    on windows task manager, i can see java.exe's info
    thread counts - above 100
    cpu - 0
    head - 50,152
    and all the number not change for 1 day, and seems not change for erver
    what happened?

    yes, sorry for my poor description
    the java app worked normally first two days,
    and it should work 7*24,can't be interrupped,
    now it doesn't work without any error information
    i only can see that ,all of "java.exe" 's information on the windows task manager don't change any more, seems it dead
    if something error, then on the windows task manager would see the head grow up, or threads grow up,or CPU grow up, but now ,they don't change

  • Kill opened IE, when killing Swing Java App

    I am creating menu items which fire off an IE window to a URL. However, when app is closed the Java process that runs the app blocks waiting for the executed browser to terminate before its shuts itself down. This has potential repercussions as the Java VM hangs around in the mean time, holding resources. Can anyone point me in the direction of how to kill the opened IE window when I kill the java app? I would greatly appreciate any help. :-)
    This is the code in question:
    userManualMenuItem.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
         try
         String url = System.getProperty("EASEUserManualURL");
         Runtime r = Runtime.getRuntime();
         Process p = r.exec("iexplore " + url);
         catch(Exception exception)
              Logger.getLogger().logError("Error opening Intenet Explorer to show EASE user manual.\nCause: " + exception.getMessage());
         });

    Wouldn't it solve the problem if you made the exec() call on a daemon
    thread? I wouldn't advise making exec() calls on the EDT in any case. 1 - You can't call exec() on a Daemon thread. You can call Runtime.exec() inside of a spawned thread that has been marked as a Daemon. This would be preferably rather than launching off of the EventDispatcherThread as itchystratchy stated because....
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    I'm sure there's a way you can just launch the user's default browser isn't there?2. - I use http://browserlaunch2.sourceforge.net/ in my current app, it launches whatever application you have associated for that file type to view that file. Also supposedly cross platform. You will not get Process reference to the launched app though. I've tested successfully on Win 2000 and XP up to now but it will allow you to close your Java application and leave any launched browsers open if that is what you are looking for or as you asked for earlier keep a collection of launched Process references and destory them when your user is closing your app.

  • Killing apps off the first iPad? is it possible?

    I have the first iPad. Is there a way to kill apps running from the first iPad? or am I S.O.L.?

    Tap the home button once. Then tap the home button twice and the recents tray will appear at the bottom of the screen. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button twice.
    Whether the apps are actually running or not - that is how you can close apps on the iPad running iOS 5.

  • Help with first java app!

    Hello all. I'm very new to java, and I'm trying to create my first GUI app. The idea behind this app is for the user to enter number of hours worked and the rate of pay, and then it will mutliply them together and give you the result.
    I have my main class which sets up the frame then calls my panel class
    Inside my panel class I have two panels, one for the twi input textfields (hours and rate of pay) and one panel for the button and the result text field.
    I cannot figure out how to do get the value of both text fields and mutliply them together when the botton is clicked. Here's my code:
    import javax.swing.*;
    public class FirstProject
         public static void main (String[] args)
              //Sets up the frame
              JFrame frame = new JFrame ("My first Java app");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(300, 200); frame.setVisible(true);
              //Foreground panel class
              foreground fg = new foreground();
              //Add stuff
              frame.getContentPane().add(fg);
              frame.setVisible(true);
              frame.pack();
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.xml.bind.Marshaller.Listener;
    public class foreground extends JPanel implements ActionListener
         public foreground()
              //Setup the layout
              setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
              //Setup input panel
              JPanel input = new JPanel();
              input.setBackground(Color.white);
              input.setBorder(BorderFactory.createLineBorder(Color.black, 1));
              //Setup output panel
              JPanel output = new JPanel();
              output.setBackground(Color.white);
              output.setBorder(BorderFactory.createLineBorder(Color.black, 1));
              //Add main media
              add(input);
              add(output);
              //--**INPUT BOX**--\\
              //Setup the hours label
              JLabel hour = new JLabel("Number of hours worked: ");
              //Setup the rate of pay label
              JLabel pay = new JLabel("Enter your rate of pay: ");
              //Setup the rate of pay text field
              TextField paytext = new TextField("20", 3);
              //Setup the hour text field
              TextField hrtext = new TextField("40", 0);
              //Add objects for input
              input.add(hour);
              input.add(hrtext);
              input.add(pay);
              input.add(paytext);
              //--**OUTPUT BOX**--\\          
              //Set up objects in output panel
              JButton calculate = new JButton("Calculate!");
              calculate.addActionListener(this);
              calculate.setActionCommand("Calculate");
              //Add calculate text field
              TextField calculatetext = new TextField(2);
              //Add objects for output
              output.add(calculate);
              output.add(calculatetext);
    }Thanks in advance!!
    P.S. I'm using eclispe btw.

    Your problem is related to your ActionListener.
    public class foreground extends JPanel implements ActionListener
    calculate.addActionListener(this);You have it set up so the Foreground panel is listening to the calculate button's clicks, but it's not doing anything with the clicks.
    I would strongly suggest dropping the "implements ActionListener" bit and implementing a separate ActionListener, like so:
      JButton calculate = new JButton("Calculate!");
      ActionListener buttonListener = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          // do whatever you want with the
          // paytext.getText ...
          // hrtext.getText ...
      calculate.addActionListener(buttonListener);
      // and you don't need this:  calculate.setActionCommand("Calculate");rh

  • Java Swing App hangs on socket loop

    H}ello everyone i've run into a bit of a snag with my application, its a simple chat bot right now but will evolve into a chat client soon. I can't do that however since my app hangs when i look through the readLine() function to receive data and i dont know how to fix this error. The code is below.
    The doSocket() function is where the while loop is if anyone can help me with this i'd be very greatful.
    * GuiFrame.java
    * Created on August 13, 2008, 9:36 PM
    import java.net.*;
    import java.io.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    * @author  brian
    public class GuiFrame extends javax.swing.JFrame {
        /** Creates new form GuiFrame */
        public GuiFrame() {
            initComponents();
        Socket client_sock = null;
        PrintWriter out = null;
        BufferedReader in = null;
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            convertButton = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Test Bot");
            convertButton.setText("Connect");
            convertButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    convertButtonActionPerformed(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(41, 41, 41)
                    .addComponent(convertButton)
                    .addContainerGap(42, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addComponent(convertButton)
                    .addContainerGap(26, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
    private void convertButtonActionPerformed(java.awt.event.ActionEvent evt) {                                             
        if (convertButton.getText()=="Connect") {
                    String old;
                    try {
                        client_sock = new Socket("www.spinchat.com", 3001);
                        out = new PrintWriter(client_sock.getOutputStream(), true);
                        in = new BufferedReader(new InputStreamReader(client_sock.getInputStream()));
                    } catch (UnknownHostException e) {
                    } catch (IOException e) {
                try {
                    doSocket();
                } catch (IOException ex) {
                    Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
        } else if (convertButton.getText()=="Disconnect") {
            out.println("e");
            out.close();
            try {
                client_sock.close();
                in.close();
            } catch (IOException ex) {
                Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
    private void doSocket() throws IOException {
        BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
        String userInput;
        String old;
            while ((userInput = stdIn.readLine()) != null) {
                old = userInput;
                if (userInput != old) {
                    String proto = userInput.substring(0, 0);
                    if (proto == ":") {
                        out.println("{2");
                        out.println("BI'm a bot.");
                        out.println("aNICKHERE");
                        out.println("bPASSHERE");
                    } else if (proto == "a") {
                        convertButton.setText("Disconnect");
                        out.println("JoinCHannel");
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new GuiFrame().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JButton convertButton;
        // End of variables declaration                  
    }Edited by: briansykes on Aug 13, 2008 9:55 PM
    Edited by: briansykes on Aug 13, 2008 9:56 PM

    >
    ..i've run into a bit of a snag with my application, its a simple chat bot right now but will evolve into a chat client soon. >Is this intended as a GUId app? If so, I would stick to using a GUI for input, rather than reading from the command line (which when I run it, is the DOS window that jumps up in the BG - quite counterintuitive). On the other hand, if it is intended as a non-GUId or headless app., it might be better to avoid any use of JComponents at all.
    My edits stick to using a GUI.
    Other notes:
    - String comparison should be done as
    s1.equals(s2)..rather than..
    s1 == s2- Never [swallow exceptions|http://pscode.org/javafaq.html#stacktrace] in code that does not work.
    - Some basic debugging skills are well called for here, to find where the program is getting stuck. When in doubt, print out!
    - What made you think that
    a) a test of equality on a member against which you had just set the value to the comparator, would logically lead to 'false'?
    old = userInput;
    if (userInput != old) ..b) A substring from indices '0 thru 0' would provide 1 character?
    String proto = userInput.substring(0, 0);
    if (proto == ":") ..
    >
    ..if anyone can help me with this i'd be very greatful.>Gratitude is often best expressed through the offering of [Duke Stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview].
    * GuiFrame.java
    * Created on August 13, 2008, 9:36 PM
    import java.net.*;
    import java.io.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    * @author  brian
    public class GuiFrame extends JFrame {
        /** Creates new form GuiFrame */
        public GuiFrame() {
            initComponents();
        Socket client_sock = null;
        PrintWriter out = null;
        BufferedReader in = null;
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            convertButton = new JButton();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setTitle("Test Bot");
            convertButton.setText("Connect");
            convertButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    convertButtonActionPerformed(evt);
            GroupLayout layout = new GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(41, 41, 41)
                    .addComponent(convertButton)
                    .addContainerGap(42, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addComponent(convertButton)
                    .addContainerGap(26, Short.MAX_VALUE))
            pack();
            setLocationByPlatform(true);
        }// </editor-fold>
    private void convertButtonActionPerformed(java.awt.event.ActionEvent evt) {
        if (convertButton.getText()=="Connect") {
                    String old;
                    try {
                        System.out.println( "Connect start.." );
                        client_sock = new Socket("www.spinchat.com", 3001);
                        out = new PrintWriter(client_sock.getOutputStream(), true);
                        in = new BufferedReader(new InputStreamReader(client_sock.getInputStream()));
                        System.out.println( "Connect end.." );
                    } catch (UnknownHostException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        e.printStackTrace();
                try {
                    doSocket();
                } catch (IOException ex) {
                    Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
        } else if (convertButton.getText()=="Disconnect") {
            out.println("e");
            out.close();
            try {
                client_sock.close();
                in.close();
            } catch (IOException ex) {
                Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
        private void doSocket() throws IOException {
            System.out.println( "doSocket start.." );
            String userInput;
            String old;
            userInput = JOptionPane.showInputDialog(this, "Send..");
            while(userInput!=null && userInput.trim().length()>0) {
                System.out.println( "doSocket loop 1.." );
                String proto = userInput.substring(0, 1);
                System.out.println("proto: '" + proto + "'");
                if (proto.equals(":")) {
                    System.out.println("Sending data..");
                    out.println("{2");
                    out.println("BI'm a bot.");
                    out.println("aNICKHERE");
                    out.println("bPASSHERE");
                } else if (proto.equals("a")) {
                    convertButton.setText("Disconnect");
                    out.println("JoinCHannel");
                userInput = JOptionPane.showInputDialog(this, "Send..");
            System.out.println( "doSocket end.." );
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new GuiFrame().setVisible(true);
        // Variables declaration - do not modify
        private JButton convertButton;
        // End of variables declaration
    }

  • Have Photoshop 7.0.1 - recently quit saving as or saving photos after changes. Just hangs until i kill process with task manager. Have uninstalled and reinstalled. Any suggestions? I don't want to upgrade to CC as I hate subscription services and often ha

    Just hangs until i kill process with task manager. Have uninstalled and reinstalled. Any suggestions? I don't want to upgrade to CC as I hate subscription services and often have internet connection services interuppted.

    Which operating system are you using?
    Resetting the photoshop preferences might cure the problem.
    Press and hold down the Shift+Ctrl+Alt keys down just after starting the launch of photoshop 7
    (Shift-Command-Option on a mac)
    Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop settings file
    Press Yes

  • Killing Java app from C

    Ive seen this question posted before, but never found a good answer. I am invoking a JVM from a legacy C app (via JNI_CreateJavaVM) and I want to be able to end the JVM and have the C app continue. The problem is that a call to System.exit() from inside the java app causes the entire native process (not just the JVM) to be killed. A call to DestroyJavaVM() does not unload the
    JVM (as it claims it does in the API documentation).
    Currently, the Java code calls dispose and System.gc (for good measure) on exiting, although this doesnt completely kill the java app. If the user wishes to invoke another Java app, the C code uses JNI_GetCreatedVMs to see if one already exists, and if so uses AttachThread (or GetEnv) to hook to the existing JVM to run the new Java app. The problem with this is with complicated GUI apps, the machine soon hits a wall, I guess because of un-gc'd stuff laying around.
    Is there a way to kill the app from java without using System.exit or is there a way to unload the JVM from the C app?

    Unfortunately I am running into the same issues using JDK1.4 on Win32. Basically the call to jvm->DestroyJavaVM() is NEVER returning. This seems to mainly be a problem when you use classes which require a native class loader to load native libraries. EX: classes which use System.loadLibrary("some native library"). Has anyone found a workaround to allow us to stop the jvm from the native side when these are present?
    Also if anyone in interested - this is the exact c++ code I am currently using:
        if(vm != NULL) {
             * Detach the current thread from the vm so that it appears to have
             * exited when the process has detatched from the dll.
            if (vm->DetachCurrentThread() != 0) {
                MessageBox(NULL,"Could not detatch the Java Virtual Machine","DEBUG Info",MB_OK+MB_ICONEXCLAMATION);
            MessageBox(NULL,"Try to destroy the VM","DEBUG Info",MB_OK+MB_ICONEXCLAMATION);
            vm->DestroyJavaVM();
            vm = NULL;
        MessageBox(NULL,"JVM destroyed successfully","DEBUG Info",MB_OK+MB_ICONEXCLAMATION);Basically all the calls succeed except the vm->DestroyJavaVM(); including the call to detatch the current thread from the VM! Am I missing something obvious? Is this a known bug? Anyone know any workarounds? Aany and all constructive comments are welcome.

  • Multiple Java apps running in one VM

    I have one VM that runs one application with GUI, database. It also spawns another VM to run more apps through Sockets.
    Is there a way to run several Java apps within a single VM? If so, I can get rid of those interprocess communication stuff and make things easier.
    Thanks in advance.
    Lee

    Yes you can do what to want to do. It is actually very benificail. Take a look at this article:
    http://java.sun.com/docs/books/performance/1st_edition/html/JPClassLoading.fm.html#24732
    here is code to do it as well:
    package com.ist.system;
    import com.ist.util.LogMsg;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.lang.reflect.Method;
    import java.net.InetAddress;
    import java.net.Socket;
    * This class was pulled from:
    * http://java.sun.com/docs/books/performance/1st_edition/html/JPClassLoading.fm.html#24732
    * It was written to provide the ability to launch many applications in the
    * same JVM.  By doing this, it will save on system resources like RAM.  When
    * the <code>launch</code> method is called, it will check to see if there is a
    * VM already running.  If there is, it will launch the new application in the
    * currently running VM.  If there isn't, it will create a process that will
    * keep a VM alive until there are no more applications running.  Once there are
    * no more applications running, this service will System.exit. 
    public class Launcher {
        static final int socketPort = 9876;
         * This method will launch a new instance of the passed in className
         * in an already running JVM if one is already running.  If one is not
         * running, this application will create one.
         * @param className the class which you wish to launch
        public void launch(String className) {
            LogMsg.shortDebug("Trying to launch: " + className);
            Socket s = findService();
            if (s != null) {
                LogMsg.shortDebug("Launcher found service");
                try {
                    OutputStream oStream = s.getOutputStream();
                    byte[] bytes = className.getBytes();
                    oStream.write(bytes.length);
                    oStream.write(bytes);
                    oStream.close();
                    LogMsg.shortDebug(className);
                } catch (IOException e) {
                    LogMsg.warn("Launcher couldn't talk to service");
            } else {
                LogMsg.event("Starting new service");
                Launcher.go(className);
                Thread listener = new ListenerThread();
                listener.start();
                LogMsg.shortDebug("Started service listener");
        protected Socket findService() {
            try {
                Socket s = new Socket(InetAddress.getLocalHost(),
                socketPort);
                return s;
            } catch (IOException e) {
                // couldn't find a service provider
                return null;
        public static synchronized void go(final String className) {
            LogMsg.shortDebug("Launcher running a " + className);
            Thread thread = new Thread() {
                public void run() {
                    try {
                        Class clazz = Class.forName(className);
                        Class[] argsTypes = {String[].class};
                        Object[] args = {new String[0]};
                        Method method = clazz.getMethod("main", argsTypes);
                        method.invoke(clazz, args);
                    } catch (Exception e) {
                        LogMsg.shortDebug("Launcher coudn't run the " + className);
            }; // end thread sub-class
            thread.start();
            runningPrograms++;
        static int runningPrograms = 0;
         * All programs wishing to exit should call this method and NOT
         * use System.exit.  Calling System.exit will kill all the applications
         * running in this VM.
        public static synchronized void programQuit() {
            runningPrograms--;
            if (runningPrograms <= 0) {
                System.exit(0);
        public static void main(String[] args) {
            LogMsg.setupTraceLevel();
            Launcher l = new Launcher();
            l.launch(args[0]);
    }

  • Java process hanging

    Hi Expert ,
    we have oracle people soft application
    the application hang until we kill some jave porcess and clear the cache
    below the steps which we follow
    1)
    bash-3.00$ ps -ef | grep java
    hcmpsoft 18038 1 1 13:39:51 pts/1 0:19 java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Dtoplink.xml.platform=or
    noaccess 912 1 0 01:28:32 ? 0:41 /usr/java/bin/java -server -Xmx128m -XX:+UseParallelGC -XX:ParallelGCThreads=4
    root 2212 2205 0 01:29:01 ? 2:11 /usr/jdk/jdk1.5.0_24/bin/java -Xmx128M -Dcom.sun.management.jmxremote -Dfile.en
    hcmpsoft 18128 1 1 13:39:51 pts/1 0:20 java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Dtoplink.xml.platform=or
    hcmpsoft 18068 1 1 13:39:51 pts/1 0:20 java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Dtoplink.xml.platform=or
    hcmpsoft 18098 1 0 13:39:51 pts/1 0:19 java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Dtoplink.xml.platform=or
    hcmpsoft 18178 17681 0 13:40:05 pts/1 0:00 grep java
    hcmpsoft 3249 1 0 01:40:39 ? 197:20 java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Dtoplink.xml.platform=or_hcmpsoft 18008 1 1 13:39:51 pts/1 0:21 java -server -Xms512m -Xmx512m -XX:MaxPermSize=256m -Dtoplink.xml.platform=orac_
    2)
    # kill -9 3249
    3)
    cd /app/psoft/hcmpsoft/HCS90PT850/webserv/hcs9prd/applications/peoplesoft/PORTAL.war/hcs9prd/cache
    bash-3.00$ rm -r *
    4)
    cd /app/psoft/hcmpsoft/HCS90PT850/webserv
    bash-3.00$ ./hcs9prd/bin/startPIA.sh
    can any one plz tell me what is the problem
    (i'm DBA i don't have good idea about application level even java)
    Thanks inadvance
    sami

    903200 wrote:
    we have oracle people soft application That is a product. You should find a forum for that product to ask your question.

  • Open java app and insert text

    Hello All!
    I'm looking for a little help on an exact problem that seems to have been solved here before (but doesn't work for me).
    Here's the original archived thread:
    https://discussions.apple.com/thread/2631967?start=0&tstart=0
    The question asked is exactly the same....
    I have a java app for a Speco Technologies DVR. After opening the app, you must type in a rather long url and then click connect. If you enter the url, then quit the app, when you relaunch it, it does not remember the url that had been entered the previous time.
    I would like to create a script that will launch the Java app and then input the url (text string). I cannot get this to work.
    I've gotten as far as this:
    on run
    tell application "Finder" to activate open document file "DVRVIEWER(DO_NOT_DELETE).jar" of folder "Applications" of startup disk
    delay 5
    set myString to "192.168.0.118"
    repeat with currentCharacter in every character of myString
    tell application "system events"
    keystroke currentCharacter
    end tell
    delay 0.25
    end repeat
    tell application "system events"
    keystroke return
    end run
    AppleScript has a Syntax Error of "Expected end of line, etc. but found command name."
    Does anyone ( taylor.henderson where are you! ) have a fix, or even a better way to do this? Can I edit the existing .jar to have the info directly in there?
    I would actually love to add another section in there that fills in the username and password after entering in the IP address!
    Just for clarification on how this goes:
    Launch .jar.
    Window Launches and prompts for IP address
    Enter in IP address
    Press RETURN
    Windows disappears and new window appears and prompts for username and password
    Enter Username
    Press TAB
    Enter Password
    Press RETURN
    Thank you guys, I'm sure it's easy, but hey, for me Photoshop and Illustrator are a breeze :-0
    -AndyTheFiredog

    Hi
    andythefiredog wrote:
    Is it possible to use similar commands to maximize the java window?
    Yes.
    You must enable the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane
    Add these lines after the last line wich contains "keystroke return"
      delay 2
      tell (first process whose frontmost is true) to click button 2 of window 1 -- zoom
    Here's my test script ( the Speco camera demo), that works without problems here, I use the application "DVRJavaView4.1.jar", this script checks the existence of ui element (more reliable) rather than any delay.
    on run
         do shell script "/usr/bin/open '/Applications/DVRJavaView4.1.jar'"
         tell application "System Events" to tell (first process whose frontmost is true)
              repeat until exists window "Please Input DVR address"
                   delay 1
              end repeat
              keystroke "millapt.ddns.specoddns.net"
              keystroke return
              repeat until exists button "OK" of window 1
                   delay 1 -- wait until the login window is frontmost
              end repeat
              keystroke "user"
              keystroke tab
              delay 0.1
              keystroke "4321"
              delay 0.1
              keystroke return
              repeat until name of window 1 starts with "DVRJavaView"
                   delay 1 --wait while the login window is frontmost
              end repeat
              click button 2 of window 1 -- zoom
         end tell
    end run

  • 10.6 -- All Office 2008 apps hang at splash screen. FontCache Tool runaway

    Did an upgrade of 10.5 to 10.6. Nearly everything works fine. Can't launch Office 2008. All apps hang at their splash screen; usually at Optimizing Font Menu Performance.
    Once an app is opened, in Activity viewer you'll find a process called FontCache Tool using >90% of the CPU (on my Core Duo MBP at least, YMMV). I suppose it's saying a lot about 10.6 that the computer is completely usable with that runaway process. Even after forcing the office app(s) to quit, Font Cache Tool stays running until it's killed manually.
    I have yet to find out if FontCache Tool is an Apple or MS process. I think it's microsoft.
    This happens under multiple users.
    This happens after reinstalling Office.
    This was an Office 2008 upgrade from Office 2004.
    After reinstall, and installing Rosetta, office 2004 will run, but office 2008 will not.
    Office 2008 is 12.2.1.
    I am running FontAgent Pro for font management, and so font book sees certain activated fonts as duplicates. (Validate fonts shows duplicate warnings but no errors). FontAgent Pro 4.0.3 is listed as Snow Leopard compatible. So is Office 2008.
    I have yet to do a clean SL install, which I'm guessing will fix it, but I'm curious if there is a sub-sledgehammer approach, or if I am the only person with this issue.
    Other probably irrelevant facts include that the computer is bound to both Active Directory and OS X OpenDirectory servers. Open Directory is running on Leopard 10.5 Server. It does have some managed preferences, including those for Office (e.g. to set default to .doc rather than .docx) but the situation persists even after removing those managed preferences.
    Normally really specific problems are easy to isolate and solve, but I'm at a loss.
    Any help appreciated
    keppie

    Hey i think i figured it out.
    Had the same prob. 10.6 12.2.1 entourage hanging.
    Renamed FCT, instantly prompted that a font was corrupt. Removed the corrupt Font: KufiStandardGK.ttf << this just happened to be my one corrupt font.
    A little troubleshooting i did leading up to this, I read your post and my situation was the same. I use Linotype X to manage fonts. I disabled all but the minimum fonts (i moved them into a folder font_trouble in the same folder)
    I also deleted every office pref/plist setting i thought relevant to startup which triggered the microsoft setup assistant (watched via the console app) and it ran through its check and then immediately the fontcachetool started and went awol on cpu time. Once i killed it--during the starting up of word and entourage... timing may be unrelated but i did them at nearly the same time.
    Ps. Your post was extremely well written and I apologize for my stream of consciousness, less than stelllar response... hope this helps if not feel free to ping me for more details on what I did...
    Good Luck.. All my office apps are running normally now.

  • Can java app programmer make secure app?

    I am the author of the Interactive Color Wheel. It (in various versions) has been on the web since 1998, and has been very popular. With the recent hysteria about Java security, I have observed hits fall off dramatically. While it is not commercial and I'm not losing money, the drop-off still concerns me.
    So the question is, until such time as Oracle fixes it, what can I as an app programmer do to alleviate the problem?
    It seems quite ironic that the java app "sandbox", which was supposed to ensure security, seems to be the very source of the current problem. As far as I know, my app:
    * uses the screen
    * accesses the mouse and keyboard
    * accesses resources within its own JAR
    It does not:
    * access the web
    * write/read cookies (or do anything else on the file system)
    With these limitations, is my app even dangerous?

    I'm ignorant concerning the plug-in magic that gives a Java applet a sandbox to run in which protects the rest of the computer (and the world!) from devious programmers. How I view it is the Java Run Time (JRT) does not need a browser plug-in, but the plug-in needs the JRT. That would make them two separate things. If the plug-in for Java 6 releases was safe, why cannot it be packaged with the Java 7 JRT?
    Yes it was a rant -- not really at the whole world, but the journalists and supposed experts they interviewed. And certainly not directed at anyone here! I did not even know there was a problem until I allowed the JRT to upgrade last week, and my app would not run normally any more. At first I blew it off as "the installation screwed up". So I de-installed and re-installed the upgrade several times, and the security block did not go away.
    So I was frustrated but not yet angry. Then during the weekend I got serous about tracing down the problem, and discovered there really was a security issue. From my first question, you can see I still did not understand, thinking that devious internet Voodoo could make my app insecure. If that were the case, how would I block the Voodoo?
    Then I learned here that my applet was not in fact insecure. The press and "experts" were just telling people it (Java in general) was. I don't know what you have read, but there are some ridiculous claims being made. Not just disable Java for the time being (which the browsers are doing automatically now), but that it is inherently unsafe. Completely uninstall it and never re-install. Or the problem is so bad, it will take Oracle two years to fix. I know as a programmer those extreme claims are foolish, and I allowed that to affect me emotionally. I apologize.

Maybe you are looking for

  • BW and RFC problem  -- Source system not created.

    Hi Friends, Before posting this post , i have searched so many posts and docs and but still got a problem in creation of R3 source sytem in BI7.0. Steps i followed in R3 are as follws: 1) created  alogical system for R3 and BI7.0 2)assigned this logi

  • Tray displaying all Pages

    It would be awesome if there was a tray or tab that displayed all pages so we wouldn't have to keep jumping back and forth between the site map and page.

  • Question about weblogic.ejb20.utils.DDConverter

    Hello. I have convert DD using weblogic.ejb20.utils.DDConverter. But error happens. D:\>java weblogic.ejb20.utils.DDConverter -EJBVer 2.0 -d . forex_tr.jar new.jar DDConverter starting at 2002-02-21 ¿ÀÈÄ 4:35:26... Source file list: forex_tr.jar new.

  • HT203180 movies from another itunes acount?

    does anybody know how to transfer movies that were purchased on one persons account to someone else's iphone? my dad bought a movie on his itunes account but it is was downloaded on my computer, but now I cannot put the movie on any of my devices. do

  • Char to string

    I can't seem to figure this out and maybe it's not possible but what im trying to do is make an array or the symbols like !@#$% and letters abcd... so I'm trying to just use the ASCII char codes... so i do (char)33 which is "!" and store it into an a