jar

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 JDBC driver for Postgres in the JAR fo my simple demo app driven by Maven [duplicate]

蹲街弑〆低调 提交于 2021-01-29 04:13:24
问题 This question already has answers here : How can I create an executable JAR with dependencies using Maven? (31 answers) Closed 1 year ago . How to make Maven include the JDBC driver for Postgres inside my app's .jar file? I added this dependency element to the <dependencies> element in my POM. <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.8</version> </dependency> The

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

徘徊边缘 提交于 2021-01-29 01:35:56
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

房东的猫 提交于 2021-01-29 01:33:09
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

狂风中的少年 提交于 2021-01-29 01:32:53
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

foo.jar is not marked as executable

不打扰是莪最后的温柔 提交于 2021-01-28 18:05:48
问题 I am new to Ubuntu. I am trying to make a simple Java swing app(lets call it foo) that displays a hello message followed by a user name.I am using Eclipse .Till here everything works fine.When I press the "Run" button my app shows app without a problem.Now I export my app as a runnable jar but when I try to double click the generated jar to execute the following message: Blocked: /usr/bin/java -jar The file 'home/user/java projects/foo.jar' is not marked as executable. However if I run this

Gradle not generate jar

我们两清 提交于 2021-01-28 08:54:08
问题 I have a problem with gradle. My project It consists of several modules (osgi). When I run command: ./gradlew clean assemble Gradle generate the jar file for each module, but I want use the command: ./gradlew clean compileJava to speed up the work, but with this command gradle don't generate the jar file for two module. what could be the reason? 回答1: You can see in the diagram in figure 1 from this documentation the dependencies between Java plugin tasks: see that assemble tasks dependes on

restore project from jar file

删除回忆录丶 提交于 2021-01-28 08:02:06
问题 first i'd like to point out that im fairly new to netbeans and java, couldnt exactly find what i need on the web. I downloaded a software's source files and was modifying it on netbeans. naturally when building the project, netbeans creates in (for example) documents/project_folder/dist/ a lib folder and the finished JAR file that i can use. if i delete by mistake the source files, and would like to apply all the changes i previously made to fresh source files using the JAR and lib folder i

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 " +

Prevent multiple instance of jar running

我们两清 提交于 2021-01-28 00:48:18
问题 I have my middle layer jar file running on the linux server. I want that jar file running in background non-stop. nohup java -jar RushMiddleLayer.jar & But when i re-run this command, another new instance of the jar created and running. I have searched through google. They suggested some options. "Bind a ServerSocket". But which is not working for me. Process killed after press enter or Ctrl+C. I want to have two benefits from the jar. One is always running with fail. Another if restart the