S
Sandra
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
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