Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to make a program into a working .jar? (eclipse)

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to make a program into a working .jar? (eclipse)

    Hi everyone,
    I am new to these forums, I've been looking for an answer to this question for awhile so hopefully someone can help me out.
    I am relatively new to programming, I know my way around but have a lot to learn. I wrote a program the past two days to help me study my AP Chem terms so I can memorize them. The program is now fully functional and runs in Eclipse when i hit run. My question is how can i make my program run OUTSIDE of eclipse? I want to be able to make a .jar (or whatever is best) so that i can double click it and open it up. I assume it would have to use a command prompt or something (the program is ALL text, no jframes or anything like that) When I try to export it as a .jar file and run it, it shows up saying it failed to load the main class manifest and can't start. How can I make the program work? again all i want is to open a command prompt or something like that that displays text and allows user input of text. Hopefully you all understand what I am asking (It's difficult to describe). Please respond with your thoughts. Thanks again!


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How to make a program into a working .jar? (eclipse)

    In Eclipse, instead of export as a jar there should be an export option to export as an executable jar - this will configure the manifest file with the appropriate main class. For a look at how this works if you wish to do this without an IDE, see Running JAR-Packaged Software (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)

Similar Threads

  1. Replies: 3
    Last Post: September 19th, 2011, 03:42 AM
  2. working with GWT plugin for eclipse
    By hlahane.tshepo in forum Java IDEs
    Replies: 1
    Last Post: September 7th, 2011, 04:46 AM
  3. Code is working in Eclipse but when exported to Runnable Jar doesn't work
    By jjain.jitendra@gmail.com in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 24th, 2011, 07:12 AM
  4. how do i make my program to....
    By andys in forum Object Oriented Programming
    Replies: 2
    Last Post: November 26th, 2010, 10:31 AM
  5. Substring program, not working
    By Newoor in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 18th, 2009, 12:46 PM