Spring Boot Jar将无法在AWS Linux机器上运行

时间:2019-07-15 03:32:20

标签: linux spring amazon-web-services spring-boot jar

我只是尝试将一个简单的Spring Boot生成的jar上传到我的新AWS Linux机器上,但是无法运行。我只是运行Gradle'bootJar'任务来创建jar。我可以使用java -jar在Mac上运行该jar,但无法在VM上运行。请参见以下异常:

data: 0000000000407980
accessing 16 bytes in a cache line:
i =  0, cycles: 214
i =  1, cycles: 41
i =  2, cycles: 40
i =  3, cycles: 42
i =  4, cycles: 40

这是我的Gradle文件的内容:

Exception in thread "main" java.lang.ClassNotFoundException: com.api.vmtest
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:92)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:45)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:86)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)

0 个答案:

没有答案