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?
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.
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?
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!
i do not see any .jar files after importing from github? :S
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?
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
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.
hemla (October 6th, 2013)
I found the class with the main method, and converted the .java file into a .jar file...but it comes up with an error.
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?
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.