1

I'm trying to make a jar file association patch for a friend of mine, and when I test the batch file on my computer and try to launch a jar file, I get an error saying Unable to access jar file. But when I execute the instructions manually on the command prompt, the application launches perfectly. Am I doing something wrong here?

Here are the instructions I'm using:

ftype jarfile="C:\Program Files\Java\jre1.8.0_25\bin\javaw.exe" -jar "%1" %*
assoc .jar=jarfile

1 Answer 1

3

I just as a test wrote echo before each line to get an idea of what it was doing.

The %1 and %* are getting eaten up by the batch file as it replaces them with nothing. For Cmd like behaviour you need to use %%1 and %%*

Try %%1 and %%*

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .