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.
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?
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?
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 ]
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
"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 ]