I can't open or run my .jar file.
I just installed java, but I tried to open the .jar with other programs first, so the double-click defaults to something else and I can't change it back.
java -jar myfile.jar`
Above command returns:
'java' is not recognized as an internal or external command, operable program or batch file.
Is there a way I can still open/run this?
e: OS is Windows 8.
Also, I downloaded the .jar file; didn't create it myself (if that's relevant) Not sure if it contains an executable (but I think it does).
I understand your frustration regarding this issue and I'll do my best to help. Once installed, right-click on the . jar file and select "Properties" > under the General tab, check if you'll have the option to Unblock the file, select OK, then try again.
you can use the command prompt:
javaw.exe -jar yourfile.jar
Hope it works for you.
There are two different types of Java to download: The JDK, which is used to write Java programs, and the RE (runtime environment), which is used to actually run Java programs. Are you sure that you installed the RE instead of the SDK?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With