commit-classpath
[Top][All Lists]
Advanced

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

[commit-cp] [bugs #9509] javah -classpath option does not work


From: Michael Koch
Subject: [commit-cp] [bugs #9509] javah -classpath option does not work
Date: Fri, 15 Oct 2004 16:51:48 -0400
User-agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)

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

/**************************************************************************/
[bugs #9509] Latest Modifications:

Changes by: 
                Michael Koch <address@hidden>
'Date: 
                Fre 15.10.2004 at 20:43 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
            Category | None                      | cp-tools


------------------ Additional Follow-up Comments ----------------------------
Moved into category "cp-tools"






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

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9509>
Project: classpath
Submitted by: 0
On: Mit 30.06.2004 at 16:30

Category:  cp-tools
Severity:  5 - Average
Resolution:  None
Privacy:  Public
Assigned to:  cbj
Status:  Open
Platform Version:  None


Summary:  javah -classpath option does not work

Original Submission:  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


Follow-up Comments
------------------


-------------------------------------------------------
Date: Fre 15.10.2004 at 20:43       By: Michael Koch <mkoch>
Moved into category "cp-tools"

-------------------------------------------------------
Date: Die 03.08.2004 at 02:19       By: Brian Jones <cbj>
This looks like another instance of gnu.bytecode apparently trying to 
instantiate a type it finds.












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

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







reply via email to

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