executable-jar

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:08
问题 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

passing parameter to a jar file which is called in a bat file?

≡放荡痞女 提交于 2019-12-31 01:33:11
问题 I have created a jar which needs to be called in a bat file. I need to pass all the command line arguments recieved by bat file to the jar. Can anyone please help me out. I know this is a stupid question, but i dont have any idea about jar and bat. On net i am unable to find the combination of both. Also note that i dont know how to retieve the command line arguments in the bat file. 回答1: Inside you bat file you will have java command just use java -jar helloworld.jar firstParam secondParam

How to make an executable jar file using IntelliJ from a Selenium/TestNG java file?

本秂侑毒 提交于 2019-12-30 06:05:30
问题 I've been Googling for days trying to figure out how to do this, if anybody has done this before I would greatly appreciate the help. I have an automation test project I've created in IntelliJ that automates a user interacting with a Web Application. I'd like to put that automated test (created in Java, using Selenium and TestNG) into an executable jar file that others can run by double-clicking the jar file. Every time I attempt to create a jar file by navigating to Project Structure ->

Packaging a Jython program in an executable jar

落爺英雄遲暮 提交于 2019-12-29 19:14:42
问题 I am trying to package a jython program into an executable jar which the user can simply double-click to run without installing jython ahead of time. Ultimately, I would like to include an additional library which I wrote with the jar, but at the moment I am just trying to package a simple program and have it run from the jar. I have tried following the jar instructions in the "Using the Jar Method" section here: Jython FAQ: Using the Jar Method I have also looked at slides 25-28 here: Jython

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

别说谁变了你拦得住时间么 提交于 2019-12-29 08:32:16
问题 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 prompt window and run in the command prompt as if i've just typed the java -jar myJar.jar line. When I double click the jar file I do think it is running because a visual part of the java is appearing, but there is no command prompt window showing

Eclipse : manually select main class for executable jar file

假装没事ソ 提交于 2019-12-28 23:57:08
问题 I have java project, and many class that have main method (just for testing purpose). When I create executable jar file by Eclipse, Eclipse will automatically selects which file is main class. (and often wrong). There is another way is change main class in manifest file in Jar file. But, it's so handy. So, my question is : how to choose this manually when create Jar file. Thanks :) 回答1: Eclipse will set the class you tell it to set. The wizard has a button for doing this. Menus: Export Java,

NoClassDefFoundError while trying to run my jar with java.exe -jar…what's wrong?

风流意气都作罢 提交于 2019-12-27 12:12:52
问题 I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes and try to run it with java 1.6 in the same cmd window, I start getting exceptions: C:\dev\myapp\src\common\datagen>C:/apps/jdk1.6.0_07/bin/java.exe -classpath C:\myapp\libs\commons -logging-1.1.jar -server -jar DataGen.jar Exception in thread "main" java.lang

Spring boot, runnable jar can't load package-info.class

▼魔方 西西 提交于 2019-12-25 16:57:55
问题 We use Spring boot with hibernate database mapping. The entities contains JSON columns mapped as a customized types defined using package-info.java file. When we run the spring-project from Eclipse IDE everything is ok and we can call our web services. When we generate an executable jar and we try to call our web services the following error is raised : mai 04, 2017 1:35:00 PM org.apache.catalina.core.StandardWrapperValve invoke GRAVE: Servlet.service() for servlet [dispatcherServlet] in

Export wizard application in netbeans

白昼怎懂夜的黑 提交于 2019-12-25 12:08:11
问题 I did a sample application mentioned in this link using Netbeans Wizard template https://platform.netbeans.org/tutorials/nbm-wizard.html But how do I export as executable jar. I just want to execute the project independently with out IDE. Any suggestions. 回答1: I can't find it in the tutorial that you point to but in order to share your newly created Netbeans plugin you need to export it as a binary NetBeans Module or .nbm file. Right click on your project and select Create NBM. Check this old

Jython 2.7.0 “Final Release” on Windows - difficulty including jars

♀尐吖头ヾ 提交于 2019-12-25 05:37:29
问题 I have a few projects which run using Jython 2.7b1 where I add the jars (in fact all the jars in a directory) by doing this: set CLASSPATH=.;"%SYSADMIN%\resources\java jar files/*" set JYTHONPATH=... C:\jython2.7b1\jython myproj\__main__.py But my latest project is using 2.7.0FR and this "set CLASSPATH" approach doesn't seem to work. I then tried this: D:\apps\jython2.7.0\bin\jython -Dpython.path="%SYSADMIN%\resources\java jar files/*" my_latest_proj\__main__.py ... but it didn't work. Then I