This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: NullPointer + Jars


"Gregory R. Warnes" wrote:

> The example program "HelloDate.java" is attached, as is the getopt jar
> file.
>
> 1) My code uses the gnu getopt code for java.  When the jar file is in the
> classpath, the program throws a NullPointerException on startup (see
> below).  When the un-jar-ed data is on the classpath, everything runs
> correctly.

As you've probably guessed, the interpreter is much less well tested than the rest
of (lib)gcj. The reason your finding bugs here is possibly because nobody has tried
to do this before (that is, put a .jar file on the classpath and run something from
it ;-)

I haven't tried your test case, but I think I found the problem. Can you try the
patch below?

> libgcj configuration:
>
> ../libgcj/configure --prefix=/usr --disable-threads --norecursion

Any particular reason to build without threads? Was there a problem there? Just
curious...

regards

  [ bryce ]


2000-05-19  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/util/zip/ZipEntry.java (ZipEntry): Copy `name' field.
	
Index: ZipEntry.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/util/zip/ZipEntry.java,v
retrieving revision 1.9
diff -u -r1.9 ZipEntry.java
--- ZipEntry.java	2000/05/04 15:50:34	1.9
+++ ZipEntry.java	2000/05/19 01:47:21
@@ -51,6 +51,7 @@
     crc = ent.crc;
     extra = ent.extra;
     method = ent.method;
+    name = ent.name;
     size = ent.size;
     time = ent.time;
     relativeOffset = ent.relativeOffset;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]