java.lang.NullPointerException

Aleksander Slominski aztoruns at mat.uni.torun.pl
Sat Apr 26 13:01:51 PDT 1997


Michael R Cook wrote:
> 
> What is this stack trace telling me?
> 
> java.lang.NullPointerException
>         at java/lang/Runtime.initializeLinker(line unknown, pc 10b880)
>         at java/lang/Runtime.loadLibrary(line unknown, pc 10b148)
>         at java/lang/System.loadLibrary(line unknown, pc 10729c)
>         at sun/awt/motif/MToolkit.<clinit>(37)
>         at java/awt/Toolkit.getDefaultToolkit(190)
>         at java/awt/Window.getToolkit(155)
>         at java/awt/Frame.addNotify(82)
>         at java/awt/Window.pack(89)
>         at Listing1.main(9)
> 
> I compiled this code:
> 
>         import java.awt.*;
> 
>         public class Listing1
>         {
>             static public void main (String args[])
>             {
>                 Frame a_frame = new Frame("Listing 1");
>                 a_frame.add("Center", new Label("This is a test"));
>                 a_frame.pack();
>                 a_frame.show();
>             }
>         }
> 
> using Kaffe-0.8.4 on SunOS-4.1.4 (I used the `--enable-staticlib'
> configure option).  (The HelloWorldApp executed okay.)
> 
> Under Linux 1.2.13 (also `--enable-staticlib'), I get a different
> stack trace:
> 
> java.lang.NullPointerException
>         at java/lang/Runtime.initializeLinker(line unknown, pc 0x815104d)
>         at java/lang/Runtime.loadLibrary(line unknown, pc 0x814b8ec)
>         at java/lang/System.loadLibrary(line unknown, pc 0x8150283)
>         at biss/awt/kernel/NativeLib.<clinit>(line unknown, pc 0x814f6d7)
> 
> I have both biss.zip and classes.zip in my CLASSPATH:
> 
>   CLASSPATH=.:/local/kaffe/share/kaffe/biss.zip:/local/kaffe/share/kaffe/classes.zip
> 
> Any help?


Shinji KONO (kono at ie.u-ryukyu.ac.jp) found and also I did find 
in the same time what does it meeans.
It is a NULL returned from char*  getLibraryPath(void)
in kaffe-0.8.4/kaffe/kaffevm/external.c

I suggest other solution than Shinji as the default with "";


*** kaffe-0.8.4/kaffe/kaffevm/external.c        1997/04/26 15:15:23    
1.1
--- kaffe-0.8.4/kaffe/kaffevm/external.c        1997/04/26 15:15:56
***************
*** 241,245 ****
--- 241,249 ----
  char*
  getLibraryPath(void)
  {
+ #if !defined(NO_SHARED_LIBRARIES)
        return (libraryPath);
+ #else
+       return "";
+ #endif
  }

It seems solving a problem under Linux.

The other question is why I get Choice very big (I am using
GridBagLayout) does default preferredSize() is computed correctly?

Alek
-- 
Aleksander Slominski http://www.mat.uni.torun.pl/~aztoruns
ENTIA NON SUNT MULTIPLICANDA PRAECETER NECESSITAEM -William z Occam



More information about the kaffe mailing list