Forums Register Login

Runtime

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
 

Originally posted by Richard West:
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



Is there a code sample you could post?

I guess something may have changed in 1.5 for this... I don't know why. Does it matter?
+Pie Number of slices to send: Send
 

Originally posted by Maximilian Stocker:


Is there a code sample you could post?

I guess something may have changed in 1.5 for this... I don't know why. Does it matter?



There is not much code only the usual way of running javac.exe with the runtime class. The class compiles but the only difference is that the console window opens.

It matters for me because it simply looks better if the class compiles without the console window opening like in 1.4.2.

Is it something i am doing wrong?
Is there another way i can compile the class without the console window opening?

Hoping to hear from you

Yours Sincerely

Richard West
+Pie Number of slices to send: Send
No one knows this?
+Pie Number of slices to send: Send
You may be able to run the compiler directly through its Java API, instead of running an external process. Something like this:

sourceFile1 and sourceFile 2 are File objects; you can add as many as you need. There's probably a way to set the classpath as well.
[ March 21, 2006: Message edited by: Ulf Dittmer ]
+Pie Number of slices to send: Send
Hi everyone,

Originally posted by Ulf Dittmer:



I can't its in the com.sun packages.
These packages may not exist in the future thus its much too risky for me.

I am still puzzled about my original question?
Has anyone experienced this before

Richard West
+Pie Number of slices to send: Send
This documentation from Sun:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#proginterface

makes it sound like the compile methods *are* part of a public API.
+Pie Number of slices to send: Send
 

Originally posted by Jeff Albertson:
makes it sound like the compile methods *are* part of a public API.[/QB]



This is what it says it the above link

"Note that all other classes and methods found in a package whose name starts with com.sun.tools.javac (informally known as sub-packages of com.sun.tools.javac) are strictly internal and subject to change at any time."

Its too risky for me to use a class that may not exist in the future

But going back to my original question have you noticed that when you compiled java classes using the runtime class in 1.4.2 the console does not open up but the console opens up in 1.5.

Have anyone expereience this before and is there a way around this
or am i doing something wrongly

Hoping to hear from you guys

Yours Sincerely

Richard West
+Pie Number of slices to send: Send
"Note that all other classes and methods found in a package whose name starts with com.sun.tools.javac (informally known as sub-packages of com.sun.tools.javac) are strictly internal and subject to change at any time."

Don't forget to include their emphasis
[ March 23, 2006: Message edited by: Jeff Albertson ]
+Pie Number of slices to send: Send
Hi everyone,

True but let's suppose if i prefer to use the runtime class
and run the javac.exe class, have you ever experiened the problem that have?

Richard West
+Pie Number of slices to send: Send
Hi everyone,

No one has any idea about this topic?

Richard West
+Pie Number of slices to send: Send
Anyone??
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 771 times.
Similar Threads
java jdeveloper
Java command not working in console
No console window when running manifest file?
Help with number guessing game
Logging
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:05:55.