I have the following problem: I wrote a program in Java for a community and they're trying to run it. They installed Java and tried double clicking it but nothing happened.
Under my remote supervision, we tried the following things:
Right click -> open with -> java(w)
Control Panel -> Default Programs -> Associate a file type or protocol with a specific program -> .jar -> \path\to\java\bin\java(w).exe
assoc .jar=jarfile ftype jarfile="C:\path\to\java\bin\java(w).exe" -jar "%1" %*
All of the above once more after reinstalling java and rebooting, and also after deleting the registry key
All of these were tried with java.exe and javaw.exe.
It works without a problem in cmd.exe
java -jar program.jar.
I also tried to create a batch file with
@ECHO OFF java -jar program.jar
that is in the same directory as my program. We also tried to do
java.exe -jar program.jar (in the batch file).
When we used java, a cmd window popped up but nothing else happened; with javaw nothing happened. It was just that the mouse cursor switched to the loading symbol and then changed back. Afterwards, there were no java processes.
I had sent them an email where I told them to delete the
jar_auto_file classes from the registry in
HKEY_CURRENT_USER/Software/Classes but it didn't help.
I just had another call with the community and I tried getting more information why the program crashes.
So we added
pause to the batch file but nothing special (considering the history of this pc) happened.
The file looked like this:
@ECHO OFF java.exe -jar progam.jar pause
During the execution of this program, a console window popped up and disappeared once more.
pause didn't work apparently...
I also tried to use
cmd /k instead of pause or switched the last two lines (first
cmd /k then
java ...) to no avail.
The last try was starting cmd by hand and executing
cmd /k program.bat (yes, the batch file) to see if it would give me an error message.
But it simply repeated the path of the bat-file and that's it.
In the meantime, they installed java on a similarly configured pc and there, it worked like it normally would (java installed, double click on jar, done). So, I'm at the end of my wits, please tell me if you have any more ideas of what to test. Now it isn't so much about solving the problem for my customer but more a morbid interest in what the problem really is...