- BASICS
- Classes
- Objects
- Arrays
- Variables
- Loops
- Numbers
- Strings
- Exceptions
- Regexp
- OOP
- Inheritance
- Polymorphism
- Static Keyword
- Abstract Keyword
- Interfaces
- Constructors
- Packages
- Nested Classes
- Final Keyword
- SWING
- Frame
- Panel
- Listener
- Combo Box
- Label
- Image
- Menu
- Table
- Layout
- Drawing
- Timer
- Designer
- COLLECTIONS
- Lists
- Comparable
- Sets
- Maps
- Generics
- Properties
- Streams
- Json
- COMPILER
- Sublime Text
- Apache Ant
- I/O
- Streams IO
- Socket
- Watching Files
- Logger
- Clipboard
- Encrypt
- JAVAFX
- Openjfx
- Scene Builder
- First App
-
Jar Archive
- On Action
- Change Listener
JAR
Add archive plugin dependency to your Maven project (pom.xml).
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>/usr/share/openjfx/lib/</classpathPrefix>
<mainClass>com.example.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
Build
Use package command to build the project.
mvn package
You may test the newly compiled and packaged JAR with the following command:
java --module-path /usr/share/openjfx/lib/ \
--add-modules javafx.controls,javafx.fxml \
-jar ./target/java-pages-1.0.jar
Netbeans
Download JavaFx SDK from gluonhq.com Netbeans > Tools, Library, New Library: JavaFX17 Create Java Project (Ant -> Java Application). Don't use JavaFx Project (not ready yet). Properties / Libraries / Compile / Add Library to ClassPath Netbeans / build.xml / Package for store.
cd ~NetBeansProjects/HelloFx
java -jar store/hellofx.jar
Last update: 580 days ago