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 9 of 9

Thread: How to play a game imported from github into eclipse?

  1. #1
    Member
    Join Date
    Jan 2013
    Posts
    31
    My Mood
    Confused
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Lightbulb How to play a game imported from github into eclipse?

    Hi all,

    I've imported a game from github into eclipse. There are no errors in the class files. I wanted to know how do I actually run the game on my computer?


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How to play a game imported from github into eclipse?

    If you're interested in Java programming, do an Eclipse HelloWorld Tutorial to learn the basics of Java program construction and how to run one in the Eclipse IDE. If you just want to run a Java program from a runnable .jar file, either double-click the .jar file, or navigate to where the .jar file has been saved and try the command,

    java -jar filename.jar

    Good luck!

  3. #3
    Member
    Join Date
    Jan 2013
    Posts
    31
    My Mood
    Confused
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Re: How to play a game imported from github into eclipse?

    i do not see any .jar files after importing from github? :S

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How to play a game imported from github into eclipse?

    Okay. I must have mixed up your post in my mind with another I'd read recently, because you're right, you don't mention .jar files.

    The HelloWorld tutorial would still be useful. Are you interested in Java programming, or do you just want to know enough to run this game you've downloaded?

  5. #5
    Member
    Join Date
    Jan 2013
    Posts
    31
    My Mood
    Confused
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Re: How to play a game imported from github into eclipse?

    i want to work on a project and hence i asked. i've made simple java programs in the past but have never worked with a game. Even i was wondering how do i play it? i've got it set in eclipse, but want to see how it looks like now. should i provide u with the link?

    Github has all .java files...but i need the .jar file to be able to run it

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How to play a game imported from github into eclipse?

    Just curious what the objective was, and I don't need the link unless answering your question takes more than another post or two.

    Since you know a little about programming in Java using Eclipse, you should know to look for a class with the main() method. There may even be a readme file either in the project files or on the GitHub page that explains how to run it, get involved, etc. The class with the main() method probably has the same name as the game or modified slightly to suggest starting the game like RunTheGame or LaunchTheGame, something fairly obvious.

    Look around and come back if you can't find it.

  7. The Following User Says Thank You to GregBrannon For This Useful Post:

    hemla (October 6th, 2013)

  8. #7
    Member
    Join Date
    Jan 2013
    Posts
    31
    My Mood
    Confused
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Re: How to play a game imported from github into eclipse?

    I found the class with the main method, and converted the .java file into a .jar file...but it comes up with an error.

  9. #8
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How to play a game imported from github into eclipse?

    C'mon, what error? We can't read minds. And why the conversion to a .jar file? Start with running the project as you got it. Did you try running the project before converting to a .jar file? If not, why not?

  10. #9
    Member
    Join Date
    Jan 2013
    Posts
    31
    My Mood
    Confused
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Re: How to play a game imported from github into eclipse?

    I finally got it. I just had to export the .jar file from eclipse itself. And then i had to extract the manifest file too.

Similar Threads

  1. Replies: 3
    Last Post: March 1st, 2013, 11:01 PM
  2. Replies: 4
    Last Post: December 4th, 2012, 06:11 PM
  3. Replies: 0
    Last Post: May 22nd, 2012, 09:08 AM
  4. i like to play this game with my phone and i wanted to make a program to help me
    By Imreallyawesome in forum What's Wrong With My Code?
    Replies: 25
    Last Post: August 12th, 2011, 07:34 PM
  5. Imported Class of Components are Hidden
    By polaris395 in forum AWT / Java Swing
    Replies: 3
    Last Post: July 25th, 2011, 09:35 AM