public class run extends Applet
{
public void start()
{
java.lang.Runtime r = java.lang.Runtime.getRuntime();
String Cmd ="../../doc/$codnat/$numparq/modele.bat";
java.lang.Process P =r.exec(Cmd);
}
}
mais il me fait une erreur sur la 1er parenthese d'ici r.exec(Cmd)
l'erreur est :
unreported exception java.io.IOException; must be caught or declared to be thrown.
public class run extends Applet
{
public void start()
{
try
{
String b ="../../doc/$codnat/$numparq/modele.bat";
java.lang.Runtime run = Runtime.getRuntime();
run.exec( b );
}
finally
{
run.dispose();
}
}
}
Maintenant, il me fait cette erreur :
Cannot resolve symbol
symbol : method dispose()
location : class run
run.dispose();
^
j'utilise le kit java 2 de sun pour la compilation