Changed Javac Compiler API

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Changed Javac Compiler API

billfen
Dave Woodman pointed out that on his system, the NetRexx compile fails when
using the Eclipse plugin.  We narrowed the problem down to the difference
between using JDK 6_21 (which I used in development) and JDK 6_27 (which is
on his system).

Apparently what has happened is that a new public Javac API was developed
and described in the javax.tools package.  Here is a link to some related
documentation I found.

http://download.oracle.com/javase/6/docs/technotes/tools/windows/javac.html

In the section titled "Programatic Interface", note the following:

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

NetRexx uses that internal interface by importing "sun.tools.javac.Main"
and executing the "Main" class.  (in RXTranslator.nrx) I believe that
somewhere between JDK_6_21 and JDK 6_27, a change was made which causes
that to fail.

I recommend that before the official release of NetRexx 3 that the public
API be adopted so that users of JDK 6_27 or later can compile NetRexx
programs.

If someone out there has NetRexx installed with JDK 6_27 or later, could
you provide independent verification of this?  I'm still checking to see if
this diagnosis is correct or if it is related to the plugin.

In any event, use of the internal (unsupported) javac API should be
discontinued in NetRexx.

Bill

--------------------------------------------------------------------
mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

RE: Changed Javac Compiler API

Dave Woodman
Further to Bill's message I have just installed and tested under jEdit.

Things seem to behave there, and manually too.

It will be interesting to learn at which point the eclipse plugin was
broken,
but I must thank Bill for his patience whilst replicating the issue.

So - "Thanks Bill!"

        Dave.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of [hidden email]
Sent: 08 September 2011 22:58
To: [hidden email]
Subject: [Ibm-netrexx] Changed Javac Compiler API

Dave Woodman pointed out that on his system, the NetRexx compile fails when
using the Eclipse plugin.  We narrowed the problem down to the difference
between using JDK 6_21 (which I used in development) and JDK 6_27 (which is
on his system).

Apparently what has happened is that a new public Javac API was developed
and described in the javax.tools package.  Here is a link to some related
documentation I found.

http://download.oracle.com/javase/6/docs/technotes/tools/windows/javac.html

In the section titled "Programatic Interface", note the following:

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

NetRexx uses that internal interface by importing "sun.tools.javac.Main"
and executing the "Main" class.  (in RXTranslator.nrx) I believe that
somewhere between JDK_6_21 and JDK 6_27, a change was made which causes
that to fail.

I recommend that before the official release of NetRexx 3 that the public
API be adopted so that users of JDK 6_27 or later can compile NetRexx
programs.

If someone out there has NetRexx installed with JDK 6_27 or later, could
you provide independent verification of this?  I'm still checking to see if
this diagnosis is correct or if it is related to the plugin.

In any event, use of the internal (unsupported) javac API should be
discontinued in NetRexx.

Bill

--------------------------------------------------------------------
mail2web LIVE - Free email based on MicrosoftR Exchange technology -
http://link.mail2web.com/LIVE



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Changed Javac Compiler API

ThSITC
In reply to this post by billfen
Thanks a lot for this hint, Bill.

This DOES explain why I did, originally, have had so many problems to
get NetRexxC running under JDK 1.7 !!

I did resolve those problems, hoever, by coyping both tools.jar *and*
NetRexxC.jar to ...\jdk1.7..\jre\lib\ext

Then everything suddenly started to work correctly again.

However, when JEDIT is used, you will have to double copy NetRexxC.jar ...

Thomas.
==========================================================
Am 08.09.2011 23:57, schrieb [hidden email]:

> Dave Woodman pointed out that on his system, the NetRexx compile fails when
> using the Eclipse plugin.  We narrowed the problem down to the difference
> between using JDK 6_21 (which I used in development) and JDK 6_27 (which is
> on his system).
>
> Apparently what has happened is that a new public Javac API was developed
> and described in the javax.tools package.  Here is a link to some related
> documentation I found.
>
> http://download.oracle.com/javase/6/docs/technotes/tools/windows/javac.html
>
> In the section titled "Programatic Interface", note the following:
>
> "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."
>
> NetRexx uses that internal interface by importing "sun.tools.javac.Main"
> and executing the "Main" class.  (in RXTranslator.nrx) I believe that
> somewhere between JDK_6_21 and JDK 6_27, a change was made which causes
> that to fail.
>
> I recommend that before the official release of NetRexx 3 that the public
> API be adopted so that users of JDK 6_27 or later can compile NetRexx
> programs.
>
> If someone out there has NetRexx installed with JDK 6_27 or later, could
> you provide independent verification of this?  I'm still checking to see if
> this diagnosis is correct or if it is related to the plugin.
>
> In any event, use of the internal (unsupported) javac API should be
> discontinued in NetRexx.
>
> Bill
>
> --------------------------------------------------------------------
> mail2web LIVE – Free email based on Microsoft® Exchange technology -
> http://link.mail2web.com/LIVE
>
>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com