Author Topic: How do you run a .jar file?  (Read 5084 times)



Not every jar can be run just by double clicking on it (Good example: Minecraft, or Haven and Hearth). Please tell us exactly what you're trying to run or nobody will be able to help you.

ALL OF THE JARS I TRY TO RUN

dont run.

You still haven't even told us what this is for.

Tell us and we can help you.

Eh, Ill go look on google or youtube.

This happens for all of my jar files.
what, you just have a folder full of .jar's on your desktop with no clue what they were for?

what, you just have a folder full of .jar's on your desktop with no clue what they were for?
Whenever I download and try to run a .jar file, nothing happens.

for each file.
no matter what it is.

Replace the file path to java as it is on your computer, it is likely similar.
Code: [Select]
"C:\Program Files (x86)\Java\jre6\bin\Java.exe" -jar <name>.jarPut this into a notepad document and then save it as run.bat and place it in the same directory as the .jar itself.

Replace the file path to java as it is on your computer, it is likely similar.
Code: [Select]
"C:\Program Files (x86)\Java\jre6\bin\Java.exe" -jar <name>.jarPut this into a notepad document and then save it as run.bat and place it in the same directory as the .jar itself.
with the " in the beginning?



Open notepad.
Copy and paste that code.
Look at the directory shown ("C:\Program Files (x86)\Java\jre6\bin\Java.exe")
Look on your computer for where that is for you (Likely it is in just normal program files)
Replace the path there with the correct one.
Edit: Change the name in the code (<name>.jar) with the name of the .jar file you are trying to open
Save as "Run.bat"
Place the "run.bat" file next to the .jar file.
Open the "run.bat"
« Last Edit: April 29, 2011, 02:23:38 AM by pecon7 »

Open notepad.
Copy and paste that code.
Look at the directory shown ("C:\Program Files (x86)\Java\jre6\bin\Java.exe")
Look on your computer for where that is for you (Likely it is in just normal program files)
Replace the path there with the correct one.
Save as "Run.bat"
Place the "run.bat" file next to the .jar file.
Open the "run.bat"
I dont see any .exe file in it with the name of java or Java.exe

Open the file called java in program files and run a search for the java.exe
The results should show what the file path for it is.