Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在登录后尝试启动一个 jar。此操作由 Windows 中的任务计划程序执行。当我从他自己的目录运行这个 jar 时,它可以正常工作。当我登录时,JVM 给我以下错误:“找不到主类”和我的 jar 目录。我已经在清单中设置了主类。
我可以建议您使用描述的类路径和其他环境属性创建 .bat 文件。缺少 JAVA_HOME 属性的最常见问题。 带有描述的 JAVA_HOME 的 .bat 文件将帮助您避免任何此类问题。
另一种方法 - 只需检查 JAVA_HOME 是否设置为您的系统环境设置。