I'm using IBM's Relational Application Developer (RAD) as my IDE. I have one Java class in my project and I named it extract.java. I have couple of library files and resources files associated with my project. I exported my project as a jar file using IDE and ran it through command line on solaris environment using following query:
$java -jar myFile.jar
I get the following error:
Failed to load Main-Class manifest attribute from myFile.jar
I saw suggestions that manifest file needs to be updated. I'm not sure what does that mean since I'm new to java and any help will be great.
PS: There are no errors when I run class as Java Application from IDE on windows machine.
In order to make a JAR an Executable JAR within RAD, do the following steps:
public static void main(String[] args)
method.This should create the Manifest file with the correct Main-class header. Run the JAR with the java -jar
command to make sure it's working.
Hope this helps.