After installing an update to java, I can't run any jar files. I now get a message 'Could not find the main class. Program will exit.' I tried a full uninstall of java and reinstall (a couple times but it's still not working. Anyone know why or how to fix it?
which is older than what you seem to be having trouble with.C:\Users\Fronobulax>java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)
You might also tell us a) how you are trying to run the jar file and
b) whether you can run any jar file at all?
java -jar "name_of_the_jar_file"
java -version
You might try opening a command line, navigating to the directory where the jar file is and trying
to run things. Not sure it will work but worth a try.Code:java -jar "name_of_the_jar_file"
While the command line is open, also try
just to confirm that you are running the latest update.Code:java -version
Finally, it might be worth opening Control Panel and the Add/Remove equivalent for Windows 7 (which I forget at the moment) and seeing just which Java versions are installed.
And since someone over on the main game forums mentioned netbooks I hope you have an appropriate amount of memory.
Based up what you have said so far, I'm pointing a finger at Java, not mafia, although that still doesn't help get you up and running.
If "none of that worked" includes just opening a command line and doing java -version then I would throw up my hands in despair. I would then back up my system. I would then uninstall any Java that the Control Panel says is installed. When that is done I would root around in Program Files (both types if 64 bit) and my User directory looking for directories that Java might have created and delete them. I would then repeatedly run my registry cleaner of choice (I'm partial to CCleaner myself) until it found nothing to delete. I would go into the Computer's Properties and delete any Java related environmental entries including portions of the PATH and variables such as Java_Home. I would reboot, repeat the registry exercise and then install whatever the latest version of Java is. This could solve the problem and it certainly would make me think I had done something.None of that worked unfortunately.
If "none of that worked" includes just opening a command line and doing java -version then I would throw up my hands in despair.
Java -version "worked" in that it displayed the appropriate information. It didn't work in that none of it fixed my issues.
That was the expected result. He was trying to figure out what's up with your setup before giving more info about what you could do to fix it. Since java -version does exactly what it should do, none of the rest of what he posted is likely to be relevant to fixing your setup.
Yep. If java -version returns something related to version 6, revision 18 or however it is being labeled, that suggests to me that Java may be properly installed.
At this point, I would consider finding some software that is packaged as a jar file and seeing if it can be successfully launched by double clicking on it. That might cut down where to look for your problem. I'd look at Java demos from Sun as candidates. I won't make a specific suggestion at this point since I can't run it myself at the moment and don't want you to try something of my choice and have it do nasty things.
Robocode is a fairly interesting application in and of itself, but the installer is available at SourceForge as a jar file. It is a large file for a quick test but you could DL it and start the install. If you get to the point where it asks you what directory to install in then you have demonstrated there is at least one jar file that can be launched from your configuration and (much to our surprise) the finger swings back towards mafia. If you can't run it then it pretty much points the finger at your configuration or the v18 update.The only files I was able to find were here http://java.sun.com/applets/jdk/1.4/index.html and didn't seem downloadable (or at least they didn't download as jar files when I tried). They did work in browser though. This is highly frustrating.
Use the 32-bit version of Java.
I have 64-bit Vista and had *huge* problems with 64-bit Java and Mafia.
The machine does "way less stupid shit" when I use the 32-bit version.
Not a good technical explanation, more an observation.
Robocode is a fairly interesting application in and of itself, but the installer is available at SourceForge as a jar file. It is a large file for a quick test but you could DL it and start the install. If you get to the point where it asks you what directory to install in then you have demonstrated there is at least one jar file that can be launched from your configuration and (much to our surprise) the finger swings back towards mafia. If you can't run it then it pretty much points the finger at your configuration or the v18 update.
I just DL'd the file to the desktop and then double clicked on it to launch. Obviously, I personally am willing to trust a jar file from SourceForge, especially after it passes a virus scan.
I believe I am using the 32 bit version. Is there any way to double check?