Results 1 to 5 of 5
  1. #1
    AvivC is offline Member
    Join Date
    Dec 2013
    Posts
    26
    Rep Power
    0

    Default A Runnable JAR file won't open after compiling in Eclipse.

    I created a program and compiled it to Runnable JAR. I made sure the configuration is the class with the main() method in the project, and made sure I was choosing Runnable JAR.

    After compiling, double clicking the file won't open it.

    Here's the Class with main():

    Java Code:
    import javax.swing.*;
    import java.awt.*;
    
    public class Starter extends JFrame {
    
    	public Starter(){
    		
    		setSize(500,500);
    		setResizable(false);
    		setTitle("Pong Battle");
    		setDefaultCloseOperation(EXIT_ON_CLOSE);
    		
    		Board b = new Board();
    		add(b);
    		
    		setVisible(true);
    		
    	}
    	
    	public static void main(String[]args){
    		Starter starter = new Starter();
    	}
    	
    }
    What could be the problem? Thanks a lot

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: A Runnable JAR file won't open after compiling in Eclipse.

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    AvivC is offline Member
    Join Date
    Dec 2013
    Posts
    26
    Rep Power
    0

    Default Re: A Runnable JAR file won't open after compiling in Eclipse.

    What's wrong with posting in more than one place?

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: A Runnable JAR file won't open after compiling in Eclipse.

    Quote Originally Posted by AvivC View Post
    What's wrong with posting in more than one place?
    People here are helping you, for free, in their spare time. Since you have posted this in multiple places without telling us where, we have no way of knowing what answers you've already received. That means we might be answering a question that you already figured out, or we might be repeating advice you've already received. We might be missing more information that you've given in another forum. That's a waste of your time as well as ours, which is why it's considered pretty rude. If you don't value our time, why should we spend that time answering questions you might already have the answer to, when instead we could be answering questions that haven't been posted elsewhere?

    This is the third time I'm linking you to the page explaining all of this: The problems with cross-posting
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,573
    Rep Power
    25

    Default Re: A Runnable JAR file won't open after compiling in Eclipse.

    Cross-posting is permitted. However, not telling all sites about the other sites is considered rude. Most of us do not like wasting time answering a question that has already been answered.
    Read the link on the other site.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 2
    Last Post: 10-11-2013, 09:26 AM
  2. Make a runnable jar of my project in Eclipse
    By buggedup in forum Eclipse
    Replies: 6
    Last Post: 07-22-2013, 02:00 PM
  3. Replies: 3
    Last Post: 05-07-2012, 06:07 PM
  4. Eclipse Indigo compiling ear
    By BenitoJuarez in forum Eclipse
    Replies: 0
    Last Post: 04-16-2012, 11:17 AM
  5. Including Recources into a runnable JAR using eclipse
    By Lucas_F98 in forum New To Java
    Replies: 16
    Last Post: 01-13-2012, 11:16 AM

Tags for this Thread

Posting Permissions

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