executablejar « jar « Java I/O Q&A





1. How to get the path of a running jar file?    stackoverflow.com

My code runs inside a jar file, say foo.jar, and I need to know, in the code, in which folder the running foo.jar is. So, if foo.jar is in C:\FOO\, I want ...

2. How to use a file in a jar as javax.net.ssl.keystore?    stackoverflow.com

I'm trying to do something like

URL clientks = com.messaging.SubscriptionManager.class.getResource( "client.ks" );
String path = clientks.toURI().getPath();
System.setProperty( "javax.net.ssl.keyStore", path);
Where client.ks is a file stored in com/messaging in the jar file that I'm running. The ...

3. Getting input and output from a jar file run from java class?    stackoverflow.com

I have a jar file that runs this code:

public class InputOutput {

    /**
     * @param args
     * @throws IOException 
 ...

4. "Invalid signature file" when attempting to run a .jar    stackoverflow.com

My java program is packaged in a jar file and makes use of an external jar library, bouncy castle. My code compiles fine, but running the jar leads to the ...

5. creating an executable jar file with ant which includes the build.xml file    stackoverflow.com

I am trying to use ant to build an application, run the application's main() method, run junit tests, and package everything in a jar file (source+build+libraries+build.xml). The classes include a runner ...

6. Stopping an executable jar file    stackoverflow.com

I have an executable jar file. Once started the only way to stop it is to go to the task manager and end the javaw process. Is there a cleaner way ...

7. My .jar file is not working in java    stackoverflow.com

I have created an application and it is working correctly when I am executing it through NETBEANS. After that I had clicked on "Clean and Build" to build a SiteScrapper.jar file. Now ...

8. Can I use the classpath to override a file in a jar that is being run?    stackoverflow.com

I have a JAR file that contains an application as well as configuration files for that application. The application loads configuration files from the classpath (using ClassLoader.getResource()), and has its dependencies ...

9. Modify Executing Jar file    stackoverflow.com

Hello Stack Overflow friends. I have a simple problem which i fear doesnt have a simple solution and i need advice as to how to proceed. I am developing ...





10. Error while running jar file    stackoverflow.com

I have created jar file which includes my .class , manifest file and dependency jar files like

jar cfmv custadvicejar.jar mymanifest.txt  Gchreportsautomation Bean Utils 
jxl.jar ojdbc14.jar
where
  custadvicejar.jar - is ...

11. Classpath problem: .jar file can access a file from Class-Path in manifest, but not from -cp command line parameter    stackoverflow.com

I have the file foo.jar in this directory structure:

+--+- /foo_lib
|  |
|  +- Ice.jar ...
|
+-- /swt-linux-gtk -- swt.jar
|
+-- foo.jar
where manifest says, in part:
Class-Path: . foo_lib/Ice.jar swt-linux-gtk/swt.jar foo_lib/o
 rg.eclipse.core.commands_3.5.0.I20090525-2000.jar...
It can be ...

12. Trouble Creating an executable Java Jar file    stackoverflow.com

I have the following Java code. It does what it is meant to do, but I am having problems creating a jar file.

import java.io.*;
public class openfile{
    public static ...

13. Unable to open specific JAR file in Java Code    stackoverflow.com

I'm not able to open my JAR file using the following code. Though, I'm able to open other JAR files.

try {  
        ...

14. Unable to run JAR file on another PC. Possible issue with Environment Variables?    stackoverflow.com

I've built a JAR file and it executes fine on my PC (XP) which has Eclipse installed. It also works on another PC, which also has Eclipse. I've tried running it on ...

15. How to read external xml file from jar    stackoverflow.com

i need to read an external XML file from my java application in jar executable file.
If I lunch it from console (java -jar package.jar) it works fine, but if I lunch ...

16. referencing data files in jars    stackoverflow.com

My Java program references a lot of data files. I put them in a top level directory called data/, along with src/ and bin/. In Eclipse, references to data/ ...





17. JAR file running from another directory?    stackoverflow.com

I created a JAR file with my Java program. This piece of code will open a few files inside a dir "Test", which is in the same dir as the JAR ...

18. Accessing documents packaged in a jar file    stackoverflow.com

Im trying to get the file path of a document that is packaged as a resource in a jar file so that i can display it in a swing application. ...

19. making a jar file    stackoverflow.com

I have written a code for client/server application. and I go to

properties>packaging
for making a jar file for it. but when I run my server side and then client ...

20. making a jar file for console    stackoverflow.com

I have a program without a GUI and I use console! So first I read a line from a user from console

BufferedReader userReader = new BufferedReader(new InputStreamReader(System.in));
and then ...

21. My jar file won't load images    stackoverflow.com

I am currently writing a program that I need to send to a friend as a jar. The program has images that need to be loaded for the program to work ...

22. Jar File - Prevent Access to Source Code    stackoverflow.com

I want to hand over a small Java app as a runnable jar but I do not want anybody to have access to my source code. Am I right in presuming ...

23. Execute .jar file from a Java program    stackoverflow.com

How to run a local jar file from a java program? The jar file is not in the classpath of the Java caller programm. Thanks

24. how distribute jar file    stackoverflow.com

I have build my project that has 5 jar files including my project jar file.I am unable to open the jar file of my project out side the IDE Netbeans.how ...

25. executable jar file for junit    stackoverflow.com

i need to run the junit testsuite in unix box. I need make an executable jar file for invoking the test classes. Can any one suggest me how to do create ...

26. How to run a class from Jar which is not the Main-Class in its Manifest file    stackoverflow.com

I have a JAR with 4 classes, each one has Main method. I want to be able to run each one of those as per the need. I am trying to ...

27. Why does my JAR file execute at CMD, but not on double-click?    stackoverflow.com

So I've been writing a simple 3D GUI application that I intended for users to use simply by double-clicking on the JAR file. I got it working perfectly before putting it ...

28. Using other documents outside a jar file    stackoverflow.com

I just realised that I cant use files from outside a jar archive. If thats the case then when I deploy apps that need other documents, say an xml file, do ...

29. Trying to get a properties file from a jar file in another jar file    stackoverflow.com

I have an executable jar file (A.jar), built with Eclipse, that relies on other jar files (B.jar) that are included in the jar file, and accessed via the jarinjarloader. While ...

30. passing parameter to a jar file which is called in a bat file?    stackoverflow.com

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 ...

31. creating jar file for application which in turn contains external jar file    stackoverflow.com

Hie all , I want to create an jar file for a java application, and i am able create the jar file for it properly.i followed the below link to ...

32. Is there any way to access the name value pairs of a MANIFEST.MF from the enclosing .jar file programmatically?    stackoverflow.com

For example, I want to add custom name:value pairs to a MANIFEST.MF and have the code that is inside the .jar file be able to read these name:value pairs? To make it ...

33. JAR file doesn't run anymore    stackoverflow.com

I have a strange issue, I was able to run a jar file successfully quite a few times without any problems. The GUI successfully appeared each time I ran this particular ...

34. jar file with bouncycastle libraries: NoClassDefFoundError    stackoverflow.com

I'm struggling to get my jar file working from a web browser. When I run the applet from Eclipse everything is OK, but from the browser I get a NoClassDefFoundError : ...