I can't open .jar file on Windows 10 (I have tried everything like reinstalling Java and setting the default app to open it to be javaw.exe) and I don't exactly trust jarunner/jarfixer so I want to make a batch program which would detect whenever a .jar is being opened it would get the path of it and would run java -jar [pathtofile].
You'll need to execute this as administrator:
ASSOC .jar=jarfile
FTYPE jarfile=c:\java\java.exe -jar "%1" %*
setx PATHEXT "%PATHEXT%;.jar"
Just put the correct path to the java.exe
. Mind that you'll have to keep all your dependencies in the %classpath%
vatiable.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments