Hi everyone, Someone can help me?, I'm trying to g...
# tornadofx
g
Hi everyone, Someone can help me?, I'm trying to generate the .jar with intellij and maven, using artifacts, but when I double click on the generated file nothing happens. The program only works when run from intellij
d
Running a jar directly depends on your opearting system. Under Linux, it needs to be executable and binfmt has to be setup. I think under Ubuntu (and other Debian based systems) the package neede for that is
Copy code
binfmt-support
g
thanks, but im on windows and i can open others .jar. Only this is not working and i dont know why
d
Ah okay. Then it is probably missing a Manifest or the Manifest does not specify the main class.
When packaging using the manven-jar-plugin you can add a configuration to set the main class. IDEA (or other IDEs) know the main class by looking through the code and generting a run-configuration (IDE-specific) but regular java always wants to have the main class specified that should run (and this can be done via the Manifest which is added by that maven-jar-plugin)
g
the problem was i had JDK 8, 11 and 14 installed. i've uninstalled 11 and 14 and its work. I hope this will help others