executable-jar

create a executable jar using maven and jetty

眉间皱痕 提交于 2019-11-28 07:52:37
I want to start my application using jetty, so I have added the dependency mentioned below. and when I run the main method Jetty starts successfully.(I am working on a struts2+spring3+ hibernate maven project, i am able to deploy it in tomcat too) Now I want to create a executable jar from a war packaging pom. So i added maven-assembly-plugin to my pom. (I tried with maven jar plug-in but it was not adding the dependencies) Sources plugins <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <archive> <manifest> <mainClass>com.dca.engine

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

若如初见. 提交于 2019-11-28 07:32:26
问题 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 6.1? 回答1: Running a jar is as simple as java -jar filename.jar 回答2: as Laplie said, java -jar your.jar EXECUTABLE file : see this thread for answers How can I convert my Java program to an .exe file? 回答3: One of the best technique to run the jar file or

Building FatJar for JavaFX with gradle and intellij, getting NoClassDefFOundError

房东的猫 提交于 2019-11-28 06:43:22
问题 I have set up an OpenJDK 12 project in IntelliJ (2019.2) using the built-in Gradle support. To design the GUI I'm using JavaFX 12. I have followed and read the setup guide several times, I have no issues running the program in my IDE, the issue is when I try to build a .jar file for distribution that I run into problems. I have not been able to find a solution that works so far and I've searched QUITE a lot, nearly tearing my hair out over this. Currently when i try to run my jar file with

creating an uber jar with spring dependencies

蹲街弑〆低调 提交于 2019-11-28 05:23:21
问题 I'm trying to create an application über jar, but running into an issue due to a dependency on the spring framework. In particular, the namespaces for the xml schemas are problematic. You get the infamous NamespaceHandler problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/c] For creating (simple) uber jars, Creating a bundle jar with ant, but this doesn't work if you have spring dependencies due to the fact that the spring jars

Spring-Boot Resource Not Found when using executeable Jar

妖精的绣舞 提交于 2019-11-28 04:31:19
问题 again I face a strange issue and hope someone here can help. I have a spring boot backend module, what works in eclipse well and application is executeable when starting main in application.java. Everything fine. My application makes import of example data to database using csv-files what is included in src/main/resources folder. As mentioned, when starting in eclipse everything works. Now I would like to execute it as executable jar, the application begins to start and then it failed to

Starting up embedded jetty server for a JAR file

旧时模样 提交于 2019-11-28 03:27:03
问题 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 this: ~/Projects/Java/web-app/out: web-app.jar dependency1.jar dependency2.jar dependency3.jar I know and am sure that my problem does not arise from dependencies, as my application functions properly, right up to the moment I start up Jetty embedded. The code I use to start Jetty is like

Generating a Jar in Eclipse including external library

谁说我不能喝 提交于 2019-11-28 01:27:23
I have a java application I've written in eclipse. It works fine there. It works fine run from a command line in the directory where I export it to. In that directory is another directory containing two jar files that I need for the application, and the manifest file has a Class-path option specifying them. I want a way to use eclipse to generate the necessary file(s) to package this application to run on another machine. Is that possible? If I choose "create executable jar file", it creates this huge file; it does unpack and repack the two libraries, which I know is one way to get their

Run a jar File from java program

社会主义新天地 提交于 2019-11-27 23:15:42
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) { JOptionPane.showMessageDialog(null, "Exception occured" + ex); } But its not working. I tried google and it gave me the examples using ProcessBuilder, but that is not working either. Using ProcessBuilder(java.lang.ProcessBuilder) will solve your problem. Syntax is as follows - ProcessBuilder pb = new ProcessBuilder("java", "-jar", "absolute path upto jar"); Process p = pb.start(); You can redirent input

Jersey exception only thrown when depencencies assembled into a single jar

旧街凉风 提交于 2019-11-27 19:21:19
I'm writing a server that embeds Jetty w/ Jersey. When I execute from Eclipse, everything is great. However, if I assemble my server and all dependencies into a single jar using Maven's assembly:single goal, I get an exception: Sep 26, 2012 5:35:59 PM com.sun.jersey.spi.container.ContainerResponse write SEVERE: A message body writer for Java class com.acme.server.webservice. exception.WebServiceFailure, and Java type class com.acme.server.webserv ice.exception.WebServiceFailure, and MIME media type application/json was not fo und Sep 26, 2012 5:35:59 PM com.sun.jersey.spi.container

including an exe file to jar

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 19:00:07
问题 I have written a java program that is actually works as a gui to an existing command line program. so in basic all my program does is Runtime.getRuntime().exec("myprogram parameter"); . So I have exported my java source as a executable-jar file by using Eclipse IDE and it is working nice, however I indeed need to include this myprogram.exe to the directory of the generated jar file inorder to work. Now I am looking for a way to include myprogram.exe inside the jar file so I can keep it