This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Runtime  RSS feed

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one knows this?
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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 ]
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

No one has any idea about this topic?

Richard West
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!