My Sprinkler program is done and works fine in the IDE (Netbeans). The Sprinkler.jar file executes on the Mac OS (High Sierra) just fine. On the Win 10 platform, it doesn't do anything when I double-click it. Then I tried to run the following command from an administrator dos window, but errors out.
C:\Users\Mike\NetBeansProjects\Sprinkler\dist>java -jar Sprinkler.jar
Error occurred during initialization of VM
Here is what i have tried to correct this.
Set paths to the jre and jdk
In the Netbeans IDE, I checked to make certain the project run category had a main class defined as Sprinkler.Sp.
Tried running just "java" and got the same error. (looks like it's not actually a problem with my Sprinkler.jar)
Attached a JPG of the paths.
What else do I need to check?
posted 5 months ago
Also ran java -fullversion and the result is: java full version "1.8.0_172-b11"
BTW is there a way I can edit my own posts here instead of having to add another post for corrections/additions?
I uninstalled the jdk and the jre. Control panel shows nothing java
I reinstalled both and now the control panel shows both at version Java 8 172
BTW: this is a 64-bit Win 10 system
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
java full version "1.8.0_172-b11"
Now when I double-click the jar file I get a new task "Java (TM) platform SE binary"
But the program is still not displaying anything.
That revealed the problem!
There is code in my program that detects the OS and adjusts a couple items depending if it is running on Windows or something else. That code had a typo in the portion executed when Windows was detected. I could see the error message when using Java -jar Sprinkler.jar but I could bot see it when I just double-clicked the jar file.
Thanks for the help. Everything is working as it should now in both environments.!