I know this is a common issue, but i've tried many things to make this work.
Main Class name: Test
I've included a MANIFEST.MF
with Main-Class
attribute, as follows:
Main-Class: src.client.Test
Main-Class: classes.client.Test
Main-Class: client.Test
Main-Class: Test
None of the above worked.(the jar
is located in the deploy dir )
This is the contents of my project:
On my deployment profile i have included:
MANIFEST.MF
Test.class
, an external jar
that i'm using )Note: I'm using JDeveloper 12c IDE
Related posts i've tried but i couldn't make it work:
Could not find or load main class with a Jar File
Cannot run jar file: Could not find or load main class Hello
I mentioned correctly the Main-Class
attribute, although the Class-Path
was wrong.
The structure of the .jar
file is the following:
myjar/client/Test.class
myjar/META-INF/MANIFEST.MF
myjar/myexternal.jar
I Had to mention myexternal.jar
in my MANIFEST.MF
as follows:
Correct: Class-Path: ../myexternal.jar
Wrong : Class-Path: myexternal.jar
I don't know if that is making any sense, i shouldn't get an exception loading the main class because of the wrong way of mentioning myexternal.jar
Nevertheless this fixed it!