This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: NullPointer + Jars
- To: "Gregory R. Warnes" <warnes at biostat dot washington dot edu>
- Subject: Re: NullPointer + Jars
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Fri, 19 May 2000 14:09:19 +1200
- CC: gcj Discussion List <java-discuss at sourceware dot cygnus dot com>
- References: <Pine.LNX.4.21.0005190038050.20575-100000@hydra.warnes.net>
"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;