Questions tagged [fatjar]
134 questions
1
vote
0 answers
JavaFX include all modules dependencies inside a fat Jar and remove warning
I'm new at JavaFX and I'm trying to create a fat Jar of a simple program (password generator). With Maven (assembly plugin, shade or dependencies+jar) or Gradle I get it but a warning appears when I launch it from CLI
java -jar…

philfs
- 11
- 3
1
vote
1 answer
Java agent packaged as fatjar runs slowly with JDK8
We are using Java agent to enhance some methods in the application. The agent are dependent on other jars, and for convenience, so we packaged the agent and dependencies into a fatjar, and then load the dependent jars through a custom class loader.…

hammer
- 11
- 2
1
vote
0 answers
Spring Boot application fat jar fails with 'Unable to open root Jar file'
After compiling my Spring Boot application with mvn clean install I am not being able to run the fat jar with java -jar target/myapplication-1.0.jar due to the following error:
java.io.IOException: Unable to open root Jar file…

coterobarros
- 941
- 1
- 16
- 25
1
vote
0 answers
Include a runtime JAR when running a fat JAR
Pretty sure this is a duplicate question, but couldn't find the answer I'm looking for.
I'm trying to run WireMock standalone with WebHook extensions. Both come packaged as JAR files. First one, wiremock-jre8-standalone-2.28.1.jar is a runnable fat…

DiegoAlfonso
- 237
- 5
- 15
1
vote
1 answer
Firebase Admin - Gradle - Fat Jar - Can't make it work
I am building a server to push notifications using Fire Cloud Messaging.
It is super simple, making a test example, just importing firebase.
dependencies {
implementation 'com.google.firebase:firebase-admin:7.1.1'
}
If I don't create the fat…

Daniel Gini
- 63
- 6
1
vote
0 answers
Generate jar for source code using Gradle
I'm trying to generate the jar file for the source code of a Gradle project.
I'm using Gradle 6.6.1
I tried
task fatJar2(type: Jar) {
manifest {
attributes 'Main-Class': 'com.main.MainClass'
}
archiveClassifier = "all"
from {
…

Nick Thomas
- 13
- 5
1
vote
0 answers
Obfuscating Spring Boot fat Jar using Proguard
I would like to obfuscate Spring Boot application that is packaged into a fat jar.
My proguard config:
-injars lib.jar
-outjars lib_out.jar
-libraryjars …

pixel
- 24,905
- 36
- 149
- 251
1
vote
0 answers
unable to build gradle with dependent FAT jar
I am trying to build a gradle project, where we have several dependent jars. One of this jar is a FAT jar which consist of hundreds of jar. All dependent jars are uploaded to artifactory.
build.gradle is able to compile all other jars however it is…

nils
- 11
- 3
1
vote
0 answers
Unable to create a fat jar from Gradle application
I'm having a hard time creating a fat jar from my Gradle app.
I'm running commands ./gradlew jar and ./gradlew clean build. Both commands seem to create valid .jars in the respective sub-modules of the app, but the .jar in the root of the project…

Whizzil
- 1,264
- 6
- 22
- 39
1
vote
0 answers
Gradle fatJar: I get class not found error if my main class is in test folder, works fine if main class is in src/main/java
I am using fatJar to create Jar. The jar works fine if my class with main function is in src/main/java.
I get class not found error if my class is in src/test/java.
Any suggestions.

Venkatesh Singh
- 41
- 1
- 3
1
vote
0 answers
org.json.JSONObject issue with Enums in super jar
I have a piece of code that looks as follows"
public enum MyEnum {
EXAMPLE("example1", false, -1L);
private final String name;
private final boolean deprecated;
private final long id;
...
}
...
MyEnum myenum = MyEnum.EXAMPLE;
try {
…

Martin Schäf
- 365
- 1
- 12
1
vote
0 answers
not found: value assemblyJarName assemblyJarName in assembly := s"${name.value.replace(' ','-')}-${version.value}.jar"
I am trying to create a fat jar, using SBT. it always gives an error as:
not found: value assemblyJarName
assemblyJarName in assembly := s"${name.value.replace(' ','-')}-${version.value}.jar"
my build.sbt looks this:
name :=…

Messi The best
- 11
- 1
1
vote
0 answers
How does a fat jar(spring boot) resolves class path if two file are of same name & package
I am building a spring boot fat jar using gradle script.
My fat jar has two libs among others say -
open-source.jar
open-source-modified.jar (In this I have few updates
for files from earlier jar(#1) placed with same name and same
package…

user3293666
- 333
- 1
- 3
- 12
1
vote
2 answers
Spring-boot jersey crash with file not found exception when runs from jar. Running from source it works without any issue
When I run it from Idea it works great. I generate jar using gradle bootJar. When I run it I am getting:
java -jar server-0.0.1-SNAPSHOT.jar
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __…

masterdany88
- 5,041
- 11
- 58
- 132
1
vote
1 answer
Gradle: exclude dependencies provided from compileOnly from fat jar
I have a huge dependency (Spark) that I use in compileOnly configuration, and several other libraries. I am trying to build a fat jar, of course, without compileOnly dependencies. Gradle does this fine, however, several libraries declare…

Lapshin Dmitry
- 1,084
- 9
- 28