error: cannot find file for class xyz
Brian Sullivan
bsulliv@bbnow.net
Sat Feb 22 06:10:00 GMT 2003
Hello,
I'm trying to compile something from bytecode (a .jar file) at the
moment, using the latest gcj for mingw at the thisiscool site. This is
a jar output by our Cobol compiler for Java.
I'm getting warnings about unreachable bytecodes. I understand warnings
about unreachable real source, but unreachable bytecode is not something
a gcj user should be concerned with. But those are only warnings.
The errors I get involve the fact that a class is not present:
[DashoPro-V1.2-120198]:0: error: cannot find file for class
com.legacyj.jfc.LMenu
and errors derived from the missing class, such as:
[DashoPro-V1.2-120198]:0: error: class 'com.legacyj.jfc.LMenu' has no
method named 'getJPopupMenu' matching signature '()Ljavax/swing/JPopupMenu;'
I know the class is not present; it shouldn't be. The runtime behavior
is to throw an exception when attempting to access it, recover, and go
on about our merry business; the .jar being compiled does execute
properly using any Sun or IBM Java (yes, even jview) on Windows, Linux,
etc. Is there a way to tell it that I want any unknown classes to be
attempted as interpretation, failing that to throw exceptions at runtime?
For the curious, the full log is given below.
C:\gcj\datetime>gcj --main=datetime datetime.jar
[DashoPro-V1.2-120198]: In class `com.legacyj.jfc.LComponent':
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.getLayoutManager()':
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 17 to before 20
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.getInt(java.lang.Object)':
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 120 to
before 123
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.getInts(java.lang.Object)':
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 198 to
before 201
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.getDouble(java.lang.Object)':
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 123 to
before 126
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.adjustColor(int,int)':
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 212 to
before 215
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 231 to
before 234
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.handlePopup(java.awt.event.MouseEvent)':
[DashoPro-V1.2-120198]:0: error: cannot find file for class
com.legacyj.jfc.LMenu
[DashoPro-V1.2-120198]:0: error: cannot find file for class
com.legacyj.jfc.LMenu
[DashoPro-V1.2-120198]:0: error: cannot find file for class
com.legacyj.jfc.LMenu
[DashoPro-V1.2-120198]:0: error: class 'com.legacyj.jfc.LMenu' has no
method named 'getJPopupMenu' matching signature '()Ljavax/swing/JPopupMenu;'
[DashoPro-V1.2-120198]: In method
`com.legacyj.jfc.LComponent.processKey(com.legacyj.jfc.LComponent,java.awt.event.KeyEvent)':
[DashoPro-V1.2-120198]:0: error: class 'javax.swing.JRootPane' has no
method named 'getDefaultButton' matching signature '()Ljavax/swing/JButton;'
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 61 to before 64
[DashoPro-V1.2-120198]:0: warning: unreachable bytecode from 88 to before 91
[DashoPro-V1.2-120198]: In class `com.legacyj.jfc.LWindow':
[DashoPro-V1.2-120198]: In constructor `(int,int,boolean)':
[DashoPro-V1.2-120198]:0: error: cannot find file for class
com.legacyj.jfc.LMasterWindow
[DashoPro-V1.2-120198]:0: error: cannot find file for class
com.legacyj.jfc.LMasterWindow
[DashoPro-V1.2-120198]:0: confused by earlier errors, bailing out
More information about the Java
mailing list