I have vmware running fedora 12 and am in the process of installing netrexx.
fedora installs java: $ java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8.3) (fedora-43.1.8.3.fc12-i386) OpenJDK Client VM (build 14.0-b16, mixed mode) and i copied NetRexxC.jar to /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext i copied NetRexxC.sh, nrc, and hello.nrx from the unpack directory ~/NetRexx/bin to /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin i updated my CLASSPATH to include the directory where tools.jar is located: $ echo $CLASSPATH .:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib: all that is per the installation instructions. when i cd to ~/NetRexx/bin and test it out, i get errors : $ java COM.ibm.netrexx.process.NetRexxC hello NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program hello.nrx Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main at COM.ibm.netrexx.process.RxTranslator.compile(RxTranslator.nrx:660) at COM.ibm.netrexx.process.NetRexxC.process(NetRexxC.nrx:183) at COM.ibm.netrexx.process.NetRexxC.main2(NetRexxC.nrx:123) at COM.ibm.netrexx.process.NetRexxC.main(NetRexxC.nrx:82) Caused by: java.lang.ClassNotFoundException: sun.tools.javac.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334) ... 4 more it does create hello.java and if i go ahead and compile it: $ javac hello.java i get the hello.class which i can run with java: $ java hello Hello World! so why doesn't the javac step work in NetRexxC ? -- Phillip Gramly Systems Programmer Communications Data Group Champaign, Illinois _______________________________________________ Ibm-netrexx mailing list [hidden email] winmail.dat (4K) Download Attachment |
I guess everyone else is asleep! A Java classpath does not
automatically load jar files. With Java 6, you can add a wildcard to
load the jar files:
.:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/* I am not quite sure about OpenJDK since I don't use it but older Java versions require you to specify each jar file: .:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/tools.jar Hope that helps, -- Kermit On 5/5/2011 3:50 PM, Phillip Gramly wrote: I have vmware running fedora 12 and am in the process of installing netrexx. fedora installs java: $ java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8.3) (fedora-43.1.8.3.fc12-i386) OpenJDK Client VM (build 14.0-b16, mixed mode) and i copied NetRexxC.jar to /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext i copied NetRexxC.sh, nrc, and hello.nrx from the unpack directory ~/NetRexx/bin to /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin i updated my CLASSPATH to include the directory where tools.jar is located: $ echo $CLASSPATH .:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib: all that is per the installation instructions. when i cd to ~/NetRexx/bin and test it out, i get errors : $ java COM.ibm.netrexx.process.NetRexxC hello NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program hello.nrx Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main at COM.ibm.netrexx.process.RxTranslator.compile(RxTranslator.nrx:660) at COM.ibm.netrexx.process.NetRexxC.process(NetRexxC.nrx:183) at COM.ibm.netrexx.process.NetRexxC.main2(NetRexxC.nrx:123) at COM.ibm.netrexx.process.NetRexxC.main(NetRexxC.nrx:82) Caused by: java.lang.ClassNotFoundException: sun.tools.javac.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334) ... 4 more it does create hello.java and if i go ahead and compile it: $ javac hello.java i get the hello.class which i can run with java: $ java hello Hello World! so why doesn't the javac step work in NetRexxC ?_______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Phillip Gramly
Just a guess, but the netrexx compiler directly calls the javac
compiler using the Sun/Oracle classes. This requires that you have the full Java SDK installed, not just the JRE. Rick On Thu, May 5, 2011 at 6:50 PM, Phillip Gramly <[hidden email]> wrote: > I have vmware running fedora 12 and am in the process of installing netrexx. > fedora installs java: > $ java -version > java version "1.6.0_18" > OpenJDK Runtime Environment (IcedTea6 1.8.3) (fedora-43.1.8.3.fc12-i386) > OpenJDK Client VM (build 14.0-b16, mixed mode) > > and i copied NetRexxC.jar to /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext > > i copied NetRexxC.sh, nrc, and hello.nrx from the unpack directory ~/NetRexx/bin to > /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin > > i updated my CLASSPATH to include the directory where tools.jar is located: > $ echo $CLASSPATH > .:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib: > > all that is per the installation instructions. > > when i cd to ~/NetRexx/bin and test it out, i get errors : > > $ java COM.ibm.netrexx.process.NetRexxC hello > NetRexx portable processor, version 2.05 > Copyright (c) IBM Corporation, 2005. All rights reserved. > Program hello.nrx > Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main > at COM.ibm.netrexx.process.RxTranslator.compile(RxTranslator.nrx:660) > at COM.ibm.netrexx.process.NetRexxC.process(NetRexxC.nrx:183) > at COM.ibm.netrexx.process.NetRexxC.main2(NetRexxC.nrx:123) > at COM.ibm.netrexx.process.NetRexxC.main(NetRexxC.nrx:82) > Caused by: java.lang.ClassNotFoundException: sun.tools.javac.Main > at java.net.URLClassLoader$1.run(URLClassLoader.java:217) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:205) > at java.lang.ClassLoader.loadClass(ClassLoader.java:321) > at java.lang.ClassLoader.loadClass(ClassLoader.java:266) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334) > ... 4 more > > it does create hello.java > and if i go ahead and compile it: > $ javac hello.java > i get the hello.class which i can run with java: > > $ java hello > Hello World! > > so why doesn't the javac step work in NetRexxC ? > > -- > Phillip Gramly > Systems Programmer > Communications Data Group > Champaign, Illinois > > > > > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > > > _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Rick is correct, but you want a 1.5 or earlier jdk to avoid the error. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
rename getCoffee.nrx.keep to getCoffee.nrx *before* you are calling javac ! Don't forget to PURGE (DELETE) the OLD proper .keep file before you are invoking NetRexxC, of course... Hope this helps ... Thomas. ================================================================= Am 06.05.2011 15:21, schrieb Measel, Mike:
--
Thomas Schneider (www.thsitc.com) _______________________________________________ Ibm-netrexx mailing list [hidden email]
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
of course, you have to: delete getCoffee.java.keep nrc getCoffee.nrx -keep rename getCoffee.java.keep getCoffee.java javac GetCoffee.java rename getCoffee.java getCoffee.java.keep (when you like) *Next time*, I will be more careful before pressing the send-button... :-) Thomas. ======================================================================== Am 06.05.2011 22:28, schrieb Thomas Schneider:
--
Thomas Schneider (www.thsitc.com) _______________________________________________ Ibm-netrexx mailing list [hidden email]
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
Free forum by Nabble | Edit this page |