I wrote a small program for the desktop on TornadoFX . I can not understand how to generate a jar in IntellJ Idea . I tried the standard way with the generation of the usual jar rtifact, but they do not start ( linux says that there is no manifest, although it was). Experience with JavaFX and TornadoFX had not previously, so I ask for any help.
2 answers
The best way to rewrite a project in Maven .
1 - Create a Maven project (see the steps to "Turning into a Web Project")
2 - Add the following structure to pom.xml :
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.0</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>ЗДЕСЬ.ПИШЕМ.ПУТЬ</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id> <!-- this is used for inheritance merges --> <phase>package</phase> <!-- bind to the packaging phase --> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build> In the structure above, find ЗДЕСЬ.ПИШЕМ.ПУТЬ . ЗДЕСЬ.ПИШЕМ.ПУТЬ . Instead, you write the path to the class being run. For example, your class is in java->com->example->Main.java , then we write in pom.xml <mainClass>com.example.Main</mainClass>
It seems from here I copied this structure
Continued under the picture
Next, on the right side of the screen in a narrow panel, find Maven . 
In it, cut Lifecycle and click on install .
After install you will generate two files: just jar and jar-with-dependencies. You need a second file if additional libraries are used in your library. You can find files in the target folder (this folder will appear above pom.xml ) 
That's all! It should work (it works for me personally.)
PS This is offtopic. See how to work with Maven. If earlier you constantly downloaded the jar-library from Ineta, then you connected it through artifacts ... In Maven you just write a dependency and the library itself is downloaded into the computer and connected to the project.
For example: https://mvnrepository.com/artifact/org.json/json/20180813
pom.xml will be written as:
<dependencies> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20180813</version> </dependency> </dependencies> You can see that this library has downloaded by clicking on External Libraries on the left side of the screen.
In IntelIJ using the CTRL + ALT + SHIFT + S key combination we get into the project structure. Go to the Artifacts point. Click on Add (green plus), select JAR and select from modules with dependencies. In the pop-up window, select the main class. Click OK, close the window. Another window pops up, in which we click Apply, we close this window. Setup is complete. Go to the Build item. Choose Build Artifact, then Build.
The executable file will be generated in the out / Artifacts directory. Problems may arise if the project is importing any package. but this import is not in the classpath. If the JAR does not start, go to the project structure, select Modules -> Dependencies -> Add -> Project Libration -> Attach JAR
If suddenly your console application, and you want to launch it not through the console, you will need to create a bat file in which to register the following command
java -jar filename.jar And run the file .bat.
