Questions tagged [onejar]

One-JAR lets developer package a Java application together with its dependency Jars into a single executable Jar file.

One-JAR provides custom classloader that knows how to load classes and resources from a jars inside an archive, instead of from jars in the filesystem. It discovers dependency jar files based on the internal structure of the archive, there is no custom code required to do this. One-JAR archives can be constructed using Ant or Maven2. Application can be run using command: java -jar my-app.jar.

67 questions
1
vote
1 answer

Maven Jar requires two execution contexts

I need to be able to allow my maven package to be executed in two contexts. User needs to execute jar from the command line to generate a licence key from an AWT dialog that appears when the user executes java -jar myjar.jar myjar needs to also…
Andrew Gray
  • 3,593
  • 3
  • 35
  • 62
1
vote
1 answer

How to turn off warnings on application load from one-jar executable?

I am using sbt with the one-jar plugin, but when I run the one-jar executable that has been created I get a continuous stream of messages that look like the following: JarClassLoader: Warning: net/liftweb/json/Formats$$anon$4.class in…
C R
  • 2,182
  • 5
  • 32
  • 41
1
vote
2 answers

Loading Velocity Templates from nested JARs

I have an application packaged inside of a onejar, which uses Velocity for templating. In my maven project setup, I have a file in $base/src/main/resources/template.html. When the app gets packaged as a onejar, the resulting onejar contains a…
FrobberOfBits
  • 17,634
  • 4
  • 52
  • 86
1
vote
0 answers

how to deal with a sbt multi project with non-standard artifacts?

what am I trying to do: first, let me present a (very) simplified version of what i'm trying to achieve. consider the following multi-project: root |___backend | |___frontend | |___deployer the backend is packaged with oneJar, and performs as a…
gilad hoch
  • 2,846
  • 2
  • 33
  • 57
1
vote
0 answers

How to get an URL for a resource directory when using OneJar?

I need to pass the root "something" to a piece of code working with resources. I know that this "something" can't be a file, since this doesn't work in a JAR. So I'm passing an URL. Before I started with OneJar I transformed an URL…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
1
vote
1 answer

Using one-jar to build one jar file

I'm trying to use one-jar to generate one jar file that contains clojure jar file and java class file: Creating one jar file that for execution from Java/Clojure Following the instruction, I could generate directories using one-jar-appgen-0.97.jar.…
prosseek
  • 182,215
  • 215
  • 566
  • 871
0
votes
0 answers

using org.eclipse.jgit-6.4.0.202211300538-r.jar getting error java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

I am using "org.eclipse.jgit-6.4.0.202211300538-r.jar" in a java project with maven. When I run the program from Intellij everything is fine and the program works perfectly. When I build an Artifact out of this project and run it on command line I…
Ali Tc
  • 1
  • 1
0
votes
0 answers

How to create a jar without one-jar dependency for spring batch

Currently we are using one-jar dependency for spring batches to create a jar file with all the dependencies inside. We are required to create jar for spring batche and run it without using one-jar. But if we don't use one_jar it won't bind the…
0
votes
0 answers

OneJar "Enter Java Package Name"

I'm trying to build my project, with contains multiple other JARS and natives, into one fat jar. I was pointed into using the onejar project, which can be found here: http://one-jar.sourceforge.net When running one jar with the command line, I am…
0
votes
2 answers

Embedding Cassandra - Security Manager issues

I am attempting to upgrade an application that uses an embedded cassandra 2.1.1 (about time!), but the application in question sets it's own security manager. Cassandra 3.11 seems to not consider this possibility and just attempts to set the…
Gus
  • 6,719
  • 6
  • 37
  • 58
0
votes
1 answer

one jar with one class and main class from dependecy jar

I am having one project with two classes named as Test1 and Test2. Both Test1 and Test2 are not main classes. Now I have one dependency named cloudexe.jar which has a main class ClassExecuter. Now my issue is that I want ClassExecuter as the main…
Alex Man
  • 4,746
  • 17
  • 93
  • 178
0
votes
0 answers

Executable-jar not working on a Mac

I have developed a small Java application using Eclipse. I created an executable jar from it using one jar. I want to be able to execute this application on both a pc or a mac. The application executes perfectly on a pc but on a mac, I have this…
0
votes
1 answer

Creating java library containing 3rd party (jar) libraries

I need to produce a jar file that will be used by others as a library (lets call it 'myLib.jar'), thus the jar does not need to be executable. The library depends on some other 3rd-party jars but i will not expect from the ones who use 'myLib.jar'…
Mario
  • 767
  • 1
  • 14
  • 42
0
votes
1 answer

main class inside inner jar

I am trying to build an installer for a couple of Java Maven projects (using Eclipse). I would like to use maven assembly to produce a jar file (henceforth big-fat jar) which contains all the installation files (JARs + docs + others) as well as the…
0
votes
0 answers

FatJar Temp Directory

I have native dll(C++) in my project. I'm using Eclipse FatJar Plugin to create FatJar. My native dll is dependent to other native dlls like "libopencv_core247". I know that FatJar is creating temp folder load dependent libraries from this folder.…
bzkrtmurat
  • 189
  • 1
  • 3
  • 15