AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problema java.lang.Process

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
Ale
Guest





PostPosted: Mon May 07, 2007 2:11 pm    Post subject: Problema java.lang.Process Reply with quote



Ciao a tutti,come da oggetto ho un problema con la classe Process:
quello che sto facendo è la realizzazione di un sistema che compili ed
esegua in automatico delle classi java:
per la compilazione eseguo le seguenti righe:

Runtime rt=Runtime.getRuntime();
Process proc=rt.exec("javac Main.java");

e non ci sono problemi.
Per quanto riguarda l'esecuzione invece ho il poblema di non riuscire
a passare i paramentri allo standard input,ossia:

Runtime rt=Runtime.getRuntime();
Process proc=rt.exec("java Main");

dopo aver eseguito questo codice non riesco a passare i parametri
necessari all'applicazione Main.class,parametri che normalmente leggo
da stardard input,qualcuno saprebbe aiutarmi?????

Grazie mille.
Back to top
Giambo
Guest





PostPosted: Tue May 08, 2007 1:13 am    Post subject: Re: Problema java.lang.Process Reply with quote



Ale wrote:
Quote:
Ciao a tutti,come da oggetto ho un problema con la classe Process:
quello che sto facendo è la realizzazione di un sistema che compili ed
esegua in automatico delle classi java:

Se usi java6, ci sono gia' delle API apposite:
http://www.juixe.com/techknow/index.php/2006/12/13/java-se-6-compiler-api/

Oppure questo puo' tornarti utile:
http://www.juixe.com/techknow/index.php/2006/12/12/invoke-javac-at-runtime/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.