Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Win XP machine which has java installed on it. The problem that I cannot open jar files. It seems that association is broken. How can I launch jar files by using console. Or maybe there is a way to set a proper association.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

from the cmd line. run: java -jar java.app

share|improve this answer

You may have to add java to your path. I'm not actually sure how to do that - I'm more of a linux user. If what freedom_is_chaos suggested doesn't work then java isn't in your path and you need to add it. If you just want to run it and don't want to worry about whether or not it's in your path then you'll need to do: C:\full\path\to\jre\bin\java -jar yourJar.jar

share|improve this answer
3  
To add stuff to path, right click on My Computer, Properties, Advanced, Environment Variables, find Path and click edit. Add the full path to your java.exe to the end of what's there (look first and see if it ends with a semicolon, I forget). You also might have to enclose the path in " " if something in the path contains spaces. –  Dustin Aug 28 '09 at 15:02
    
:P stealer. But you're correct, I probably should have included the full path and all that stuff too. Recent Java installs should add it to your path though. –  David Rickman Aug 28 '09 at 15:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.