Can jdk & jre-1.4.0_01 run *jar ?

Can jdk & jre-1.4.0_01 run *jar ?

Post by problem » Thu, 01 May 2008 17:43:55


The instructions say:-
"Just double-click on the alloy.jar file to run Alloy.
You need to have Java 1.3 or greater..."

As a non-user of java I previously tested 'my java installation'
with a 'hello world' and some samples and it confirmed OK.

Here's the test script which I now confirm as running OK:-
cd /usr/lib/jre-1.4.0_01/bin/
java RecursionDemo

So: 'java RecursionDemo' runs the executable RecursionDemo*
and the dir. has:
RecursionDemo.class RecursionDemo.java; where *java is the source
so apparently *.class is the 'p.code' ?

So apparently 'java *' will run *.class in the current dir., and
probably in some path ?

But I don't think I've confirmed that my setup can 'run a *jar file'.

And 'java -jar alloy.jar' gives me:--
Warning: Unrecognized version number 48/0 in classfile.
...repeat multiple mesg.
Warning: Unrecognized version number 48/0 in classfile
ava.lang.NoClassDefFoundError: alloy/gui/NewAlloyGUI$AlloySolutionMenuItem
at alloy.gui.NewAlloyGUI$103.run(NewAlloyGUI.java:4140)
at java.lang.Thread.run(Thread.java:328)
---------
I can see that alloy.jar is in fact a PK-zipped file, with contents eg.
org/apache/commons/collections/ReferenceMap$EntryIterator.class,
and even *gif files ?!

In fact alloy.jar at 10MB is almost the size of the original *.zip
package. So obviously alloy.jar is to be unzipped, before the
'main class' runs ?

Q. since I've got no org/apache/commons/collections/ dir., is the
unzipping of alloy.jar 'dynamic' and only during the run time ?

Q. since the instructions write: "double-click on the alloy.jar file
to run Alloy"; would 'the file' be *SEEN* in the contect of the/a
java run environment ? I *SEE* it only because I use mc, which 'shows'
me the files of the current-dir.

When I try to 'run' some other existing *jar from my existing/previously
tested java-system., I get:-- # java -jar examples.jar
# No ``Main-Class'' found in manifest
-------------- and
# java -jar TableExample.jar gives:-
java.lang.NoClassDefFoundError: Ljavax/swing/JPanel;
at java.lang.reflect.Method.invoke0(Method.java:native)
at java.lang.reflect.Method.invoke(Method.java:256)
at kaffe.jar.ExecJarName.main(ExecJarName.java:66)
at kaffe.jar.ExecJar.main(ExecJar.java:71)


Q. is my jdk-1.4.0_01 and jre-1.4.0_01 sufficient to run
alloy.jar ?

== TIA.
 
 
 

Can jdk & jre-1.4.0_01 run *jar ?

Post by problem » Wed, 04 Jun 2008 18:33:04

The instructions say:-
"Just double-click on the alloy.jar file to run Alloy.
You need to have Java 1.3 or greater..."

As a non-user of java I previously tested 'my java installation'
with a 'hello world' and some samples and it confirmed OK.

Here's the test script which I now confirm as running OK:-
cd /usr/lib/jre-1.4.0_01/bin/
java RecursionDemo

So: 'java RecursionDemo' runs the executable RecursionDemo*
and the dir. has:
RecursionDemo.class RecursionDemo.java; where *java is the source
so apparently *.class is the 'p.code' ?

So apparently 'java *' will run *.class in the current dir., and
probably in some path ?

But I don't think I've confirmed that my setup can 'run a *jar file'.

And 'java -jar alloy.jar' gives me:--
Warning: Unrecognized version number 48/0 in classfile.
...repeat multiple mesg.
Warning: Unrecognized version number 48/0 in classfile
ava.lang.NoClassDefFoundError: alloy/gui/NewAlloyGUI$AlloySolutionMenuItem
at alloy.gui.NewAlloyGUI$103.run(NewAlloyGUI.java:4140)
at java.lang.Thread.run(Thread.java:328)
---------
I can see that alloy.jar is in fact a PK-zipped file, with contents eg.
org/apache/commons/collections/ReferenceMap$EntryIterator.class,
and even *gif files ?!

In fact alloy.jar at 10MB is almost the size of the original *.zip
package. So obviously alloy.jar is to be unzipped, before the
'main class' runs ?

Q. since I've got no org/apache/commons/collections/ dir., is the
unzipping of alloy.jar 'dynamic' and only during the run time ?

Q. since the instructions write: "double-click on the alloy.jar file
to run Alloy"; would 'the file' be *SEEN* in the contect of the/a
java run environment ? I *SEE* it only because I use mc, which 'shows'
me the files of the current-dir.

When I try to 'run' some other existing *jar from my existing/previously
tested java-system., I get:-- # java -jar examples.jar
# No ``Main-Class'' found in manifest
-------------- and
# java -jar TableExample.jar gives:-
java.lang.NoClassDefFoundError: Ljavax/swing/JPanel;
at java.lang.reflect.Method.invoke0(Method.java:native)
at java.lang.reflect.Method.invoke(Method.java:256)
at kaffe.jar.ExecJarName.main(ExecJarName.java:66)
at kaffe.jar.ExecJar.main(ExecJar.java:71)


Q. is my jdk-1.4.0_01 and jre-1.4.0_01 sufficient to run
alloy.jar ?

== TIA.