jar

Executable jar doesn't start normally

戏子无情 提交于 2019-12-25 00:09:02
问题 I created an executable jar file with eclipse indigo, but when i double click on it nothing happens. But when i write java -jar c:/dir/filename.jar to cmd, it works. Other jars runs well. I'm using jdk 1.7.0_02 and eclipse indigo. How could i start it normally? 回答1: You can run a jar by double clicking it, you just have to make sure that Java is associated with .jar files. The easiest way to do this is by reinstalling the JRE (which generally does it for you). Otherwise you will need to

Can I make a jar execute a python script?

余生长醉 提交于 2019-12-25 00:00:12
问题 Is there some way to call a script within a jar without extracting it? 回答1: Python will interpret a file named "__main__.py" stored inside a zip file, if called with one as a parameter. Since jar files are zips, all you have to do is name your Python script as "__main__.py", or create a "__main__.py" script that imports your main script, and from Java, invoke the Python interpreter as an external process, passing the .jar file path as its sole argument. (Importing other Python modules from

Denodo Jar get conflicts with Play Framework Jar

一笑奈何 提交于 2019-12-24 22:02:09
问题 I am using : Latest version of play framework wi.-> 2.3.5 Latest version of Denodo -> 5.5 win Denodo is using Apache Common Codec 1.3 whereas Play is using few new methods introduced in Apacahe Common Codec 1.4 (E.g. Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.sha1Hex(Ljava/lang/String;)Ljava/lang/String; ). Somehow denodo's legacy jar is getting preference over play's jar. Is there any way to get rid of this situation? 回答1: Instead of using the denodo

How should i use a jar file?

≯℡__Kan透↙ 提交于 2019-12-24 21:48:44
问题 I have a jar file which contains some classes those which i want to use in my project. I am working in command line and not in eclipse. Please tell me how i should use those classes in the jar file for my project. 回答1: Use the -classpath command line option: javac -classpath library.jar MyProgram.java And then to run it, specify the classpath again - including where your actual code is: java -classpath library.jar;. MyProgram (That's assuming you're using Windows. On Unix use : instead of ;

Images not loading in executable jar

家住魔仙堡 提交于 2019-12-24 21:33:02
问题 Note: I did try out ImageIcon background = new ImageIcon(getClass().getResource("MyImage.jpg")); mentioned in all the answers. My project works fine using netbeans IDE run. But once I export to an executable jar using 'Clean and build', A null pointer exception is thrown and the frame with the image will not even open. (The executabe jar is in the 'dist' folder) Even after using relative path, the image will never load. I put the image in same directory as the executable jar.(dist) I put the

How to update rt.jar file?

[亡魂溺海] 提交于 2019-12-24 20:21:52
问题 I want to add some class files to rt.jar . How am I able to do that? 回答1: Your question indicates you have some misunderstanding of the java platform. First of all you need to know what the rt.jar is and what it does: rt.jar is the jar that contains all the classes necessary for the java runtime. Hence it's name rt .jar Now that you know that, you need to know how your java program runs: Your java program, all your jars and classes are executed by the java virtual machine. So as you can see

Jenkins : Add custom jar in maven project

纵然是瞬间 提交于 2019-12-24 19:24:50
问题 I am trying to add custom jar which is not available in Maven repository. When I am executing in local I am pointing to the Jar path, So no issues. But when I execute with Jenkins I am facing issue as Could not resolve dependencies for project . Also it list down the two Jar file missing which I added custom. So help me how to add the custom Jar wile executing using Jenkins. Also I am using Nexus for binary storage. After Jenkins executes successfully the image file will be posted to the

Google Fit Android plug-in for Unity3D

可紊 提交于 2019-12-24 18:41:10
问题 I am relatively new to Android development and Unity and I am trying to create an Android plug-in for Unity3D that detects steps and distance using the Google fit Sensors API. I have already exported my plugin as a jar file, imported in on Assets/Plugin/Android together with my AndroidManifest.xml and when I try to build and run on my phone I get this error: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.fitness.request.OnDataPointListener" on path: DexPathList[

Creating Jar archive gives “Could not find or load main class”

时光毁灭记忆、已成空白 提交于 2019-12-24 17:28:33
问题 $ cat Manifest.txt Main-Class: org.fenix.llanfair.Llanfair $ cat org/fenix/llanfair/Llanfair.java | grep main public static void main(String[] args) { $ jar cfm Llanfair.jar Manifest.txt org $ java -jar Llanfair.jar Error: Could not find or load main class org.fenix.llanfair.Llanfair $ jar -xf Llanfair.jar $ cat Llanfair/META-INF/MANIFEST.MF Manifest-Version: 1.0 Created-By: 1.8.0_25 (Oracle Corporation) Main-Class: org.fenix.llanfair.Llanfair $ ls Llanfair/org/fenix/llanfair/ | grep Llanfair

Cannot export default Java libGDX project as a jar from Eclipse

梦想的初衷 提交于 2019-12-24 17:04:40
问题 When I export the default libgdx project as a runnable JAR file from eclipse and then run the .jar file, it simply pops up a black screen and then closes. When I run the project code from inside Eclispe, it works fine. The correct red screen with the "bad logic" logo is displayed by the program (this is what is supposed to happen). If I build the project from the command line using gradle with the command gradlew desktop:dist as instructed here and then run the jar that is created, it will