j9

Hi,
Now do to run java apps with j9 ?
During rnuning my j9 say
that it cannot initialize java/lang/Object
although I set CLASSPATH to j9…/classes/zip


Respectfully Yours,
Vasilii

If it can’t find java.lang.Object, it can’t find the classes.zip file. You
should NEVER set the CLASSPATH environment variable to point to a
classes.zip file (or rt.jar equivalent). CLASSPATH is for user-level
libraries, not the base class libraries shipped with the vm. Unless you are
running some really old and crusty version of a Sun JDK. Which you aren’t.

Assume you have a HelloWorld.class file, compiled from the following source:

public class HelloWorld {
static public void main(String[] args) {
System.out.println(“Hello, World!”);
}
}

You should be able to just type “j9 HelloWorld” and it will run. To find
the base class libraries (aka JCL), j9 looks on your bootclasspath,
specified via -bp:/-bpp:/-bpa: on the command line. If you’ve not specified
one of these options, they get the directory of the j9 executable, and
transmute it thusly {j9Dir}/…/lib/jclMax/classes.zip to obtain the
‘default’ bootclasspath. If j9 is installed in /xxx/ive/bin/j9,
then
j9 HelloWorld.class
is the same as
j9 -bp:/xxx/ive/lib/jclMax/classes.zip HelloWorld


You may want to move the discussion to
news.software.ibm.com::ibm.software.vame, where all the j9 folks lurk …

Patrick_Mueller@oti.com



“vasa” <vv40in@mail.ru> wrote in message news:9jp2kh$mi1$1@inn.qnx.com

Hi,
Now do to run java apps with j9 ?
During rnuning my j9 say
that it cannot initialize java/lang/Object
although I set CLASSPATH to j9…/classes/zip


Respectfully Yours,
Vasilii