cp-tools-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cp-tools-discuss] [bugs #9508] javah complains if native method called


From: anonymous
Subject: [Cp-tools-discuss] [bugs #9508] javah complains if native method called from static initializer
Date: Wed, 30 Jun 2004 12:24:00 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8

This mail is an automated notification from the bugs tracker
 of the project: classpath-tools.




/**************************************************************************/
[bugs #9508] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9508>
Project: classpath-tools
Submitted by: 0
On: Wed 06/30/2004 at 16:21

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Assigned to:  None
Status:  Open


Summary:  javah complains if native method called from static initializer

Original Submission:  If a static initializer calls a native method, then 
gnu.classpath.tools.JavahMain emits:
*** Couldn't bind native method Java_Foo_bar ***
*** or Java_Foo_bar__ ***

Here is a small test case:
/* Foo.java
 * Compile with:
 *   jikes-sablevm Foo.java
 *   sablevm -Y -c /usr/share/java/cp-tools.jar:. gnu.classpath.tools.JavahMain 
-o Foo.h Foo
 */
public class Foo {
  private static native void bar();
  static { bar(); }
  static void foo(int a) { bar(); }
  void foo() { bar(); }
}

If you comment out the static initializer, then javah gives no message, 
otherwise it gives the message above.  Note that static methods and non-static 
methods calling native methods are ok, it is only the static initializer that 
is causing the problem.

Versions:
 jikes-sablevm  1.1.5-1
 sablevm        1.1.5-1
 classpath-tool 0.0.20020812-1
 linux          2.6.3-1-686













For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9508>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]