Please help with thread problem

From: Sandra (alessandra_cabrini_at_virgilio.it)
Date: 10/05/04


Date: 5 Oct 2004 05:35:49 -0700

Hi, I need to execute a program from an other and I use this method:

public class P1 {
    public static void main(String arg[]) {
        new Thread(){
            public void run() {
                P2.main(new String[]{});}
                }.start();
    }

}

This works.
The problem is when program P1 is in C:\\dir1 and program P2 is in
C:\\dir2

The code

public class P1 {
    public static void main(String arg[]) {
        new Thread(){
            public void run() {
                C:\\dir2\P2.main(new String[]{});}
                }.start();
    }

}

doesn't work.
Maybe the problem are the '\\' characters?

How could I solve this problem?

Second problem: I need to execute a program from an other, but the
program to execute is in an other computer, networked to the first
one.
Let the program P2 be in computer at address 192.45.68.100
Now, I'm able for example to work on a database on an other computer,
using for example a code like

                Connection c = DriverManager.getConnection("jdbc:mysql://192.45.68.100/recipeDB");

but I cannot figure out how to port this in my
program-to-open-an-other-program.

Please help!

Thank you very much

Sandra



Relevant Pages

  • Re: Thread termination
    ... > I would like to execute some code when a thread terminates, ... public class ThreadStarterWithFinish ... static void Normal() ...
    (microsoft.public.dotnet.general)
  • Executing 2 Threads
    ... I’m having a bit of difficulty with a threading scenario. ... Basically I’m creating 2 threads and trying to execute them one after the ... At the top level I have s series of windows services running ... public class Helper1:Helper ...
    (microsoft.public.dotnet.framework)
  • Please help with thread problem
    ... I need to execute a program from an other and I use this method: ... public class P1 { ... but I cannot figure out how to port this in my ... Sandra ...
    (comp.lang.java.programmer)
  • Re: can java.util.properties be static values??
    ... I might be misunderstanding you, but the static block allows you to "execute ... public class A { ...
    (comp.lang.java.programmer)
  • Re: How to install a library frim SD card
    ... Why Port 1 is faster than port 2? ... after execute the program. ... the flash access, just because typically, rom and flash chips are ... with the new ARM based hardware, RAM and FLASH are clocked at ARM ...
    (comp.sys.hp48)