Re: /usr/local/bin/jar?[arch alpha problems]
David Bélanger <[email protected]> Sat, 2 Apr 2005 12:40:43 -0500
| Newsgroups | gmane.comp.java.vm.sablevm.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Apr 02, 2005 at 11:55:16AM -0500, mel kravitz wrote:
> Hi,
> Is there a 'jar' utility program in sablevm project? kaffe's jar utility
> throws on alpha:
> # jar (/usr/bin/jar)
> Internal error: caught an unexpected exception.
> Please check your CLASSPATH and your installation.
> java/lang/ArrayIndexOutOfBoundsException
> Aborted
> where , #cat /usr/bin/jar
> #! /bin/sh
> prefix=/usr/lib/kaffe/pthreads
> exec_prefix=${prefix}
> exec ${exec_prefix}/bin/kaffe $JAVA_OPTS kaffe.tools.jar.Jar ${1+"$@"}
> exit $?
> fastjar works to unpack batik-1.5.1.zip per:
> http://xml.apache.org/batik/install.html
> but sablevm balks at using it to start the (batik)browser giving:
> ref:(http://xml.apache.org/batik/svgviewer.html#browsing)
> casey171:/home/mel/batik-1.5.1# java -fastjar batik-squiggle.jar
> Warning: -fastjar option NOT RECOGNIZED by java-sablevm.
> A not recognized option will be just passed to SableVM.
> Note that we don't know if we should expect an argument after it.
> It almost _surely_ will result in an errors when the param is followed
> by an argument. Refer to 'man java-sablevm' and 'man sablevm'.
> sablevm: "-fastjar" unknown option
> Try "sablevm --help" for more information
> -any help here appreciated-Mel
>
>
Hi,
If you want to run an application in a jar, use the -jar switch:
java-sablevm -jar yourjarfile.jar
The java-sablevm script will use unzip to get the main class name (so
you need unzip installed on your system). Once sablevm started, it will
use its own code to extract classes from the jar.
This assumes that there is some manifest file that tells the main class
name.
Alternatively, you can add the jar file to the classpath and specify
the main class fully qualified name:
java-sablevm -classpath thejarfile.jar thepackage.subpackage.ClassName
David
---
David Bélanger
Web page: http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt