executable-jar

problem creating an executable jar with maven using spring 5 and hibernate 5 => BeanDefinitionParsingException

随声附和 提交于 2021-02-11 13:48:18
问题 Update: As there is only one answer for now I try to describe it better now. In short words, my test application runs fine in eclipse and when starting with mvn exec but building a running/working executable jar package does not work for this project. Now the longer description. I'm learning Java for about 8 month and use maven to setup build projects and Eclipse as IDE for writing and debugging. Currently I am trying to make some small database projects using Spring, Hibernate and for

Run an executable JAR with external class path

对着背影说爱祢 提交于 2021-02-10 20:51:40
问题 Using Maven I compiled my project into a JAR that includes all the dependencies except for one big dependecy. The inclusion of the dependecies is done using: <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2.1</version> <configuration> <archive> <manifest> <mainClass>com.mypackage.Main</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id>

Run an executable JAR with external class path

非 Y 不嫁゛ 提交于 2021-02-10 20:50:49
问题 Using Maven I compiled my project into a JAR that includes all the dependencies except for one big dependecy. The inclusion of the dependecies is done using: <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2.1</version> <configuration> <archive> <manifest> <mainClass>com.mypackage.Main</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id>

Maven executable Jar throws error on start [duplicate]

不想你离开。 提交于 2021-02-08 14:25:09
问题 This question already has answers here : How can I create an executable JAR with dependencies using Maven? (31 answers) Closed 3 years ago . First of all: I am new to maven. I made my first maven Application and successfully tested it within the IDE. The build was always successfull and everything worked like a charm. Now I want to export the project as an executable jar with the dependencies built in, but I am not quite sure why it is not working. I added the following to my pom file, as

Build java application that uses opencv portable

浪尽此生 提交于 2021-02-08 10:23:17
问题 I want to create executable .jar file that opencv is embedded in the package. I mean that I can run it on another computer. Please, someone helps me??? I have this code in file SimpleSample.java : import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.CvType; import org.opencv.core.Scalar; class SimpleSample { static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); } public static void main(String[] args) { System.out.println("Welcome to OpenCV " + Core.VERSION); Mat m

How to run saxon xslt transformation in java

十年热恋 提交于 2021-02-07 06:34:27
问题 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 making. I have put the saxon9he.jar in the build path but how can I call that same command outside the commandline? 回答1: The documentation is here: http://www.saxonica.com/documentation/index.html#!using-xsl/embedding Saxon offers two APIs for running

What is System.out exactly?

徘徊边缘 提交于 2021-02-04 17:53:05
问题 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 the site: System.out.println in jar There is no problem doing like that. But where do you expect to see the output? What happens to “System.out.println()” in executable jar? If you run the code in some way that doesn't attach a console - such as

Generate .JAR from IntelliJ

守給你的承諾、 提交于 2021-01-29 04:31:35
问题 I am attempting to create a JAR from IntelliJ using the build artifacts but when I do it is saying Error: Invalid or corrupt jarfile Im not sure what im doing wrong though? 回答1: Hard to tell from what you have posted. Intellij can be finicky at times especially with the Artifact jar build interface. There is a good tutorial on IntelliJ's website on how to set up the artifact. One area that may provide difficulty is pointing to the Main Class. An issue I had in building a jar using the tool

include application-properties from multiple modules in maven multi-module spring-boot executable jar

帅比萌擦擦* 提交于 2021-01-28 10:58:32
问题 we have a maven multi-module pom project with a core-module where i want to keep common application.properties, like database-access, email-gateways etc. Is it possible to integrate those application*.properties in the executable jar of the other modules as well (jars built by spring-boot-maven-plugin )? when taking a look into the built jar, you can see that only the module's resources are integrated, all other modules are ignored. Thanks 来源: https://stackoverflow.com/questions/49856000

Cannot run python script from java jar

前提是你 提交于 2021-01-28 05:22:16
问题 While working in IntelliJ everything worked but after I built jar it stopped. At first, it was just me forgetting to put it in jar build config, but now after making sure it is there, I still can't run it. These are ways I try: InputStream script = mainView.class.getResourceAsStream("vizualize3D.py"); Process process = new ProcessBuilder("python3", "-").start() ; Process p1 = Runtime.getRuntime().exec("python3 " + script); Runtime rt = Runtime.getRuntime(); Process pr = rt.exec("python3 " +