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

Run a jar File from java program

I am trying to execute jar files from another Java program. I am using the following code : try { Runtime runtime = Runtime.getRuntime(); runtime.exec("path upto jar"); } catch (Exception ex) { …
adesh singh
  • 1,727
  • 9
  • 38
  • 70
8
votes
10 answers

How do I run a .jar executable java file from outside NetBeans IDE?

How do I run a .jar executable java file from outside NetBeans IDE? (Windows Vista). My project has a .jar file created by Netbeans. We'd like to run it. Either: how do we run the file or how do we create a 'proper' executable file in NetBeans…
Bob
8
votes
5 answers

Include A Properties File With A Jar File

I've written a small application. I've put the database specific information in a properties file. db.url=jdbc:mysql://localhost:3306/librarydb db.user=root db.passwd=pas$w0rd When I build the application to get the executable jar file, the…
Isuru
  • 30,617
  • 60
  • 187
  • 303
8
votes
2 answers

Starting up embedded jetty server for a JAR file

What I am trying to do, is to build an executable JAR file which will contain my project. I have included its dependencies right next to it, also in JAR files, so my directory listing looks something like…
Milad Naseri
  • 4,053
  • 1
  • 27
  • 39
8
votes
2 answers

Intellij Javafx artifact - how do you make it?

I've been trying all day to turn my javafx application into a jar file. I'm using Java 1.7 update 7. Oracle has some information, but it just seems scattered all over the place. Intellij is almost doing the job, but I get the following…
Louis Sayers
  • 2,162
  • 3
  • 30
  • 53
8
votes
4 answers

IzPack - Desktop Shortcut on Windows - Not Working

I'm trying to use IzPack to install my program and I'd like to add Desktop Shortcuts to the installer, here is the documentation/instructions from the IzPack website. http://izpack.org/documentation/desktop-shortcuts.html However, the below XML…
CODe
  • 2,253
  • 6
  • 36
  • 65
7
votes
2 answers

URL.setURLStreamHandlerFactory

I am developing a web application using an executable jar with embedded Jetty. My jar contains a dependent jar.(jar in jar) I referenced to the JarRsrcLoader and RsrcURLStreamHandlerFactory that developed by Eclipse. JarRsrcLoader is using…
user1160137
  • 71
  • 1
  • 2
7
votes
2 answers

How to convert all .class files into .java file from a .jar file

I have a .jar file and When I extract it, It gives me all the .class files present in that jar file. I have decompiled all the .class files using http://jd.benow.ca/ tool but i want that all the .class files should save into .java files. Right now i…
Govind Gupta
  • 1,555
  • 4
  • 15
  • 24
7
votes
4 answers

apache spark: akka version error by build jar with all dependencies

i have build a jar file from my spark app with maven (mvn clean compile assembly:single) and the following pom file:
Pa Rö
  • 449
  • 1
  • 6
  • 18
7
votes
2 answers

manifest.mf is overwritten by eclipse during jar export

I would like make an executable jar archive with eclipse. So into my project I created file src/META-INF/MANIFEST.MF : Manifest-Version: 1.0 Main-Class: MainClass Class-Path: . But when I export my java eclipse project eclipse warn me with…
freedev
  • 25,946
  • 8
  • 108
  • 125
7
votes
1 answer

Verify http requests from signed jar

I'm writing client for my webapplication, and i signed release jar with my developer certificate, how can i verify that request to rest service was from my signed jar?
ilya.stmn
  • 1,604
  • 5
  • 23
  • 41
7
votes
1 answer

Runnable jar with jvm args

I was trying to create a runnable jar file using Eclipse. The problem is that the vm parameters I have added to the run configuration in the Eclipse were not saved in any way. I know I can create a batch file that will run the jar with the needed…
Avi Y
  • 2,456
  • 4
  • 29
  • 35
7
votes
5 answers

Eclipse: export to .jar AND include resource files (ANT)

Our project in eclipse approximately shows the following folders: application - src - JRE System Library [1.6] - Referenced Libraries - lib - rsc In our project, we would like to use File > Export... > Executable JAR Well that…
Atmocreations
  • 9,923
  • 15
  • 67
  • 102
7
votes
7 answers

Check if jar running from shell

I have a java jar program that I am trying to run on startup of my machine. Ideally, the shells script will check every 60 seconds to assure that the jar is running. How do I check if the jar is running on centos, this does not appear to be…
Sixthpoint
  • 1,161
  • 3
  • 11
  • 34
7
votes
1 answer

Deploying a JavaFX 2 application with referenced jars, using Ant

I have written a JavaFx 2 application (using Eclipse on a Windows platform) and now I want to deploy it to a "clickable" jar-file. My application uses resource-code from a separate jar-file (in Eclipse, this resource code is a separate Project from…
Förgöraren
  • 101
  • 1
  • 6