Runtime

Reply

Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Runtime

 
0
  #1
Mar 21st, 2006
Hi everyone,

I find something very odd.
When i use the runtime class to run javac in 1.4.2 the console window does
open but when i do the same in 1.5 the console window appears.

Why is this so. Am i missing something?

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Runtime

 
0
  #2
Mar 23rd, 2006
Hi everyone,

No one has experienced this before??

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Runtime

 
0
  #3
Mar 25th, 2006
uh, you're saying it appears in both 1.4 and 5.0...

That may not be what you intended to say though

I hardly if ever use the runtime class, never really needed it.
And you don't either. If you dive into the Java API you'll find out how to run the compiler in-process.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Runtime

 
0
  #4
Mar 25th, 2006
Hi everyone,

Originally Posted by jwenting
uh, you're saying it appears in both 1.4 and 5.0...

That may not be what you intended to say though .
Oh you are right. What i meant to say was that the console did not appear in 1.4 but appeared in 1.5 when i use the runtime class to run javac.exe

Have you ever experienced this before?

Originally Posted by jwenting
If you dive into the Java API you'll find out how to run the compiler in-process.
Are you talking about the javac class. I am scared to use that class because its in the com.sun package and i find it risky to use as that package is not a standard part of java and may not exist in the future.

Hoping to hear from you

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 50
Reputation: AstroNox is an unknown quantity at this point 
Solved Threads: 2
AstroNox AstroNox is offline Offline
Junior Poster in Training

Re: Runtime

 
0
  #5
Mar 26th, 2006
Dear Richard, that's an interesting problem I've never encountered. Please give me some time to check it out. In the meantime, could you please state your system specs (Windows or Linux), your PATH environmental variable, JDK release version (jdk1.5.0_x), and perhaps a code snippet of where the problem originated from.
Best Regards, God Bless,
AstroNox
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Runtime

 
0
  #6
Mar 26th, 2006
Hi everyone,

Originally Posted by AstroNox
In the meantime, could you please state your system specs (Windows or Linux)
Windows

Originally Posted by AstroNox
JDK release version (jdk1.5.0_x)
jdk1.5.0_6

Originally Posted by AstroNox
and perhaps a code snippet of where the problem originated from.
There's no code simply using the runtime class to run javac.exe to compile a java class and the class compiles with no problem as usual but the only problem is that the console window appears during compilation but this doe not happen in 1.4.2.

Hoping to hear from you

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 50
Reputation: AstroNox is an unknown quantity at this point 
Solved Threads: 2
AstroNox AstroNox is offline Offline
Junior Poster in Training

Re: Runtime

 
0
  #7
Mar 26th, 2006
Dear Richard,

I actually wanted to see the command string you passed into Runtime.getRuntime().exec(), not the code in the sense of just Runtime.getRuntime().exec(). We all know that this Java statement will generate no problems for the compiler.
Best Regards, God Bless,
AstroNox
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Runtime

 
0
  #8
Mar 26th, 2006
Originally Posted by AstroNox
Dear Richard,

I actually wanted to see the command string you passed into Runtime.getRuntime().exec(), not the code in the sense of just Runtime.getRuntime().exec(). We all know that this Java statement will generate no problems for the compiler.
This is the command javac heri.java

Its not unusual

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 50
Reputation: AstroNox is an unknown quantity at this point 
Solved Threads: 2
AstroNox AstroNox is offline Offline
Junior Poster in Training

Re: Runtime

 
0
  #9
Mar 26th, 2006
Dear Richard,

I have done some testing and I did not encounter the problem you did. I tested several DOS programs like ping and java and of course javac, using java and even javaw to test out my classes. No consoles or additional windows appeared and things functioned as expected. I'm sorry but I do not know why you encounter this problem.
Best Regards, God Bless,
AstroNox
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Runtime

 
0
  #10
Mar 27th, 2006
yes, it is risky to use the com.sun classes.
But in theory the commandline for the compiler could also change.
And of course the compiler will have a different commandline on other operating systems.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC