Results 1 to 1 of 1
- 12-04-2009, 03:06 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 19
- Rep Power
- 0
Creating an executable jar file in IntelliJ IDEA
Greetings, fellow javers!
I am trying to read up on how to create executable jar files, but almost every tutorial or instruction is a step-by-step guide which should be executed from the command string.
I would very much appreciate, if anyone could explain how to create an executable jar file in IDEA from a most simple IDEA project. It can just be the Main.java class. All I want my standalone jar application to be able to do is to open a console window, basically just print a string
Lets say that is my Main class
All I want my jar file to do when I double click it is to write the line "I'm in class Main method main(String[] args)" in the console window.Java Code:public class Main { public static void main(String[] args) { System.out.println("I'm in class Main method main(String[] args)"); }
As I understand from what I have read upon the subject, the jar file must contain all the compiled classes my application uses and a MANIFEST.MF file, which should contain the information about which class is the entry point(contains main(String[] args) for example). I've compiled my Main.java into Main.class, created the MANIFEST.MF file. I have then put both of these files in a jar archive. That archive doesn't execute neither from the explorer, nor from the cmd.
Please point out what I am doing wrong.
When I try to create a jar file in IDEA, it creates a jar file with MANIFEST.MF in it with a correct path to my main class, and another jar file called HelloWorld.jar, where HelloWorld is the name of my IDEA project.
If you can help explain how to make an executable jar file in IDEA, or manually, please reply to this post.
Hope I made myself clear enough for everyone else to understand.
Best wishes,
Andrew
Similar Threads
-
Need help for creating executable xml
By patilsubh in forum XMLReplies: 3Last Post: 10-01-2009, 10:54 AM -
Using GWT with Intellij IDEA
By turanan in forum IntelliJ IDEAReplies: 0Last Post: 07-13-2009, 07:51 PM -
IntelliJ IDEA or Eclipse
By Ciwan in forum IntelliJ IDEAReplies: 13Last Post: 04-26-2009, 11:59 AM -
Modifying JSP using IntelliJ IDEA 6.0.5
By ddeokarb in forum IntelliJ IDEAReplies: 0Last Post: 11-28-2008, 01:26 PM -
creating executable jars from Swing programs
By gotenks05 in forum New To JavaReplies: 2Last Post: 09-19-2008, 01:51 AM


LinkBack URL
About LinkBacks

Bookmarks