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
9
votes
6 answers

How to convert "jar" to Linux executable file?

I know how to convert "jar" to windows executable file(.exe). But I want to know how to convert "jar" to Linux executable file(.?). I have searched google but didn't get exact answer what i want, help to do this.
lekshmi
  • 191
  • 1
  • 1
  • 6
9
votes
5 answers

Connecting a Microsoft Access Database to Java using JDBC and compiling

for a school database project we are making a database program (user GUI and the database). Using Microsoft Access 2010 I created the database and populated it with some sample data, and saved it in .mdb format and placed it in my project…
Moogle
  • 113
  • 1
  • 1
  • 5
9
votes
4 answers

How to run saxon xslt transformation in java

I can easily run the following in command line to transform an xml file: java -jar saxon9he.jar -o:outputfile.xml data.xml transform.xslt I would like to do the exact same results from within a java file so I can use it in part of a program I'm…
Robert Petty
  • 197
  • 1
  • 3
  • 17
9
votes
2 answers

Executing a Jar on Vista with a double click

This pretty much has me defeated. On XP and earlier versions of Windows you could customise Open With filetypes to include java - jar "myjar.jar", but on Vista this functionality seems to have been removed. I can of course create a .bat file to…
Leonard H. Martin
  • 2,734
  • 4
  • 23
  • 26
9
votes
5 answers

Difference between running jar file and exe?

If you have a small program, you can run jar file and it will work fine. But if you convert jar file into exe, you still need java to run your exe file, so what's the difference between them and why do some people convert jar to exe?
Vegeta
  • 334
  • 2
  • 4
  • 12
9
votes
1 answer

How to package opencv +java in a jar

I've been using Opencv 2.4.5 with Java for a while building an application and would now like to distribute the app. The library is loaded using the following: static{ System.loadLibrary("opencv_java245"); } which works fine. However,…
alistair
  • 1,164
  • 10
  • 27
9
votes
8 answers

Running a .jar file in a command prompt from double click

I'll start of by saying Im on windows 7. I have created a .jar file which executes fine from the command line using the - java -jar myJar.jar approach But what I'm after is to be able to double click on the jar file and for it to open up the command…
Nexus490
  • 319
  • 1
  • 4
  • 14
9
votes
1 answer

Run Junit test class inside one-jar with junit outside the jar

So I have packed my classes and their dependancies (apache commons cli) inside a jar file using one-jar (which was easy enough to do, see section Command-Line Approach). Now I am curious if I can run the java test class inside the jar using a Junit…
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
8
votes
1 answer

How do I pass a file as argument to my Java application created using JAR Bundler?

I would like to associate a specific file type with my application, so when I double-click one of the files of this specific type, my application opens. This works just fine, but the file I double-clicked does not get passed as an argument to my…
kba
  • 19,333
  • 5
  • 62
  • 89
8
votes
1 answer

How to execute jar with command line arguments

Possible Duplicate: Passing arguments to JAR which is required by Java Interpreter how to provide command line input to a file which is in a jar I have a jar file hello.jar with some say execute.java file which i want to execute from command line…
samarth
  • 3,866
  • 7
  • 45
  • 60
8
votes
1 answer

Scala: Creating a small executable Jar relying on external Scala libraries

I'm trying to package a small application (still learning Scala!) in a "clean way". The goal is to have an executable JAR file. I've done the following: packaged a JAR using sbt -> will work with scala -cp myjarfile.jar MyClass or java…
Pierric
  • 135
  • 6
8
votes
2 answers

IntelliJ Spring Boot: How to create an executable jar

I'm trying to create an executable jar from IntelliJ. First I got the Java Security Exception and I changed sqljdbc4-4.0 to unsigned. First problem solved. Then I got Manifest not found. Added META-INF dir to output. Second problem solved. Next I…
rala
  • 895
  • 2
  • 18
  • 43
8
votes
3 answers

What is System.out exactly?

I noticed that any call to System.out.println() from a JAR file that hasn't been started by the command line (i.e. a Runnable JAR file started by user with double-click) won't open the console. After doing some research, I found multiple answers on…
spongebob
  • 8,370
  • 15
  • 50
  • 83
8
votes
2 answers

Modify Executing Jar file

Hello Stack Overflow friends. I have a simple problem which i fear doesnt have a simple solution and i need advice as to how to proceed. I am developing a java application packaged as and executable JAR but it requires to modify some of its JAR…
PinkyNoBrain
  • 705
  • 1
  • 7
  • 16
8
votes
2 answers

How to change permission of jar packaged by maven? I am using maven assembly plugin

I am using maven assembly plugin to package a jar with all dependencies. But the jar file is not executable. How can I change the permission of the jar? -rw-r--r-- 1 e17490 ADPROD\Domain Users 12072889 Nov 12 14:16…
DaBears
  • 291
  • 4
  • 9