我使用eclipse开发了我的java项目,并构建了一个可运行的jar。然后,我尝试使用gcj编译该jar。
stefan@api-1:/Sbox/Software/executables$ gcj --classpath=Sbo
xSpeakerDependent.jar --main=SboxInterface SboxSpeakerDependent.jar -o Test
/tmp/ccpTssYV.o: In function `main':
ccIqdepF.i:(.text+0x24): undefined reference to `SboxInterface::class$'
collect2: ld gab 1 als Ende-Status zurück但是SboxInterface是唯一一个有main-method的类,我在eclipse中创建可运行的jar时也放入了这个信息。
我可以尝试什么?我有点迷失了问题所在。
发布于 2013-06-01 10:26:57
确保类在jar中,并且将完全限定的类名传递给--main。这是两个最常见的错误。
https://stackoverflow.com/questions/14245277
复制相似问题