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

Bundling JAR dependencies with executable JAR (Über JAR) from command line

I'm trying to create an executable jar from the command line. The main class in the JAR has dependencies that i have packaged into another plain JAR file. I want to package the dependency JAR together with the executable JAR in order to have a…
onlyteo
  • 113
  • 1
  • 5
5
votes
5 answers

How to make a java executable run in the background instead of the foreground?

I wrote a shell script to run a set of experiments so I won't have to do it manually. The script runs a java .jar file 30 times, and runs a set of those 30 times 17 times changing a few variables in between. I invoke the program like this: java…
WhiteTiger
  • 758
  • 1
  • 7
  • 21
5
votes
1 answer

Create tests jar with all the Karate dependencies

I have the following project structure. src/test/java There is no src/main folder. Above src/test/java folder contains some scala classes as well as some java classes. When i build the jar file using following plugins maven-jar-plugin : it…
5
votes
2 answers

Maven - Executable file from a java project

I need to use maven (for a school project) to create an executable file from a single maven command. I've never used maven and tried many solutions here on stackoverlow. The solutions created a jar file, but the file never opened. This is my project…
Yoey
  • 408
  • 1
  • 4
  • 16
5
votes
0 answers

IntelliJ IDEA - Decompiling/Editing/Recompiling JAR

I realize this may seem like a completely stupid question and this question is a "wall of text", but I'm feeling like I've gotten way out of my depth here and need some guidance. I've read several SO questions on this topic, but still can't seem to…
G_Hosa_Phat
  • 976
  • 2
  • 18
  • 38
5
votes
0 answers

Could not run Chrome driver on linux server using an executable jar file

I am trying to run an executable jar file which will execute a test suite(using selenium/ cucumber) on linux environment by using the command java -jar -webdriver.chrome.driver=pathofchromedriver myjarfile.jar I have the following error : Starting…
codeDev
  • 79
  • 1
  • 9
5
votes
10 answers

Jar File - Prevent Access to Source Code

I want to hand over a small Java app as a runnable jar but I do not want anybody to have access to my source code. Am I right in presuming that there is no source code (.java files) included with a jar file? User269799
Grunge Freak
  • 1,009
  • 2
  • 12
  • 19
5
votes
1 answer

AWS EMR Spark Cluster - Steps with Scala fat JAR, can't find MainClass

I have a fat jar, written in Scala, packaged by sbt. I need to use it in a Spark cluster in AWS EMR. It functions fine if I manually spin up the cluster, copy the jar to the master and run a spark-submit job using a command like…
kmh
  • 1,516
  • 17
  • 33
5
votes
0 answers

Spring Boot App Logging Not Happening When Started Via Executable Jar

I have a Spring boot app that logs perfectly to the file system (via logging.level/logging.file properties) when run from the commandline with: java -jar jarfilename.jar However, when I put the following in my pom.xml in order to create an…
Mark Nenadov
  • 6,421
  • 5
  • 24
  • 32
5
votes
1 answer

Kotlin JSR-223 ScriptEngineFactory within the fat jar - Cannot find kotlin compiler jar

I have a fat jar where I'm trying to get the instance of Kotlin's ScriptEngine. For the debugging purposes I'm iterating through available Script Engine Factories and getting the engines. val scriptEngineManager = ScriptEngineManager() for (factory…
David Siro
  • 1,826
  • 14
  • 33
5
votes
6 answers

eclipselink PersistenceUnitLoadingEception in executable JAR

I am developing a stand-alone java application which uses eclipselink. It is all fine when I execute the app from eclipse IDE. But I've exported an executable JAR file, and since than I can not make eclipseLink work. I have found similar issue in…
GaDo
  • 146
  • 1
  • 7
5
votes
1 answer

Why do Eclipse use an older version of code when exporting a Runnable Jar?

I have a project that works perfectly fine when I run it in eclipse. However when I export it as a runnable Jar, it gives me an older version of the project, from a couple days ago. I have no idea why or how it is exporting the older code and files…
user5628280
5
votes
2 answers

Error in executing the generated jar file

I have a Java project with embedded jetty server and jersey library for REST Services. I am using Intellij for running the project and its working. The problem is when I try to execute the generated jar file. So I have written a task for generating…
Maverick
  • 708
  • 9
  • 19
5
votes
2 answers

Tesseract For Java setting Tessdata_Prefix for executable jar

The ultimate goal of this project is to take the jar and put it in a directory where it uses tesseract and outputs a results directory and the output txt file. I am having some issues with tesseract, though. I am working with tess4j in Java with…
Ian
  • 287
  • 4
  • 17
5
votes
5 answers

Jersey message body reader not found in maven-built JAR

My application uses a REST (JAX-RS Jersey) interface. When I run it in Eclipse, everything' s fine. The domain objects are annotated, I'm not using XML files for the REST mapping. Now I created a standalone JAR using the maven-assembly-plugin, which…
Olvagor
  • 2,332
  • 5
  • 25
  • 26