I'm trying to create an Exe file for my JavaFX project, after building the artifacts I try to run the jar by java -jar name.jar
and I get the error at the title.
I was following the answer here What does "Could not find or load main class" mean? but nothing helped.
Then i tried to do this method https://www.youtube.com/watch?v=HuFOCEHh8Zg&feature=youtu.be and it still happened.
In the project i use mssql-jdbc-8.4.1.jre14.jar
, mysql-connector-java-5.1.49.jar
, jfoenix-9.0.10.jar
and of course the JavaFx lib.
The values of CLASSPATH in the system variable are : CLASSPATH
The libs at the project: libs
MANIFEST:
Manifest-Version: 1.0
Main-Class: MainPackage.Main
Class-Path: C:\Users\amttr\Desktop\pol\javafx-sdk-11.0.2\lib\* C:\Users\amttr\Desktop\pol\lib\*
Any suggestions?