Skip to content

Linux: Java is unable to find main class, when trying to run outside of netbeans, 0.4.11.3 #1858

@TeKett

Description

@TeKett

Running in netbeans works just fine, after i did some automated package import fix but i cant recreate it to tell you exactly what i did, but it was related to imports not being in scope, but trying to run either my built jar or your distributed jar fails (hence why i cloned the dev into netbeans) with Error: Could not find or load main class .home.user.NetBeansProjects.liliths-throne-public.target.lilithsthrone-0.4.11.3.jar The java version does not seem to matter, i tried jre, 21 and 25.


running the launcher directly fails with

.java:3: error: package com.lilithsthrone.main does not exist
import com.lilithsthrone.main.Main;
                             ^
/home/user/NetBeansProjects/liliths-throne-public/src/com/lilithsthrone/Launcher.java:14: error: cannot find symbol
        Main.main(args);
        ^
  symbol:   variable Main
  location: class Launcher
2 errors
error: compilation failed

and running the main directly fails on every single import.

build in netbeans says
6 problems were encountered while building the effective model for org.openjfx:javafx-base:jar:linux:18.0.2 during dependency collection step for project It still runs fine though

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions