У меня есть проблема. Я хочу создать нативный файл jar -image, для этого я пишу эту команду < /p>
native-image --no-server -cp C:\Users\Andrey\IdeaProjects\example\target\example-0.0.1-SNAPSHOT.jar org.example.Main
< /code>
Я пишу все это в программе «Командная строка нативных инструментов x64 для VS 2022». Он работает от имени моего администратора. После ввода команды я получаю ошибку: < /p>
========================================================================================================================
GraalVM Native Image: Generating 'org.example.main' (executable)...
========================================================================================================================
[1/7] Initializing... (0,0s @ 0,13GB)
Error: Main entry point class 'org.example.Main' neither found on the classpath nor on the modulepath.
classpath: 'C:\Users\Andrey\IdeaProjects\example\target\example-0.0.1-SNAPSHOT.jar'
modulepath: 'C:\Program Files (x86)\graalvm-ce-java17-22.3.1\lib\svm\library-support.jar'
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
< /code>
Но мои каталоги выглядят следующим образом:
Введите описание изображения здесь < /p>
Помогите мне, пожалуйста. Обычные приложения, не являющиеся пружинами, тихо строят
my pom.xml < /p>
4.0.0
org.springframework.boot
spring-boot-starter-parent
3.0.5
org
example
0.0.1-SNAPSHOT
example
example
17
org.example.Main
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-devtools
runtime
true
org.springframework.boot
spring-boot-starter-test
test
org.graalvm.buildtools
native-maven-plugin
org.springframework.boot
spring-boot-maven-plugin
org.apache.maven.plugins
maven-jar-plugin
3.2.0
org.example.Main
< /code>
java - версия: < /p>
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13)
OpenJDK 64-Bit Server VM GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13, mixed mode, sharing)
Подробнее здесь: https://stackoverflow.com/questions/760 ... -on-the-cl