# running java apps on windows 7

November 24, 2009 at 06:44:55
Specs: Windows 7, AMD 2.3GHZ 2GB RAM
 I have windows 7. on the vista i had when i couble clicked a java app (".jar") file it opened and run as normal.with windows 7 i have problems opening the file so how do i open it

See More: running java apps on windows 7

#1
November 24, 2009 at 08:49:48
 When you say you have "problems opening the file" what do you mean by "problems"?You probably haven't got the .jar file type association on Windows 7 that you previously had on Vista. This is how it is set up on my Vista machine:C:\>assoc .jar .jar=jarfile C:\>ftype jarfile jarfile="C:\Program Files\Java\jre\bin\javaw.exe" -jar "%1" %* You can either use REGEDIT or the above commands in CMD command prompt to set up the appropriate association.

Report •

#2
November 24, 2009 at 10:00:11
 they return the current values but how do i set the values.you see at mo jar files are associated with nokia application installer

Report •

#3
November 24, 2009 at 14:47:12
 I see what you mean. I hate the Nokia application installer. I had experienced exactly the same problem when I used to have a Nokia phone.The problem is developers who make invalid assumptions. In this case, Nokia arrogantly assumed that the only possible use you would make of a jarfile is to install games on your phone. You couldn't possibly be a Java developer or someone who runs Java applications by clicking on their jarfiles. No, there aren't people like that. Jarfiles are phone games. Well, Nokia, open your eyes, there are many Java developers out there who use jarfiles for much more serious purposes than your insignificant little games.Ok sorry about that, but saying it has made me feel better. Now back to helping you...Open a command prompt window using "Run as administrator", and then type:ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*Your javaw.exe file should be somewhere under the Program Files\Java tree, if you have installed the Java Development Kit. Otherwise, you can probably find it in Windows\System32. Use java.exe if you want your application to run in a console window, or javaw.exe if it has its own window.

Report •

Related Solutions

#4
November 25, 2009 at 17:24:36
 i tried that but now it returns an error saying "could not find the main class.."note this jar file worked fine on xp and vista but not on this window 7

Report •

#5
November 26, 2009 at 04:41:40
 That is strange. Are you sure it's the same file, not modified in any way?Try using the file from the command line, instead of clicking.Type:java -jar filename.jar

Report •

#6
November 30, 2009 at 06:51:18
 its working now. i just reinstalled java direct from theri website must have been problem with old installation

Report •