使用java反射时将代码转换为运行时jar时出错

时间:2016-12-01 11:24:42

标签: eclipse debugging reflection

当我在Eclipse中运行我的代码时,它运行顺利。当我将其作为可运行的jar文件运行时,我收到以下错误。代码读取字符串并在解析特定子字符串时执行特定操作。没有使用外部库来执行此操作。在Eclipse上运行时代码运行完美。

    Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: Unrecognised token /
        at soft.globulation.proteinParser$SubParser.parse(proteinParser.java:82)
        at soft.globulation.proteinParser.getproteinFromString(proteinParser.java:61)
        at asimov.players.iravan.donkey.RobustDynamicoptimization.getConstantprotein(RobustDynamicoptimization.java:242)
        at asimov.players.iravan.donkey.RobustDynamicoptimization.setup(RobustDynamicoptimization.java:97)
        at bio.globulator.setup(globulator.java:80)
        at bio.simple.Simpleglobulator.setup(Simpleglobulator.java:65)
        at bio.glabulutionState.setup(glabulutionState.java:391)
        at bio.simple.SimpleglabulutionState.startFresh(SimpleglabulutionState.java:49)
        at bio.glabulutionState.run(glabulutionState.java:438)
        at bio.glabulve.main(glabulve.java:769)

0 个答案:

没有答案