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
0
votes
1 answer

Using FatJar for native libraries

I'm using FatJar for creating one jar with postgresql.jar, jdatepicker.jar and native libraries. I have combined project to one jar. There is no postgresql and jdatepicker jar error. And I can load my native library programmatically. But I can not…
bzkrtmurat
  • 189
  • 1
  • 3
  • 15
0
votes
2 answers

maven user library not packaged in my runnable jar

I'm now programming Java for a year and had to take over several projects from a previous programmer. I'm not a programming newby since I started with .NET programming in 1998. Now for a Java project, I need to support 24 versions (and rising) of a…
0
votes
1 answer

move the maven-onejar generated jar to a custom location

I am using the onejar-maven-plugin to generate the jar for my project and it all goes well. But, when I try to change it to a sub-folder, for eg. dist, the jar from maven-jar-plugin gets generated, not the jar from onejar. The onejar plugin does not…
0
votes
1 answer

Is it possible to user One-Jar without IDE?

I'm trying to find a tutorial on how to use One-Jar without eclipse, with no success. Is it possible? I have my classes and commons-io.24.jar that needs to be inside, and I am compiling in command line. Thanks!
JorgeeFG
  • 5,651
  • 12
  • 59
  • 92
0
votes
0 answers

One-Jar FileNotFoundException

I have une Java application, and I use in it the openCv(opencv_java259.jar). It work correcly in Eclipse. For pack the application in a executable .jar file, I use One-Jar (Command Line Approch) but it don't work correctly and I have this…
user3675796
  • 23
  • 1
  • 6
0
votes
1 answer

OneJar includes Dr Tuffs classes

I expect this is trivial, but I'm on a deadline, so I apologise if this is a stupid question. I'm using Dr Tuffs OneJar for Maven to build a fat jar including all my dependencies etc. However, when I use jar tf xxx.one-jar.jar it lists the things…
Will
  • 1,568
  • 2
  • 12
  • 28
0
votes
1 answer

No resource for my/package in RestRegistry when using Socko Web Server

I am using restful api of socko. When I run my application via sbt run, it is ok to run without any problem. However, when I package my application by one-jar and run it via java -jar myapp_2.10-1.0-onejar.jar, a runtime error occur. So I wonder…
Dzanvu
  • 523
  • 7
  • 18
0
votes
1 answer

Onejar and resource loading

I have a maven project which I would like to package in an executable jar. It's using quite a few dependencies, like spring and so on. It was suggested in a few posts to use OneJar, to avoid a lot of headaches. This is what I have currently in my…
0
votes
1 answer

OneJar Expand with (or without) sbt-onejar

Is there a way to tell the sbt-onejar SBT plugin to produce a JAR in such way that the .class files of my project are in "expanded" form and not under lib/myproject.jar? Alternatively, is it possible to tell sbt-onejar to produce a JAR that, when…
Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
0
votes
1 answer

Can't get jar resources when jar is in a protected Windows directory

I have a property file inside a self-executing .jar. Actually the property file is in a jar inside the jar (packaged with one-jar). If I run my jar from the desktop it works fine, but when I put it inside the Program Files directory it fails. This…
Winder
  • 1,984
  • 5
  • 23
  • 33
0
votes
0 answers

SBT custom task hangs

I have the following custom taskKey in my built.sbt: (it's my first attempt at defining a custom SBT task, so beware of stupidities) lazy val makeDeployJar = taskKey[java.io.File]( "Runs 'package', collects all the sub-project JARs in the lib…
Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
0
votes
1 answer

NetBeans and One-Jar Creation for Stand alone application

Please help me out,I have developed the simple application with two external jar files.While clean and build,it's creating a jar file for the application and the library folder in dist directory. When I try to execute as a jar,it's executing…
Mathu
  • 84
  • 1
  • 12
0
votes
1 answer

Getting deadloack when using C3P0, OneJar and MySQL

Getting deadloack when using C3P0, OneJar and MySQL C3P0 Setting is as follows pooledDataSource=new ComboPooledDataSource(); set database properies ie userName password driver etc pooledDataSource.setMaxPoolSize(100); …
Vipul
  • 816
  • 4
  • 11
  • 26
0
votes
1 answer

Error using perf4j with aspectj (NoSuchMethodError)

I'm trying to use CTW with aspectj to profile my application (cumulusrdf) with perf4j. I can compile everything with maven just fine. The console output contains the entry for the method I'm using for getting the profiling to work: [INFO] ---…
Sibbo
  • 3,796
  • 2
  • 23
  • 41
0
votes
1 answer

What's wrong with OneJar URL?

I always thought that URLs can be composed via this constructor, and with something like new URL(new URL("file:/foo/bar/"), "images/a.png") I get file:/foo/bar/images/a.png as expected.1 However, from OneJar I obtain a strange looking URL and the…
maaartinus
  • 44,714
  • 32
  • 161
  • 320