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
2
votes
3 answers

How do I configure install4j to run a java executable jar file which contains other jar files?

I have java an executable jar file that has many other jar files embedded in it. It uses simon tuffs onejar to accomplish this. The jar runs correctly when I double-click it, or issue 'java -jar myApp.jar' from the command prompt. The jar file has a…
d ei
  • 493
  • 4
  • 16
2
votes
1 answer

Using resource in kotlin func - does not work with fat jar (one jar)

I have the following piece of code: fun main(args: Array) { val urlForCSR: URL = ClassLoader.getSystemClassLoader().getResource("merchant.id") // also tried ClassLoader.getSystemResource("merchant.id") ... The following when run…
nitishagar
  • 9,038
  • 3
  • 28
  • 40
2
votes
0 answers

How to skip executing tests in assembly with sbt-onejar?

Can someone help troubleshoot this project file for the reason why tests always run despite having test in assembly := {} there? import sbt._ import Keys._ import org.scalatra.sbt._ import org.scalatra.sbt.PluginKeys._ import…
Zack
  • 540
  • 5
  • 12
2
votes
1 answer

Error when starting a jar created with one-jar

I have an sbt project that should create a runnable jar file. While the jar is created correctly, when this is started it throws an exeception: Exception in thread "main" java.lang.reflect.InvocationTargetException at…
Clynamen
  • 509
  • 1
  • 6
  • 16
2
votes
2 answers

Building runnable jar using onejar-maven-plugin

How can I make it build regular artifact not containing "one-jar" in the name? I am using following settings in my POM: com.jolira onejar-maven-plugin 1.4.4
Daniil Shevelev
  • 11,739
  • 12
  • 50
  • 73
2
votes
2 answers

How to publish additional artifact with sbt (one-jar)

I am new to scala and sbt. I managed to create an executable jar with one-jar plugin. I am trying to publish this additional (one-jar) artifact to artifactory, but I am not able to do that. Does anybody know how to do that? I had a look at…
gdiamantidis
  • 102
  • 3
  • 10
2
votes
1 answer

Cannot find paths when running JOGL project packaged as .jar

I have created an OpenGL project with Scala and JOGL and am trying to package it into a .jar file using sbt and the one-jar plugin. The .jar is created without any errors, but when I try to run the .jar, I get an error stating that a JOGL .jar…
bwroga
  • 5,379
  • 2
  • 23
  • 25
2
votes
2 answers

How do a call a Java jar file from Oracle PL/SQL?

My customer wants to be able to call a jar file from Oracle PL/SQL. Java 1.6, Oracle 11g R2 How do I do this?
Ground Hog
  • 193
  • 1
  • 3
  • 13
2
votes
0 answers

Maven: Package "brother" projects

I am working on a big set of projects strongly related to each other and looking for a way to reduce to minimimun the maintenance overhead using a good maven configuration. One of the scenarios which I am currently working on is a set of several…
Carles Sala
  • 1,989
  • 1
  • 16
  • 34
2
votes
2 answers

Using JSVC to daemonize a Java app packaged with the Maven One-Jar Plugin

Here is the problem: I have packaged my Java application into a single jar using the Maven plugin One-Jar. Now I want to run the application as a Unix Daemon using JSVC, i.e. Apache Commons Daemon. I am using JSVC as follows (which works for Jars…
1
vote
1 answer

Is there a way to bundle up multiple jars within the same jar file and make sure only one main jar inside it becomes part of classpath of the app

Is there a way to bundle up multiple jars within the same jar file and make sure only one main jar inside it becomes part of classpath of the application which adds this full jar into their classpath. Code inside my main jar will use a custom class…
pranjaljain
  • 170
  • 1
  • 3
  • 18
1
vote
1 answer

Java: One-jar maven plugin resources

I have a Maven project that I ultimately want to build into an executable exe. This project is dependent on multiple libraries. I found this explanation. When I build the project "normally", everything works fine. I get some issues as soon as I use…
raedma
  • 293
  • 1
  • 12
1
vote
1 answer

main method not found using One-Jar

I am using One-Jar to combine my application and its dependencies into one jar file. I used the command line approach step by step. However, when running the jar file with java -jar one-jar.jar I recieve the following error: Exception in thread…
Tiara
  • 59
  • 6
1
vote
1 answer

Issues with reading xml file after creating jar

We are building an application using ScalaFX. When I run the project in IntelliJIDEA, everything works fine. However, when I create jar file and try to execute it, I am getting errors in reading some xml file. I tried various solutions posted in…
Yadu Krishnan
  • 3,492
  • 5
  • 41
  • 80
1
vote
1 answer

JPA and One-jar

I have an application that uses JPA and Hibernate ORM 4.3.8. When I package this application and its dependencies into a single executable jar with one-jar and try to create an EntityManagerFactory Hibernate throws this…
John Cashew
  • 1,078
  • 2
  • 12
  • 28