【问题标题】:Can't find or load main class com.codename1.impl.javase.Simulator找不到或无法加载主类 com.codename1.impl.javase.Simulator
【发布时间】:2018-05-04 11:52:33
【问题描述】:

运行命令时

java -cp dist/A1Prj.jar:JavaSE.jar com.codename1.impl.javase.Simulator com.mycompany.a1.Starter

在我的项目目录中,我遇到了错误

Error: Could not find or load main class com.codename1.impl.javase.Simulator

我的应用程序在 Eclipse 中运行良好。

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    如果这是在 Windows 上,您需要将 : 替换为 ;,这是 Windows 的正确路径分隔符。

    注意最后一个参数不再使用,我们现在使用codenameone_settings.properties文件中定义的主类。

    【讨论】:

    • 现在我收到了JavaSE.jar: The term 'JavaSE.jar' is not recognized as the name of a cmdlet, function...
    • 好吧,我觉得很傻,但问题是我使用的是 Powershell 而不是命令提示符。意识到这一点后,我切换并运行良好。感谢您的帮助。
    猜你喜欢
    • 2017-02-26
    • 2015-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-22
    • 2012-06-20
    相关资源
    最近更新 更多