public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/14070] New: -jar argument should set the manifest Class-path recursively
@ 2004-02-07 23:12 avdyk at debian dot org
  2004-02-07 23:25 ` [Bug java/14070] " avdyk at debian dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: avdyk at debian dot org @ 2004-02-07 23:12 UTC (permalink / raw)
  To: gcc-bugs

I was trying something (to prepare my talk with Dalibor at the FOSDEM;))
and the way IBM's JDK (1.4.1) does it is perfect for me!.. But kaffe
does not do it the same way.

$ java -jar test1.jar

great
great

$ gij -jar test1.jar
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving
class: test.Test1
   at java.lang.ClassLoader.resolveClass0(java.lang.Class)
(/usr/lib/libgcj.so.4.0.0)
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.4.0.0)
   at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
(/usr/lib/libgcj.so.4.0.0)
   at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.4.0.0)
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.4.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.4.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean)
(/usr/lib/libgcj.so.4.0.0)
   at __libc_start_main (/lib/libc-2.3.2.so)
Caused by: java.lang.ClassNotFoundException: test2.Test2 not found in
[file:test1.jar, core:/]
   at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.4.0.0)
   at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String)
(/usr/lib/libgcj.so.4.0.0)
   at java.lang.ClassLoader.loadClass(java.lang.String, boolean)
(/usr/lib/libgcj.so.4.0.0)
   at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.4.0.0)
   at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
(/usr/lib/libgcj.so.4.0.0)
   at _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.4.0.0)
   at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.4.0.0)
   at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.4.0.0)
   at java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.4.0.0)
   at java.lang.ClassLoader.resolveClass0(java.lang.Class)
(/usr/lib/libgcj.so.4.0.0)
   ...7 more

What was I trying to do?

You probably know that you can specify a classpath in a manifest
file. If you run java with -jar theapplication.jar, java will search for
Main-Class field to execute the class and also to the Class-Path field
to 'dynamically' set the classpath.

I was wondering if a jar depends of a jar that depends of another, what
happens? With IBM runtime, if the second library has a correct
Class-Path field in its manifest file, then, the dependency is
resolved. But in kaffe, it's not the case.

Would it be possible to change the behavior of kaffe to make it resolve
the classpath with the -jar argument recursively?

I hope the explanation was correct...

Many thanks for your attention and time, cheers,

You can have the files I did use to make the test here:
http://www.kaffe.org/pipermail/kaffe/2004-February/045189.html

-- 
           Summary: -jar argument should set the manifest Class-path
                    recursively
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: avdyk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14070


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-04-20  2:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-07 23:12 [Bug java/14070] New: -jar argument should set the manifest Class-path recursively avdyk at debian dot org
2004-02-07 23:25 ` [Bug java/14070] " avdyk at debian dot org
2004-02-07 23:33 ` [Bug libgcj/14070] gij and " pinskia at gcc dot gnu dot org
2004-05-06 17:14 ` pinskia at gcc dot gnu dot org
2004-10-29 10:39 ` aph at gcc dot gnu dot org
2005-01-18 12:11 ` aph at gcc dot gnu dot org
2005-04-20  2:01 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).