Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Compile java files programmatically

Reply
Thread Tools

Compile java files programmatically

 
 
Michael Borgwardt
Guest
Posts: n/a
 
      05-21-2004
Carl Howells wrote:
> While having an official interface is a good thing... Do you realize
> who you replied to? Neal Gafter maintains javac for Sun. I suspect
> that means he knows how long those methods will be around.


O_O

Well, I can't be expected to know that, can I?

Anyway, I doubt even he can make a definitive staement about that beyond
a timeframe of maybe 5 years. And that's for Sun's SDK, the methods don't
even exist for others.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      05-21-2004
On Fri, 21 May 2004 18:47:29 +0200, Michael Borgwardt
<(E-Mail Removed)> wrote or quoted :

>
>Quite the opposite. These methods are an undocumented internal implementation
>detail of Sun's SDK! They could disappear at *any* time without prior notice!


However, from a practical point of view, I don't think they will
disappear. They are in the sun directory, because, quite sensibly, not
every JVM implementation need provide a built-in compiler.

Sun is reserving the right to change the interface without notice. If
they changed that one, there would a lot of howling.

At some point, probably sun should make the interface something
official like JCE, plug-replaceable and optional.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
 
bigbinc
Guest
Posts: n/a
 
      05-22-2004
Neal Gafter <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> bigbinc wrote:
> > I need to compile large groups of java files programmatically.

>
> Place tools.jar on your classpath and invoke
>
> public int com.sun.tools.javac.Main.compile(String[] args);
> or
> public int com.sun.tools.javac.Main.compile(String[] args,
> PrintWriter out);
>
> One simple way to put tools.jar on your classpath is to put a copy of it into
> $JDK/jre/lib/endorsed/tools.jar



I am seeing more developers that work for 'Sun', 'IBM' speaking out in
different forums, and we all know about the JBOSS fiasco, good to see
you guys.
 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      05-22-2004
bigbinc wrote:
<snip>
> I am seeing more developers that work for 'Sun', 'IBM' speaking out in
> different forums, and we all know about the JBOSS fiasco, good to see
> you guys.


Would you be so kind as to inform those of us "great unwashed" what
you mean by "the JBOSS fiasco"?
While I admit to not being a big fan of JBoss due to their attempts
at generating income, I'm unfamiliar with your claim.
Clarification would be most appreciated.

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      05-22-2004
On Fri, 21 May 2004 21:59:18 -0400, Berlin Brown
<(E-Mail Removed)> wrote or quoted :

>
>I think it presents an interesting interface for compiling programs. If I
>could compile programs programmatically, I could for example build a simple
>'swing' application quickly, where output is directed to a textarea, or
>compile programs through HTTP and html forms, or through databases(off of
>the top of my head ideas, not very practical).


And a much faster MAKE. You save the overhead of reloading the JVM for
each compile.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      05-22-2004
Berlin Brown wrote:
<snip>
> Keep up, they have been talking about it on slashdot for weeks now.


Thanks for the link! Actually, I DO keep up, and posted about how my
submission to their tightly-controlled forum was quashed after just
a few days. My concerns seem to be echoed by others, another fact I
noted.
Doesn't "Professional Open Source" sound a bit odd? I'm hardly
averse to people earning a decent living from their efforts, BTW.
I just don't like the idea of individuals or organizations purporting
their products to be "free" when they're not.
Try to find a Usenet ng on JBoss!
Can't find one? Want to know why?
Do your own research and look at the applications, denials, and
reasons for denial.
Need I say more?

 
Reply With Quote
 
Berlin Brown
Guest
Posts: n/a
 
      05-22-2004
Roedy Green wrote:

> On Fri, 21 May 2004 18:47:29 +0200, Michael Borgwardt
> <(E-Mail Removed)> wrote or quoted :
>
>
> At some point, probably sun should make the interface something
> official like JCE, plug-replaceable and optional.
>


I think it presents an interesting interface for compiling programs. If I
could compile programs programmatically, I could for example build a simple
'swing' application quickly, where output is directed to a textarea, or
compile programs through HTTP and html forms, or through databases(off of
the top of my head ideas, not very practical).

--
Berlin Brown
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Berlin Brown
Guest
Posts: n/a
 
      05-22-2004
Sudsy wrote:

> bigbinc wrote:
> <snip>
>> I am seeing more developers that work for 'Sun', 'IBM' speaking out in
>> different forums, and we all know about the JBOSS fiasco, good to see
>> you guys.

>
> Would you be so kind as to inform those of us "great unwashed" what
> you mean by "the JBOSS fiasco"?
> While I admit to not being a big fan of JBoss due to their attempts
> at generating income, I'm unfamiliar with your claim.
> Clarification would be most appreciated.


Keep up, they have been talking about it on slashdot for weeks now.

http://osdir.com/Article832.phtml

--
Berlin Brown
(E-Mail Removed)
 
Reply With Quote
 
Neal Gafter
Guest
Posts: n/a
 
      05-22-2004
Michael Borgwardt wrote:
> Quite the opposite. These methods are an undocumented internal
> implementation
> detail of Sun's SDK! They could disappear at *any* time without prior
> notice!
>
> That's why there's an official compiler API being planned:
> http://www.jcp.org/en/jsr/detail?id=199


As you can see by following the link that you posted, I am the spec lead for
jsr199. I am also the lead engineer for javac at Sun. It is because jsr199
will not be included in 1.5 that we're documenting these methods for JDK 1.5,
thereby committing to their continued existence for a long time.

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      05-22-2004
On Sat, 22 May 2004 03:22:06 GMT, Neal Gafter wrote:

>> http://www.jcp.org/en/jsr/detail?id=199

....
>..It is because jsr199
> will not be included in 1.5 that we're documenting these methods for JDK 1.5,


Javadocs? (If so, are they
online/downloadable yet?
I did not see any references)

> thereby committing to their continued existence for a long time.


Is good.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile directive for conditional compile for Java 1.4 versus Java 5 timjowers Java 7 02-02-2011 12:08 AM
How to compile the following source code in VC6// I have error inVC++6 but compile ok in GCC fAnSKyer C++ 2 06-07-2009 07:57 AM
computation at compile time i.e. compile time functions usingtemplates Carter C++ 2 03-04-2009 06:43 PM
Compile versus not compile (VS 2005)?? stupid48@gmail.com ASP .Net 1 04-11-2008 08:24 PM
cant compile on linux system.cant compile on cant compile onlinux system. Nagaraj C++ 1 03-01-2007 11:18 AM



Advertisments