[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jar files for java



First of all, do you have Java installed correctly? I have a feeling you
shouldn't see the "placeholder" message.

The error message is telling you that it could not find the main()
method in your jar file. The location of the main method is defined in
the jar file's manifest.

This may help:

   to view the "contents" of the jar file: 
     jar tf jrar-0.40-standard-icons.jar. 

   to extract the jar into files use this:
     jar xf jrar-0.40-standard-icons.jar.

To run a static method you give it as an argument after the jar file as
follows:

java -classpath $CLASSPATH:/path/to/myJar.jar tomc.util.HelloWorld


On Mon, 2005-01-10 at 15:59 -0600, bentley_rhodes wrote:
> bentley_rhodes wrote:
> 
> > how the heck do i  start a java file?  i found a Azureus*.jar and a 
> > jrar.jar file.  i have tried googling around and the answers i have 
> > found seem to be for compiling the files.
> >
> > also ... hehe ... how do i remove the 'open with' option under the 
> > menu (right clicking).  i added quite a few things while trying to get 
> > that *(#@&* file to open.  and is it a bad thing if there are like ten 
> > things there?  right now it things that a shell script called javac is 
> > supposed to open the file (which doesn't work).
> >
> this is what i'm typing and what i am getting:
> 
>     * [bntly_rhds@localhost rar]$ java jrar-0.40-standard-icons.jar
>       libgcj-java-placeholder.sh
> 
>       This script is a placeholder for the /usr/bin/java
>       master link required by jpackage.org conventions.  libgcj's
>       rmiregistry, rmic and jar tools are now slave symlinks to these
>       masters, and are managed by the alternatives(8) system.
> 
>       This change was necessary because the rmiregistry, rmic and jar tools
>       installed by previous versions of libgcj conflicted with symlinks
>       installed by jpackage.org JVM packages.
>       Exception in thread "main" java.lang.NoClassDefFoundError:
>       jrar-0.40-standard-icons.jar
>          at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
>          at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
>          at _Jv_RunMain(java.lang.Class, byte const, int, byte const,
>       boolean) (/usr/lib/libgcj.so.5.0.0)
>          at __libc_start_main (/lib/tls/libc-2.3.4.so)
>       [bntly_rhds@localhost rar]$
> 
> i cannot figure it out, but i'm happy to ask!
> 


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.