bug-classpath
[Top][All Lists]
Advanced

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

[Bug cp-tools/22758] New: javah -classpath option does not work


From: pinskia at gcc dot gnu dot org
Subject: [Bug cp-tools/22758] New: javah -classpath option does not work
Date: 1 Oct 2005 17:24:43 -0000

The -classpath option for gnu.classpath.tools.JavahMain does not appear to work.



Here is a simple test case.  Put A.java and B.java in a javahbug directory:



/* A.java */

package javahbug;

public class A {

  public void a() { }

}



/* B.java */

package javahbug;

public class B {

  public native A getA();

}



Now compile java->class in the javahbug directory:

jikes-sablevm -classpath .. A.java

jikes-sablevm -classpath .. B.java



If the classpath root (..) is added to the JVM classpath, it works:

sablevm -Y -c /usr/share/java/cp-tools.jar:.. gnu.classpath.tools.JavahMain -o 
B.h javahbug.B



But if you try to use the -classpath option to JavahMain, it does not:

sablevm -Y -c /usr/share/java/cp-tools.jar gnu.classpath.tools.JavahMain 
-classpath .. -o B.h javahbug.B

java.lang.RuntimeException: no such class: javahbug.A

   at gnu.bytecode.ObjectType.getReflectClass (ObjectType.java:60)

   at gnu.bytecode.ClassType.getModifiers (ClassType.java:67)

   at gnu.bytecode.ClassType.isInterface (ClassType.java:160)

   at gnu.bytecode.ClassType.compare (ClassType.java:770)

   at gnu.bytecode.Type.isSubtype (Type.java:292)

   at gnu.classpath.tools.Javap.getJNIType (Javap.java:686)

   at gnu.classpath.tools.Javap.writeHeader (Javap.java:553)

   at gnu.classpath.tools.Javap.generateJavahOutput (Javap.java:391)

   at gnu.classpath.tools.Javap.generateOutput (Javap.java:323)

   at gnu.classpath.tools.Javap.exec (Javap.java:136)

   at gnu.classpath.tools.JavahMain.main (JavahMain.java:28)

   at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)

   at java.lang.VirtualMachine.main (VirtualMachine.java:92)



Versions:

 jikes-sablevm 1.1.5-1

 sablevm 1.1.5-1

 classpath-tool 0.0.20020812-1

 linux 2.6.3-1-686


------- Additional Comments From from-classpath at savannah dot gnu dot org  
2004-08-03 02:19 -------
This looks like another instance of gnu.bytecode apparently trying to 
instantiate a type it finds.
------- Additional Comments From from-classpath at savannah dot gnu dot org  
2004-10-15 20:43 -------
Moved into category "cp-tools"
------- Additional Comments From pinskia at gcc dot gnu dot org  2005-10-01 
17:24 -------
Does anyone know if this still exist?

-- 
           Summary: javah -classpath option does not work
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cp-tools
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: from-classpath at savannah dot gnu dot org
                CC: bug-classpath at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22758




reply via email to

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