代码之家  ›  专栏  ›  技术社区  ›  user6517192

无法加载我的Procfile所指向的主类

  •  0
  • user6517192  · 技术社区  · 9 年前

    以下是我的程序文件

    web: java %JAVA_OPTS% -cp target\classes;"target\dependency\*"
    

    但是当我在heroku中运行我的web应用程序时,我遇到了以下错误。

    Error: Could not find or load main class console

    主要。类在包中 info.socket.webmobile

    我键入时应用程序崩溃 heroku open 然后抛出错误 错误:无法找到或加载主类控制台 heroku run java console

    我怎样才能解决这个问题?

    1 回复  |  直到 9 年前
        1
  •  0
  •   codefinger    9 年前

    你的 Procfile 应包含以下内容:

    web: java $JAVA_OPTS -cp target/classes;target/dependency/* info.socket.webmobile.Main
    

    请注意,我已经添加了 info.socket.webmobile.Main 类,并将格式转换为更为nix友好的格式。