this is my first question and quite a weird one. I am developing a Java Application (with javafx) for multiple windows clients in a network. My goal is to run the built jar on every computer there. The problem is these PCs don’t have the exact same setup (although they should have). This does create some unexpected problems. In my last attempt I finally got an 80% success rate and the remaining PCs seem to have the same problem (hopefully).
So the problem: The software just doesn’t start, when I double-click the jar file. And I am not sure, what does exactly happen on double-clicks.
Weirdly the software does start, if I use a powershell prompt. Something like & 'C/:/programme files/openjdk/openjdk 11/bin/javaw.exe' -jar 'path-to-jar.jar'
. And it does also start with .../java.exe....
.
I can’t just use “java -jar”, because this seems to run another jdk-8 installation and currently my software is compiled with java 11.
So I do know, (most of) these PCs have three Java installations:
- OpenJDK 11
- OpenJDK 8
- Normal Jdk 8
And most of them just start on double-click. So my last ideas is, that somehow the remaining 20% runs OpenJDK8 instead of OpenJDK11, when I double-click the file. (I know it is not the normal jdk, because of the displayed icon on jar files). Before I start messing around with windows default starting programs of jar-files, I would like to check my assumption.
So long story short: Do you know a way to find out, what is exactly executed, when double-clicking a (jar) file? (Probably I should add, that I do have local admin privileges, but really don’t want to mess up something)
And small followup question: If I do set the starting program in the windows “Open with”-Dialog, should I choose the javaw.exe or the java.exe?
Thank you very much!
Nauran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.