jar

Build JAR file with IntelliJ 14: Unable to access jarfile?

醉酒当歌 提交于 2020-01-04 03:57:41
问题 I'm trying to generate a JAR file out of a small library I'm writing. I understand that I need to add a custom Run/Debug Configuration to achieve that. So, I added this new JAR Application configuration: When I run the module with this configuration, I get this error: "C:\Program Files\Java\jdk1.7.0_79\jre\bin\java" -Dfile.encoding=windows-1256 -jar "" Error: Unable to access jarfile Process finished with exit code 1 I'm not sure why, but I think it has something to do with the warning in the

How to change JAR icon on mac?

浪子不回头ぞ 提交于 2020-01-04 01:53:07
问题 I have a JAR file on my mac called Test.jar, and the file works perfectly fine when I click on it. All it does is it just opens a small window, and displays "Test", so it's a simple application (I am new to Java programming). My question is how do I change the icon of the jar file to a different icon of my choice? I have yet to figure this out on my own, and I don't know what to do. Like I have already stated, I am using a mac, so MS Windows methods are probably different from what I have to

How to include remote jar dependency in Maven

自闭症网瘾萝莉.ら 提交于 2020-01-03 17:47:29
问题 I need to include a third party jar to my pom.xml (using Maven 3.2.5 on a Linux environment). If the jar file is available on the same machine that runs the build I can just declare the dependency in this way: <dependencies> <dependency> <groupId>Foo</groupId> <artifactId>Foo</artifactId> <version>Foo-1.0</version> <scope>system</scope> <systemPath>/myspace/javalibs/foo-1.0.jar</systemPath> </dependency> </dependencies> But what if the jar is on a different server such as <repositories>

SpringData JpaRepository not working when using @entity from a jar

末鹿安然 提交于 2020-01-03 15:57:15
问题 I have a new SpringBoot app to expose some services related to entities that live in a jar (included as a dependency in the POM). For the data access I plan to use SpringData so I can use the great JpaRepository instead of writing the DAO manually. The jar is visible from the code so everything compiles fine, but when Spring starts wiring the beans it throws the exception: Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.companyName.common.countrytype.Country at

How to know if a jar file is already running?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 15:36:40
问题 After a research in google i found good answers like: 1)using jps or jps -l to get the jars running under JVM OK with this answer but if the user has not java installed at all and i run my jar using for example a .bat file and a folder with java JRE. Also gps function is experimental and only JDK contais it and not JRE. 2)Check if jar running from shell I need a solution for this on windows platform.Although a platform indepedent solution is always prefferable. Something more about jps( cause

Setting Jetty resourcebase to static file embedded in the same jar file

雨燕双飞 提交于 2020-01-03 15:05:34
问题 I am trying to access static resource (eg. first.html) packed inside the same .jar file (testJetty.jar), which also has a class which starts the jetty (v.8) server (MainTest.java). I am unable to set the resource base correctly. The structure of my jar file (testJetty.jar): testJetty.jar first.html MainTest.java == Works fine on local machine, but when I wrap it in jar file and then run it, it doesn't work, giving "404: File not found" error. I tried to set the resourcebase with the following

Setting Jetty resourcebase to static file embedded in the same jar file

你。 提交于 2020-01-03 15:04:29
问题 I am trying to access static resource (eg. first.html) packed inside the same .jar file (testJetty.jar), which also has a class which starts the jetty (v.8) server (MainTest.java). I am unable to set the resource base correctly. The structure of my jar file (testJetty.jar): testJetty.jar first.html MainTest.java == Works fine on local machine, but when I wrap it in jar file and then run it, it doesn't work, giving "404: File not found" error. I tried to set the resourcebase with the following

jar file doesn't open upon double click

女生的网名这么多〃 提交于 2020-01-03 11:51:19
问题 When I double click the jar file, the GUI program doesn't start by itself. Instead I have to open the Command prompt and then type java -jar abc.jar and only then it starts up. Why is that? What do I need to do to avoid this? Is it that I have some problem with the default jar file opener? What should be the jar file opener? 回答1: Maybe you would like to follow the instructions in this post: Running JAR file on Windows. Just a minor note though. The exact syntax for me to work was in my

Do we still have to make a fat jar for submitting jobs in Spark 2.0.0?

拥有回忆 提交于 2020-01-03 09:57:08
问题 In the Spark 2.0.0's release note, it says that: Spark 2.0 no longer requires a fat assembly jar for production deployment. Does this mean that we do not need to make a fat jar anymore for submitting jobs ? If yes, how ? Thus the documentation here isn't up-to-date. 回答1: Does this mean that we do not need to make a fat jar anymore for submitting jobs ? Sadly, no. You still have to create an uber JARs for Sparks deployment. The title from the release notes is very misleading. The actual