• Post Reply Bookmark Topic Watch Topic
  • New Topic

Play/Test Java games on PC  RSS feed

 
Ray Vermey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello JavaFriends

i have a very basic question i hope.
I have some .jar files which are games. How can
i play/test/preview these games on my PC (WindowsXP) ?

Thanx in advance for answers

Ray
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

1) Make sure you have a Java Runtime Environment (JRE) on your machine. You can get the latest from Sun.

2) Open a command window, set PATH to make sure that the JRE bin directory is in your path. Enter "java -version" to make sure it's working. You should see some info about version 1.5.0 or whatever you downloaded.

3) Change your current directory to the folder the jars are in. Try "java -jar yourJarName.jar". If the jar is set up right it will run.

If they don't run they might be written as applets or you might have to find out the classname and arguments required to run them. Let us know how it goes!
 
Ray Vermey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! I will try it out!

Ray
 
Ray Vermey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, i tried it out at home.
When i start the java -jar command, there is this
errormessage that some Class can't be found.
For clarifaction: i have some Java games for my mobile phone.
Instead of uploading them to my phone, i want to try them first.
So can it be these games are applets??
And if yes, how can i preview/play them on my computer?

Thanx again

Ray
 
Giovanni De Stefano
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I actually thought you were talking about phone games in your first post!

Well, for sure you can't do that as if it was a 'regular' jar file, you should look for a cellphone emulator which can let you test software before you upload it to your cellphone, if you have a Nokia phone you should give a look at the Nokia Forum.

I hope this helps, one way or another, if you don't own a Nokia phone, try to search the company's website for emulators and similia.

Giovanni
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ray Vermey:
Well, i tried it out at home.
When i start the java -jar command, there is this
errormessage that some Class can't be found.
For clarifaction: i have some Java games for my mobile phone.
Instead of uploading them to my phone, i want to try them first.
So can it be these games are applets??
And if yes, how can i preview/play them on my computer?

Thanx again

Ray


This post is quite vague. When reporting an error message, you need to give the EXACT message in order for us to be able to help you. Telling us that "some class cannot be found" isn't enough.

Since these games were written to play on a cell phone, you need an emulator to be able to run them on your computer. They should run with Java 2 Micro Edition, which you can also download from Sun's website. You will probably need to download both Mobile Information Device Profile (MIDP) v2.0 and Java 2 Platform, Micro Edition Connected Limited Device Configuration Version 1.1 Reference Implementation in order to run these. Both downloads should come with setup instructions, but if you get stuck let us know.

Layne
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!