Comment lancer un programme java avec Process?
Bonjour,
pourquoi mon code suivant ne lance pas le code java que j'ai crée?
il ne lance que les .exe.
Alors comment faire pour lancer un .java?
merci
code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| import java.io.*;
public class Mani
{
public static void main(String args[])
throws IOException, InterruptedException
{
try
{
Process p=Runtime.getRuntime().exec("D:\\NetBeansProjects\\GetIPAddress\\dist\\GetIPAddress.java");
}
catch(IOException e1) {System.out.println(e1);}
}
} |