Reputation: 8577
As I understood, I need to make a jar file in order to get the .exe.
My problem: I have the method:
public static void main(String[] args){
in EX1 class. When I make: Export --> Java --> Runnable Jar file
, the class EX1 is not one of my options. What can be the reason?
Thanks
Upvotes: 2
Views: 1543
Reputation: 1049
just to put things clear: An Jar file ist not an exe!
To your problem: Eclipse will only provide you the class in the drop down list if you had run these main class at least once directly from eclipse.
These means: Run As / Java Application
After that the class should appear in the drop down list.
Upvotes: 0
Reputation: 4180
Java doesn't have exe files; you'll have a runnable jar; a xxx.jar file. You can execute it as follows:
java -jar xxx.jar
also, to be able to export the runnable jar, you might have to make a run configuration first...it's somewhere in the menu or icon shortcuts of eclipse
Upvotes: 6