executable-jar

including source files in runnable jar file

流过昼夜 提交于 2020-01-11 11:55:34
问题 I have to create the installer with runnable jar file ,when the jar file will run it has to copy the files on some directories. I have included few folders in the java project as in the below image : I have to paste dcc, contactless and vfsc5000 folder on to certain directories. I am using this piece of code : public class copyFiles { // private static final String MAIN_PATH = "C:\\Users\\Hamza\\Documents\\"; private static final String MAIN_PATH = "resources"; public static void main(String[

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

☆樱花仙子☆ 提交于 2020-01-09 22:16:45
问题 i have build a jar file from my spark app with maven (mvn clean compile assembly:single) and the following pom file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>mgm.tp.bigdata</groupId> <artifactId>ma-spark</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>ma

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

强颜欢笑 提交于 2020-01-09 22:11:29
问题 i have build a jar file from my spark app with maven (mvn clean compile assembly:single) and the following pom file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>mgm.tp.bigdata</groupId> <artifactId>ma-spark</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>ma

How to create/edit .class file codes

允我心安 提交于 2020-01-07 04:10:41
问题 I would like to know if there is a way to edit the codes in a class file? Because I dont seem to be able to compile a java file into a class file with the use of cmd as it will always detect errors . The Jar file that I am using already have its own existing class files and I would like to update one of the the .class file with a few lines of codes. But when I copied the codes from the class file and put it into a java file together with my added lines of codes, and then try compiling it

Creating and running a Jar file

好久不见. 提交于 2020-01-06 16:54:54
问题 I am a beginner in java programming. I have created a package called Comp Project which contains two classes.... ATM: It has various functions to carry out actions of atm screen. Main: This class calls all the functions from ATM and executes them. Now the program is running good and I have to create a jar file. I created a Jar file with the main class selected as Main . But when I try to run it....it doesn't work. The problem is that i don't understand what creating a manifest is...I looked

Java application runs properly in Eclipse, but not as .jar

五迷三道 提交于 2020-01-05 09:32:57
问题 I'm creating a Java app that creates 4 PDF files using iText. On the one that creates a PDF with an image in it, the .jar creates a 0 byte file and does not continue execution. However, when I Right Click >> Run As >> Java Application, it works just fine. To create the jar, I'm doing the following Right click src Export Runnable JAR file Extract required libraries into generated JAR Finish And the file "penguin.jpg" is under the src directory. Here's my code import com.itextpdf.text.*; import

SAX parsing through a jar file declares XML document invalid

自古美人都是妖i 提交于 2020-01-05 08:00:50
问题 The picture is self explanatory. When I validate the document using identical process in CMD, the document is declared valid. It is valid when checked manually. The jar file generates this message: Invalid schema_reference.4: Failed to read schema document 'E:/XML and Java/Pro XML Development with Java/schema.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. The question is: WHY? The process of validating

Executable Jars running very slowly

为君一笑 提交于 2020-01-02 05:33:17
问题 I've done several projects and packaged them into jar files, but I've noticed that my jar files run much more slowly than in my IDE. I use Eclipse to compile and run my programs. In Eclipse, I have everything working. When I package my project as a runnable Jar and execute it by double-clicking, everything still works. But when I have animation, the program runs extremely slowly. Instead of 30 frames per second in Eclipse, I now get about 2 frames per second. The animation is very laggy.

How to execute jar with command line arguments [duplicate]

旧街凉风 提交于 2020-01-02 02:51:23
问题 This question already has answers here : Closed 8 years ago . 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 with two arguments;how can i achive this i have mentioned a executable.java as a main class in a manifest file and using ant i have to run this file from ant run with command line

How to create a runnable jar with maven that includes dependencies in a separate “lib” folder (not an uber jar)

风流意气都作罢 提交于 2020-01-01 03:45:13
问题 I'm trying to use Maven to create an executable jar file that includes the dependencies in a separate directory. I've seen a lot of questions on SO about creating an "uberjar"--I don't want that. What I want is to have the depenedencies copied into a "lib" directory like so (and the jar MANIFEST.MF file with a ClassPath entry that points to them): /myApp myApp.SNAPSHOT-1.0.jar /lib hibernate.jar log4j.jar ... As an added bonus it would be nice if I could copy /src/main/resources/* into /myApp