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
0
votes
0 answers

How to compile and run java source code using classes from a jar file in a separate directory

I am trying to compile and run a .java file using classes that are present in a jar file located in a separate directory. PROJECT ├───build │ └───IN HERE ├───checkstyle ├───doc │ └───yourusername ├───lib └───src This is the directory structure,…
pcopp
  • 21
  • 4
0
votes
0 answers

Installation failed no matching abis

When I try to install app on higher versions of android like Android 6.0 and so on... It gives error ,saying INSTALLATION_FAILED_NO_MATCHING_ABIS; FAILED TO EXTRACT NATIVE LIBRARIES,res=-113 But My app perfectly runs on android 5.0 and 5.1 I am…
0
votes
1 answer

jar could not find main class, despite manifest

I am attempting to put my Java applet into a .Jar so I can sign it, as currently it works locally but throws access denied exceptions when I attempt to run it remotely (it reads other files in the directory). I created the manifest file correctly…
user475989
  • 27
  • 1
  • 2
  • 5
0
votes
2 answers

Creating jar with external dependencies and other jars in Maven

Step 1 : I have a Utils.jar that I have to include in my Project1. I need the Utils.jar to contain all the maven dependencies within itself so that I don't have to specify the same in Project1 pom.xml. Step 2 : I need to create Project1.jar and…
user2761431
  • 925
  • 2
  • 11
  • 26
0
votes
1 answer

How to fix this 'java.io.FileNotFoundException'

My RPG is doing just fine in the compiler. It inputs a file and reads it with Scanner, but when I export it into a ".jar" file it throws the FileNotFoundException. I have tried putting the file in different locations. I have tried using different…
WeaponGod243
  • 19
  • 10
0
votes
1 answer

How can I increase JVM heap size in my application executable jar file? The project type is Maven Project

How can I increase JVM heap size in my application executable jar file? The project type is Maven Project.
Sunil
  • 54
  • 4
0
votes
1 answer

Maven can't get executable jar: Couldn't load main class

You are my last hope. I wrote little bot for telegram. And it's works perfect but i cant build it as an executable jar file. Each time i try to execute jar file at my server i get error: Error: Could not find or load main class…
0
votes
1 answer

Maven - Multiple Jar Best Practices

Maven best practices seem like they support one project > one jar > one pom.xml. I have a maven project that can compile and run as a command line program OR as a GUI. Is it bad to have one project with one POM file that creates 2 jars in this case…
JustBlossom
  • 1,259
  • 3
  • 24
  • 53
0
votes
2 answers

Jar execution error for package structure

I m trying to create a jar and execute it for the package structured java program. I m able to create jar but I m executing its throwing error. Folder Structure : Java_Example > pack > A.java package pack; public class A{ public void…
Pravin Satav
  • 702
  • 5
  • 17
  • 36
0
votes
0 answers

java -jar command is not working, no main manifest attribute

I m new to java and trying to learn about jar. I have created simple HelloWorld program. Created a jar file and trying to execute that jar. HelloWorld.java public class HelloWorld { public static void main(String[] args) { …
Pravin Satav
  • 702
  • 5
  • 17
  • 36
0
votes
2 answers

Java maven project - works when running from main class, but not from 'fat' jar

I am trying to use a chess PGN parsing library to parse a PGN file and simply create a text file. The lib: https://github.com/bhlangonijr/chesslib My maven project: https://github.com/divukman/chess_pgn_text/tree/master/pgntotext Problem: I can…
Dimitar Vukman
  • 421
  • 6
  • 15
0
votes
0 answers

The executable jar file exported from Eclipse

I'm using Eclipse IDE for Java Developers. I made a simple game to test my skills with Java. The game is working well for now on Eclipse Console, but I'm experiencing a problem while exporting it to as running jar file. The .jar file I'm exporting…
denixius
  • 1
  • 1
0
votes
0 answers

Hot to start runnable .jar on mac by double clicking?

I would like to start my java code by double-click.Therefore I have exported my java project in Eclipse as "Runnable .jar". The file has the java icon, but when I try to start it, an error appears: "The Java JAR file "test.jar" could not be…
Alex
  • 1
0
votes
1 answer

How to package OpenJDK with a Jar file?

OpenJDK11 is just a zip file. So is there a way I can include openjdk in a file with with a jar file so that I can send a program to someone and they can run it? In other words, even if they have a different version of java on their machine, when…
JustBlossom
  • 1,259
  • 3
  • 24
  • 53
0
votes
1 answer

WARNING JAR will be empty - no content was marked for inclusion

Trying to package using Cmd, and getting [WARNING] JAR will be empty - no content was marked for inclusion! The build is successful but the produced jar-file is empty as per warning Sorry tried other solutions also and finally landed here, I am new…
gkiranreddy
  • 53
  • 1
  • 9
1 2 3
99
100