When I jar my program it doesn't run on double click, cmd, or from an IDE, but when it is not in jar form the program runs just fine in the IDE and using the cmd. I've linked the manifest to the main class correctly, but it still doesn't work. I've googled a solution for this for almost a week now and I am stumped but I believe it has something to do with JavaFX itself.
Asked
Active
Viewed 188 times
0
-
I believe those `--module-path`, `--add-modules`, and other options have to go _before_ the `-jar` option. Of course, if your code is modular then you don't need `-jar` but would instead use `--module`. – Slaw Dec 09 '19 at 04:38
-
I took away the -jar and moved the modules info in front and it still gives me the same error. I added a picture of my manifest as well. – Dnomruht Dec 09 '19 at 04:44
-
With regards to the command line, does anything [here](https://stackoverflow.com/a/55653652/6395627) help you? And as far as I can tell, there [is no support for executing modular JAR files with a double-click](https://stackoverflow.com/questions/53184325/how-to-make-java-module-jar-execute-by-clicking#comment93276207_53184325) (that behavior typically uses `-jar` and the classpath). – Slaw Dec 09 '19 at 05:26
-
Note there are different ways to deploy JavaFX applications—see [this answer](https://stackoverflow.com/a/53453519/6395627) and [this one](https://stackoverflow.com/a/54065502/6395627). – Slaw Dec 09 '19 at 05:30
-
1Resourcec paths are seperated with slashes (`/`) not backslashes (`\ `). Try replacing those backslashes with slashes in the manifest. Also make sure the package your class recides in actually corresponds to `bin/game/logic` – fabian Dec 09 '19 at 06:43
-
@Slaw The jlink is what I was looking for and not sure why I never came across it during my research since it's extremely useful. What surprises me even more is I have two Java books, the first being about basic topics and the second more advanced topics. The first book mentions making jars, modules, etc but nothing about jlink which I would assume would cover it or at the least the second booking would but nope nothing at all. – Dnomruht Dec 13 '19 at 03:11