I know this has been asked before, but I can not find an answer and it is getting a bit tedious. I have tried using eclipse to export it, and also using cmd to generate it myself, but I always get an error when trying to run. "Invalid header field" or "could not find or load main class". What I am trying to do is link a Java program, and a separate file for the class. "ScreenRobotProgram.java" and "ScreenRobot.class". These are both in the package "ScreenRobot". So, how can I link these to an executable Java program? Help would be very much appreciated. Thanks.
Asked
Active
Viewed 34 times
-1
-
Okay Acewin, but as I said in my original question, these methods don't work (I have done them correctly, multiple times) and I just get error codes when I try and run the program. – Danny Wilson Oct 30 '15 at 12:25
-
then you should post the method you are following and the error you have been getting rather than ask question how to generate executable jar – Acewin Oct 30 '15 at 16:20
1 Answers
0
You really need to learn what GOOGLE is
All possible ways to generate executable
Generate Java executable through Java commands
Generate Java executable through ant
Generating Executable Jar in Eclipse
Generate Java executable through Maven OR Create an executable JAR with dependencies using Maven?