All Questions
18,881 questions
0
votes
2
answers
104
views
H2 Database connects in IDE, but not from console or as a JAR file [duplicate]
I'm trying to make a Maven project that connects to an H2 database. In an IDE this works fine, but when executing the compiled project in the terminal, or when building the project into a JAR file and ...
0
votes
0
answers
34
views
Android project using untiy-classes.jar (generated by Unity) with some classes that can't be resolved
I work on a small android project that uses the unity-clases.jar generated by Unity. Some (not all) of the files/classes in the .jar can't be resolved when compiling the android project and I don't ...
1
vote
1
answer
65
views
How to correctly incorporate GroupId in a JAR file using Gradle?
I have 2 projects, a LibraryProject and an ApplicationProject. ApplicationProject needs LibraryProject as a dependency.
In the LibraryProject, the build.gradle contains:
group = 'com.company.product'
...
3
votes
1
answer
111
views
What is a .so file in Java projects, and how can I use an old JAR that depends on .so files in Spring Boot?
I have an old Java JAR file that depends on .so files (shared object libraries).
I understand .so files are native libraries (written in C/C++), and the JAR uses JNI (Java Native Interface) or JNA to ...
0
votes
0
answers
106
views
How to overwrite or delete an existing package version in GitLab Package Registry from CI/CD?
I have a GitLab CI/CD pipeline that builds and deploys a package into the GitLab Package Registry.
For a specific (and temporary) use case, I need the pipeline to delete the package from the registry ...
0
votes
0
answers
62
views
kotlinc cant compile file with more 1 path to .jar in -cp or -classpath flag
Problem description: When using the Kotlin compiler (kotlinc) of any version from the command line (not IntelliJ IDEA, but a separate folder with a .bat file), and when specifying multiple libraries (....
1
vote
1
answer
103
views
Unable to install. Invalid file. J2ME Application
I was making a J2ME MIDlet application. I wrote the code, compiled it to Java 1.2 bytecode, prevrified it and then packed it into jar. But when I sent it to my Nokia N72, it said: Unable to install. ...
0
votes
1
answer
20
views
Duplicate classes from commons-io 2.19.0 and 2.4 — how to resolve cleanly?
Build fails with hundreds of “Duplicate class …” errors showing both:
commons-io:commons-io:2.19.0 (transitive)
commons-io-2.4.jar (in libs/ via implementation fileTree(dir: 'libs',
include: ['*.jar'...
-1
votes
1
answer
55
views
Main class in an eclipse plugin
I have made an Eclipse plugin. Now I want it possible to also run it as a standalone app using java -jar.
However the classes are packed in the bin/ folder inside the jar, and I get a ...
0
votes
1
answer
104
views
Can't create any .jar on IntelliJ Fabric Minecraft modding
So lately I've been trying to make a little custom mod for Minecraft 1.21.1 with Fabric Kotlin and after checking everything working completely I wanted to create the .jar to share with a friend but ...
0
votes
1
answer
141
views
JAR file can not access to a given directory
I made a Java application that loads image files from a directory called "images".
If I compile and build in this way it works:
javac Swing.java
java Swing
Conversely, if I compile and ...
0
votes
1
answer
153
views
How do I fix build failed with an exception?
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':gradle:jar'.
Entry FlutterPlugin.class is a duplicate but no duplicate handling strategy has been set.
It is an ...
1
vote
0
answers
102
views
Install and start a spring boot java jar as windows service using winsw
I have a spring boot application jar and I'm trying to install this as a windows service and start automatically, using winsw.
My xml for winsw:
<service>
<id>myservice</id>
<...
2
votes
3
answers
179
views
Flutter webview_flutter_android Failed to create Jar file
When trying to launch a Flutter app on a real Android device I get the following issue.
Flutter version 3.27.4
AGP version 8.1.0
classpath 'com.android.tools.build:gradle:8.1.0'
Gradle version 8.2.1
...
0
votes
0
answers
74
views
JSchException: Authentication failure [duplicate]
I am getting an error when trying to establish connection to a remote server using jcraft.
com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:519)
...
0
votes
0
answers
66
views
Launch a java jar downloaded locally, as it if was run from a web browser? [duplicate]
Is it possible to launch a local jar as if it was run directly from a web browser. Is there some way to pass the URL as a variable to it to make it think it was?
It seems that java jar's don't work ...
0
votes
0
answers
92
views
Does not find a class when starting Fat-Jar in JavaFx [duplicate]
I have a JavaFX application. I want to create a JAR file, for this I used the Maven Shade Plugin to create a fat JAR.
This is the structure of my project:
pom.xml:
<project xmlns="http://...
2
votes
1
answer
197
views
Why can't I "requires com.google.gson" when using gson-2.13.1.jar in Eclipse 2024-12 without having to rename the file?
Hardware/Software setup:
IDE: Eclipse IDE Version 2024-12 (4.34.0)
JDK: jdk-21
OS: Windows 11 Pro 24H2
CPU: 12th Gen Intel(R) Core(TM) i5-12600KF
Background/Project Configuration
I created a ...
0
votes
1
answer
72
views
Error creating JAR for Spring Boot + JavaFX application
I'm building a Spring Boot 3.4.5 application with a JavaFX GUI. What I'm essentially trying to do is start the app with GUI which has the buttons to start/restart/stop the Spring Boot server. The app ...
0
votes
1
answer
94
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....
1
vote
1
answer
80
views
How to call varargs method in ByteBuddy in a way that bakes the arguments array as constants into the bytecode?
I'm generating classes with ByteBuddy. In one place, I need to call a static utility method which accepts varargs of type String. My code looks like this:
String[] myStringArray = generateParameters()
...
1
vote
2
answers
65
views
Loading a jar file into a kotlin unit test
I'm working on a kotlin application to send data to a third party application. The vendor has provided a jar file that we will need to run in order to actually transmit the data to them (for more ...
1
vote
0
answers
62
views
How do I execute a jar file as part of a kotlin application?
Quick background: I'm working on an application to upload some csv data to a third party vendor. We have an AWS S3 bucket that watches for file uploads and the triggers a Lambda. The lambda then runs ...
1
vote
2
answers
203
views
Unable to package Log4j2 in maven project
This was my original pom.xml file I started with:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=&...
0
votes
1
answer
129
views
Gradle ShadowJar is Missing One of My Internal Dependencies
I'm using Gradle ShadowJar (version 8.1.1) to create a fat JAR for my application. I have two internal dependencies, com.idsk.lib.user:lib:0.0.1-SNAPSHOT and com.idsk.lib.client:lib:0.0.1-SNAPSHOT, ...
0
votes
0
answers
94
views
Java Spring app - Load it's jar file or get it's path at runtime
How to load jar file (the one the app was launched from) or get it's path at runtime?
Or
How to get a dependency jar at runtime from BOOT-INF/lib directory?
Our use case is that we have a Spring Boot ...
-1
votes
1
answer
289
views
Problems with adding custom plugin to dbeaver /plugin folder
I'm trying to develop a custom plugin for DBeaver. I prepared a simple Hello World plugin and can not run it in my local dbeaver instance.
I tried to add it to /plugins directory in my DBeaver folder, ...
0
votes
0
answers
68
views
Trying to reference PDFBox library in VS Code - error thrown
I am trying to use the Apache PDFBox JAR, but get an error when I compile the code.
I have downloaded the JAR (pdfbox-3.0.4.jar) and put it in the root directory for my Java project. In VS Code, I ...
-1
votes
1
answer
107
views
How to copy/use a local jar file to a kubernetes pod directory (minikube on mac)
I'm trying to have a kubernetes deployment to work, on a mac with minikube, and using a jar file located in a local host directory:
apiVersion: apps/v1
kind: Deployment
metadata:
name: master
spec:
...
0
votes
1
answer
69
views
mvn deploy:deploy on an existing correct jar results in corrupt jar in artifactory
I would like to upload, deploy an existing jar to artifactory.
There is a pipeline from a third party, I have no control over whatsoever, which step 1 will build a jar. The jar is then put on a host, ...
0
votes
0
answers
44
views
Reason of ClassNotFoundException occur after updating JAR file, even though the enum class content and path are identical?
The question is not asking for a solution.
I have a Spring Boot application running on a server. I replacing the old JAR file with a new one. After doing this, even though the enum class in the new ...
1
vote
3
answers
113
views
Add sources for unmanaged JARs in SBT
I'm setting up a build.sbt where I need to have a bunch of managed JARs on the classpath. I basically have two large folders containing all of the JARs and then also the source JARs.
myManagedRoot
|- ...
1
vote
0
answers
38
views
Maven creates two JARs but sets both to the same main class. Why?
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${project.basedir}/src/main/assembly/a....
0
votes
0
answers
54
views
how to upload spring boot artifact in nexus repository then use them in other spring boot project
I uploading a spring boot project jar in nexus repository, and when use it as dependency in an other project locally, it doesn't recognize the import statement even though it fetch the dependency from ...
0
votes
1
answer
38
views
Multiple instances of same jar, creating when starts the service (ubuntu server)
I hosted springboot .jar file on hostinger vps server and start the app as a service
this is my service file
when starting the service multiple instances of jar files are created and multiple mysqld ...
0
votes
2
answers
86
views
Spring boot 3 fat jar doesnt scan libs or config directory
I have a spring boot 3 project that is packaged as a jar file with all the dependencies in it (fat jar). When I run the jar file using the command java -jar MyApp.jar then the application starts so ...
0
votes
0
answers
51
views
java .jar file throwing Closing org.springframework.context.support.ClassPathXmlApplicationContext
From the datastage we have called a script which invokes a jar file, this jar files helps to connect to another application which has user details in it. After fetching all the user details, this jar ...
0
votes
0
answers
82
views
Sign jars and signer certificate expiration
Believe it or not, I am signing a jar for a legacy application that uses java webstart.
I am running the following command:
C:/javapath/.\jarsigner -storetype pkcs12 -tsa http://timestamp.digicert.com ...
0
votes
0
answers
37
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
73
views
JAR decompilation and recompilation
I'm attempting to manually mod old minecraft versions by using fernflower to turn their class files in their JARs to java files and then utilisizing a obfuscation table on my other monitor to edit the ...
1
vote
1
answer
91
views
Class org.apache.derby.jdbc.ClientDriver not found despite derbyclient.jar being in CLASSPATH
I'm running this via Visual Studio Code and have the Language Support for Java (TM) by RedHat extension. The quickstart code I am using is found here. I modified it slightly to become this:
import ...
1
vote
1
answer
145
views
Jar can't find the main class
I have generated a fat Jar with intellij and for some reason it cannot find the main class, outputting the error:
HappyBirthdayWisher\build\libs>java -jar HappyBirthdayWisher-1.0-SNAPSHOT.jar
Error:...
-1
votes
1
answer
101
views
How to export osb resources sbconfig.jar to a directory using WLST
I login to Oracle Service Bus web console below URL.
https://mybank:7001/servicebus/faces/resources
I click on Export icon -> "export resources" -> export contents(resources + include ...
0
votes
0
answers
63
views
How can I put jar and jre bundled into a single exe? [duplicate]
I'm building a spring - kotlin standalone app and I want to build a single exe that is run-ready to give to my client.
Currently I'm using jpackage (along with bootJar and a jlink command for a custom ...
2
votes
1
answer
286
views
JavaFX application doesn't work as Runnable JAR, only runs with non end-user-friendly methods
I want to learn JavaFX development, but first, got to ensure the application can be exported and run on its own, so it can be shared with regular users in the future - preferably Linux and Apple ...
0
votes
0
answers
106
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
145
views
Error: Could not find or load main class Caused by: java.lang.ClassNotFoundException with jpackage
Hi this is my first question! I'm trying to build a standalone kotlin - compose - spring app. My client requested this app for windows so I'd like to create an installer that includes java runtime (my ...
1
vote
1
answer
63
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
111
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>
&...
0
votes
0
answers
110
views
Problem when running custom flink jar application on cluster
I have a little problem when running a custom jar application on a cluster. First, I ran my custom jar application in a local flink installation:
/bin/flink run /home/osboxes/WordCount.jar --input ...