2,429 questions
0
votes
0
answers
78
views
How do I convert a JavaFX application into an executable .jar file with all dependencies included?
I’ve built a modular JavaFX application using JDK 21 and JavaFX SDK 21.0.1. The project runs perfectly inside my IDE (IntelliJ IDEA), but when I try to export it as a .jar file and run it outside the ...
0
votes
1
answer
89
views
Cant run .jar file by double clicking (JavaFX projext)
The .jar file is not executable by double clicking , only by intelij
"C:\Program Files\Java\jdk-23\bin\java.exe" --module-path C:\Users\yacin\Downloads\javafx-sdk-24\lib --add-modules javafx....
-5
votes
1
answer
293
views
A Java Exception has occurred [closed]
I tried to run my jar by double clicking on it but I got "A Java exception occurred", I also tried to run it via command prompt (cmd) and it worked, the program ran fine. I already have the ...
0
votes
0
answers
50
views
Getting UnsatisfiedDependencyException when running spring boot executable jar
I have a executable jar which is bundled with 2 other of my own jars. Purpose of this is to migrate data from one postgres db to another. One of the other jar has datasource creation code, etc which ...
0
votes
1
answer
53
views
Distorted Tray Icon Image
I'm making an auto-clicker app that runs in the background with jnativehook in the tray, which can open up a java.awt app when the icon is clicked. That whole part works when run from vscode with run ...
0
votes
0
answers
36
views
How to read and write to SQLite database within jar file [duplicate]
I am using an SQLite database within my project. I have an application-sqlite.properties file which has:
spring.datasource.url=jdbc:sqlite:src/main/resources/database.db
Before I package my project ...
0
votes
0
answers
103
views
Making a JAR file from multiple Java files
I have 3 Java files named Myframe, SortingApp (which has the main function), and SortingVisualizationPanel. Ive converted the .java files to the .class files in another folder called classes. I've ...
1
vote
1
answer
55
views
maven: how to embed a jar dependency within another jar
I need to make an executable jar containing more jars embedded directly in it. I can't unpack the classes from within the original vendor's jars because it will break the signatures and functionality. ...
0
votes
1
answer
103
views
maven-jar-plugin: How to add classes in a zip?
Our legacy Ant build uses prebuilt Eclipse loader classes in a zip file. How can I add these to a executable JAR file with the maven-jar-plugin?
This is my current plugin config:
<plugin>
&...
-1
votes
1
answer
78
views
Jar File throws FileNotFoundException but eclipse does not
I use eclipse to do my java programming, last day i created a java program and i placed the /res folder to the root directory of the project, When i tested the program on eclipse it worked perfectly, ...
0
votes
1
answer
160
views
"Unknown option -jar" on running a Rust-Java JNI GTK4 application [closed]
Recently, I have been working on a small gui app that uses GTK4. This gui app uses a combination of Java and Rust (I am using the jni crate for interop).
I am creating the Gui window using the Gtk-rs ...
3
votes
2
answers
87
views
Why does my manually built runnable jar respond with "Error: Could not find or load main class" when the class exists?
This is one of those error messages that comes up a lot, but none of the question/answers address this particular situation.
I am creating a runnable jar from the contents of an Eclipse project.
When ...
0
votes
0
answers
72
views
.jar file opens only if I run it from the cmd console, but not if I double-click it
I've build a Java program (.jar) using maven, but it opens only by java -jar kalkulator-1.0-SNAPSHOT-jar-with-dependencies.jar and I want it to open by just double-clicking it.
I'm using Win10, java ...
0
votes
1
answer
244
views
(Springboot Gradle with Log4j2, Executable Jar) Could not find or load main class
I encountered the following error when I execute my JAR with
java -jar .\QuartzScheduler-0.0.1-SNAPSHOT.jar
Error: Could not find or load main class com.quartz.QuartzSchedulerApplication
Caused by: ...
1
vote
1
answer
121
views
I am developing springboot application using gradle and want to have both thin and fat jars with slight difference
I want this application to be deployed on the server and running as well and I want it to be used as a dependency jar in another project. I want to exclude the resources folder only in the dependency ...