hal:/opt/local/java/jdk/lib/i586/native_threads# 
ldd ./libawt.so 
  libpthread.so.0 => /lib/libpthread.so.0 (0x4004a000)
  libc.so.6 => /lib/libc.so.6 (0x40057000)
  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
nm -D ./libawt.so | grep XtShellStrings
  U XtShellStrings

nm -D libXt.so.6.0 | grep XtShellStrings
  00041c2c R XtShellStrings  
    (aside: what manpage/info covers symbol flags...)
 
My invocation test:
 invoking VM next...
 returns JNIEnv 0x40075304
 Loaded Test.class
 Retrieved methodID for Test.init()V
 JAVA: Test.init()V called.
 /opt/local/java/jdk/lib/i586/jthreads/libawt.so: 
   undefined symbol: XtShellStrings (libawt.so)

The same test class works fine with "java Test" (popping up
the AWT Frame, that is), but with invocation, this doesn't
work, as libawt.so is not loaded. What am I missing here?
Shouldn't the "ldd libawt.so" list each any any X, JPEG,
GIF etc. dependency to make sure that in loading it, all
symbols are resolved?

Is there a workaround? Link my own bogus libawt.so?
 
Suggestion: add a few plain JNI Invocation tests linked 
only with -ljava to your test suite? If you'd load AWT,
java.net, java.io and other core packages with native
code dependencies, this should catch any such omissions.


                                                b.


P.S.: I actually tried System.loadLibrary("Xt"), which
passes w/o any error (probably doing nothing).



public class Test {
  /**
   * The init() method visible to native code.
   * All mayhem starts here.
   */
  public static final void init() {
    System.out.print("JAVA: Test.init()V called.\n");
    TestApplet app = new TestApplet();
  
    // Frame for the applet.
    Frame frame = new Frame( "JAVA: " + app.getClass().getName() );
    frame.add("Center", app);
    frame.resize(WIDTH,HEIGHT);
    frame.show();
    
    // Start the applet.
    app.init();
    app.start();
 
    ...   
  }

  ...

}


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to