Re: SableVM on Familiar - Installation Issues

Stephen Compall <[email protected]> Tue, 02 Aug 2005 12:51:35 -0500
Newsgroups gmane.comp.java.vm.sablevm.general
Message-ID <[email protected]>
On Tue, 2005-08-02 at 02:34 -0400, Michael Jones wrote:
> SVM_CP_DIR=/mnt/cf/packages/usr/share/sablevm-classpath
> BOOTCLASSPATH=$SVM_CP_DIR:$SVM_CP_DIR/libclasspath.jar:$SVM_CP_DIR/resources.jar
> LD_LIBRARY_PATH=/mnt/cf/packages/usr/lib/sablevm:/mnt/cf/packages/usr/lib
> export BOOTCLASSPATH LD_LIBRARY_PATH
> 
> Get the following error
> 
> root@simpad:/media/cf/packages/usr/share/sablevm-classpath# java 
> HelloWorldText
> *** Fatal error: Unable to load essential class java/lang/Object.
> *** Most probably it was not found on boot classpath:
> *** 
> /usr/share/sablevm-classpath:/usr/share/sablevm-classpath/libclasspath.jar:/usr/share/sablevm-classpath/resources.jar
> sablevm: cannot create vm
> 
> same for sablevm HelloWorldText

I see you read my reply to Vinod, directly or indirectly, and set the
environment variables appropriately.  However java-sablevm (the java
script) ignores the BOOTCLASSPATH variable, so you have to add the
-Xbootclasspath:$BOOTCLASSPATH option to your invocation of java, before
the class name.  That is:

java -Xbootclasspath:$BOOTCLASSPATH HelloWorldText

You can also hack the java-sablevm script with the attached diff.  Then
the environment setting should work.

-- 
Stephen Compall

_______________________________________________
SableVM-user mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-user
java-sablevm-use-bootclasspath-env.patch (text/x-patch, 835 B)
--- /usr/bin/java	2005-07-13 14:21:34.000000000 -0500
+++ /home/sirian/Desktop/java	2005-08-02 12:47:10.183135136 -0500
@@ -217,11 +217,14 @@
 
 OPTS="--classpath=$CLASSPATH $OPTS"
 # this is so that jikes worked w/o problems, i.e. when called by Ant
-BOOTCLASSPATH="/usr/share/sablevm-classpath:/usr/share/sablevm-classpath/libclasspath.jar:/usr/share/sablevm-classpath/resources.jar"
+#BOOTCLASSPATH="/usr/share/sablevm-classpath:/usr/share/sablevm-classpath/libclasspath.jar:/usr/share/sablevm-classpath/resources.jar"
 
 if [ "X$LD_LIBRARY_PATH" != "X" -o "X$SVM_LIBRARY_PATH" != "X" ]; then
   OPTS="-p java.library.path=$SVM_LIBRARY_PATH:$LD_LIBRARY_PATH:/usr/lib $OPTS"
 fi
+if test "x$BOOTCLASSPATH" != x; then
+  OPTS="-p sablevm.boot.class.path=$BOOTCLASSPATH $OPTS"
+fi
 
 export CLASSPATH BOOTCLASSPATH
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBC77KmYWjD35Pp0wIRAiELAJ0RyqQcVv0HIqcOCuCi/8h3w+/itQCfZTXl
n3oswssaPwl9uw4Nsd7SilY=
=ETss
-----END PGP SIGNATURE-----