Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Main class not found #123

Open
1 of 3 tasks
kerner1000 opened this issue Jul 16, 2022 · 0 comments
Open
1 of 3 tasks

Main class not found #123

kerner1000 opened this issue Jul 16, 2022 · 0 comments

Comments

@kerner1000
Copy link

kerner1000 commented Jul 16, 2022

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:

Error: Could not find or load main class com.kerner1000.myapp.Launcher
Caused by: java.lang.ClassNotFoundException: com.kerner1000.myapp.Launcher

My Info.plist looks like this:

    <key>JavaX</key>
    <dict>
        <key>MainClass</key>
        <string>com.kerner1000.myapp.Launcher</string>
        <key>ClassPath</key>
        <array>
            <string>Java/myapp-0.6.4-SNAPSHOT.jar</string>
        </array>
        <key>WorkingDirectory</key>
        <string>$APP_PACKAGE/Contents/Resources</string>
        <key>JVMOptionsFile</key>
        <string>$APP_PACKAGE/Contents/Resources/MyApp.l4j.ini</string>
        <key>RelocateJar</key>
        <true/>
    </dict>

MANIFEST.MF inside the jar:

Manifest-Version: 1.0
Created-By: Maven JAR Plugin 3.2.2
Build-Jdk-Spec: 18
Implementation-Title: MyApp
Implementation-Version: 0.6.4-SNAPSHOT
Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: com.kerner1000.myapp.Launcher
Spring-Boot-Version: 2.7.1
Spring-Boot-Classes: BOOT-INF/classes/
Spring-Boot-Lib: BOOT-INF/lib/
Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx
Spring-Boot-Layers-Index: BOOT-INF/layers.idx

If I execute java -jar target/MyApp/MyApp.app/Contents/Resources/Java/myapp-0.6.4-SNAPSHOT.jar directly, the app starts normally.

Please tell us about your environment:

  • universalJavaApplicationStub version: latest from repository
  • macOS version: 12.4
  • Java version(s): 18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant