Results 1 to 2 of 2

Thread: Jar in eclipse

  1. #1
    DMarsh12 is offline Member
    Join Date
    Mar 2011
    Posts
    43
    Rep Power
    0

    Default Jar in eclipse

    I am trying to run my program as a jar file and I am completely lost. I searched the forums and have searched the internet and youtube but can't seem to grasp the concept. From what I understand, jar files are what makes java so important in that they can be run on any platform. Now when I try to create mine in eclipse, after I hit finish I get the icon on my desktop but I can't run it. I have searched how to run said jar file but it still isn't working! I have tried downloading JSmooth and using the notepad Main-Class method. So far nothing is working! Can some one please explain to me how I can run this program to see what it looks like outside of java!? Any help is greatly appreciated.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Jar in eclipse

    Quote Originally Posted by DMarsh12 View Post
    I am trying to run my program as a jar file and I am completely lost. I searched the forums and have searched the internet and youtube but can't seem to grasp the concept. From what I understand, jar files are what makes java so important in that they can be run on any platform. Now when I try to create mine in eclipse, after I hit finish I get the icon on my desktop but I can't run it. I have searched how to run said jar file but it still isn't working! I have tried downloading JSmooth and using the notepad Main-Class method. So far nothing is working! Can some one please explain to me how I can run this program to see what it looks like outside of java!? Any help is greatly appreciated.
    You probably exported as a jar, rather than an Executable Jar (you can verify this by un-jaring the jar and checking the manifest file). You could just add a Manifest file specifying the main class to the created jar using the jar utility that comes with the JDK, or use the appropriate export in Eclipse (eg export as executable jar).

Similar Threads

  1. Replies: 2
    Last Post: 10-11-2013, 10:26 AM
  2. New Eclipse plugin: shared (and improved) Eclipse Templates
    By dougwightman in forum Java Software
    Replies: 0
    Last Post: 08-10-2011, 06:26 PM
  3. Replies: 0
    Last Post: 08-10-2011, 06:24 PM
  4. Replies: 4
    Last Post: 12-21-2010, 04:26 PM
  5. Eclipse Bug - Can't Read From A File Using Eclipse?
    By carlodelmundo in forum New To Java
    Replies: 6
    Last Post: 01-26-2009, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •