Questions tagged [executable-jar]

A special type of jar file which contains all non-standard libraries and definitions necessary to run an application on a JVM.

An executable java program which can be started manually by typing java -jar foo.jar. Some operating systems (including Windows, Solaris and some Linux distributions) provide means to run the jar just as any other executable on that system.

Executable JAR files are distinguished by a 'extra field' on the first file with a hexadecimal field code of 0xCAFE. They must also specify a main class in the manifest (Main-Class: fooPackage.BarClass) which will be used to start the application.

2420 questions
7
votes
2 answers

Deploying Java Server Applications That Aren't .wars

Are there any well-integrated application-management stacks that allow the build, deployment and updating of non-.war Java applications that run as servers? For example message consumers that are servers (but not webservers and have no Servlets), or…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
7
votes
2 answers

Run Java executable without installing JRE?

Possible Duplicate: Running java without installing jre? I am working on a Java application. I created an executable .jar file of my application. It works fine on my machine. Now, I want to deploy it over the client machines which don't have JRE…
mirfan00
  • 129
  • 2
  • 9
6
votes
2 answers

How can I make jar in linux?

how can I make jar for my java files in linux? I have this situation: I have in directory src this stuff: Client.java //source code GUI.java // source code miglayout-lib.jar //external lib icons // folder in which are 20 jpeg…
user1097772
  • 3,499
  • 15
  • 59
  • 95
6
votes
1 answer

Building FatJar for JavaFX with gradle and intellij, getting NoClassDefFOundError

I have set up an OpenJDK 12 project in IntelliJ (2019.2) using the built-in Gradle support. To design the GUI I'm using JavaFX 12. I have followed and read the setup guide several times, I have no issues running the program in my IDE, the issue is…
erik p
  • 360
  • 3
  • 15
6
votes
1 answer

IntelliJ artifact JAR file: Could not find or load main class

I created a JAR artifact in IntelliJ with option to extract JAR files to the target JAR. Look like this: I filled the manifest information properly: I checked the content of the JAR file with ZIP and it contains the jar files, the properly filled…
Levente
  • 161
  • 1
  • 7
6
votes
1 answer

Difference between JAR, Fat JAR, Executable JAR

What are the differences between JAR, Fat JAR and Executable JAR? How are they created from command line and gradle.build task(in case of gradle project)? Are there any other JARs apart from above mentioned?
origin
  • 120
  • 2
  • 8
6
votes
2 answers

Kotlin + Maven can not find main class when running packaged jar

I am trying to package(maven package) and run(java -jar file.jar) a project that contains both java and kotlin code. I have followed the tutorial at: https://michaelrice.com/2016/08/hello-world-with-kotlin-and-maven/ kotlin source…
Deividas Duda
  • 123
  • 1
  • 8
6
votes
1 answer

SpringBoot: can't create fully executable jar with 2.0.0-M3

I have a multi module Gradle project and I tried to upgrade to 2.0.0-M3. Following the instructions here, I added this to my build script: springBoot { executable = true } But when I build I get the following error: Could not set unknown…
vforchi
  • 123
  • 2
  • 7
6
votes
1 answer

Maven executable Jar throws error on start

First of all: I am new to maven. I made my first maven Application and successfully tested it within the IDE. The build was always successfull and everything worked like a charm. Now I want to export the project as an executable jar with the…
Fabian Schneider
  • 799
  • 1
  • 13
  • 40
6
votes
2 answers

Can't build a jar using Leiningen

I'm trying to make a stand alone jar from my bare-bones Clojure project using the Leiningen plugin in Intellij's Cursive. To create the project, I just created the project.clj file, opened it, and Cursive offered to import it as a…
Carcigenicate
  • 43,494
  • 9
  • 68
  • 117
6
votes
3 answers

UnsatisfiedLinkError in exported (Eclipse) executable jar file

The code works fine when executing from Eclipse. I'm using OpenCV 2.4.11 and JavaFX for UI. When I export an Executable Jar from Eclipse and run it from cmd I get the following exception: I followed many post here on SO and OpenCV forum(1, 2, 3, 4)…
Vivekanand
  • 755
  • 1
  • 8
  • 29
6
votes
1 answer

Exported runnable JAR file from Eclipse doesn't seem to execute

(Disclaimer: I am not a Java programmer, and really have very little idea what I'm doing in Eclipse) I hacked out an application in Eclipse a while back which I finished off and exported as a JAR which runs nicely. I didn't take any notes or make…
Chris Haines
  • 6,445
  • 5
  • 49
  • 62
6
votes
4 answers

How do you recompile a jar file?

I took an old jar file and edited it. Now i have a folder that has all the files and I want to recompile them back to a jar file. How do i do this?
Kyle
  • 61
  • 1
  • 1
  • 2
6
votes
1 answer

Myclass.class.getProtectionDomain().getCodeSource() return empty path

i'm trying to find the location of the running jar file using the method: File jarFile = new File(JarPath.class.getProtectionDomain().getCodeSource().getLocation().toURI()); when i run it on the IDE (eclipse) it returns the correct path. but when i…
IdoS
  • 63
  • 9
6
votes
3 answers

Spring-Boot Resource Not Found when using executeable Jar

again I face a strange issue and hope someone here can help. I have a spring boot backend module, what works in eclipse well and application is executeable when starting main in application.java. Everything fine. My application makes import of…