dependency « jar « Java I/O Q&A

1. How To Check Dependencies Between Jar Files?

This is my first Q here :) I recently have taken the support and programming of a web system written in JSF. The code is kind of messy and redundant, and ...

2. Jar file dependencies in Java 1.4

I'm working on a small Java project that now connects to a MS SQL Server 2000 database, but will be shortly connecting to MS SQL Server 2005 database. I'm creating ...

3. Find a jar file given the class name?

This must be a very basic question for Java developers, but what is the best way to find the appropriate jar file given a class name? For example, given "", how ...

4. Running jar from different directory cannot find required dependency

I'm trying to run a jar ec/mobat/MOBAT.jar which depends on some jars located in ec/mobat/lib/. It works if I do:

ec/mobat/$ java -jar MOBAT.jar
However I want to be able to run the ...

5. Is it possible to create an "uber" jar containing the project classes and the project dependencies as jars with a custom manifest file?

I'm trying to create a executable jar(using maven) that contains the project classes and it's dependencies with a manifest file that has the entry for the main class and the class ...

6. Bundling different java classes in a single jar files in a single jar

basically what I have is an application server running liferay portal. and we also have custom portlets that have shared custom libraries as well as third party ones. for instance dwr-3.0, several drools ...

7. Create JAR file without including external dependencies

Is it possible to create a JAR file that requires external dependencies without including those dependencies in the JAR file? My google-fu has failed to give me an answer; everything that ...

8. What is the best practice for including third party jar files in a Java program?

I have a program that needs several third-party libraries, and at the moment it is packaged like so:

zerobot.jar (my file)
As far as I know the "best" way to handle third-party libs ...

9. How can I specify dependencies in the manifest file and then to include it into my .jar file?

I generated .class files by the following command:

javac -cp \directoryName\external.jar myPackageDirectory\ myPackageDirectory\
I needed to use -cp during compilation and name of .jar file of an "external" library (external.jar) to be able ...

10. Should I bundle source and class files in the same JAR?

Separate Jars

When creating JAR files, I've always kept the source separate and offered it as an optional extra. eg:
  • Foo.jar
  • Foo-source.jar
It seems to be the obvious way to do things and is very common. ...

11. Creating a jar file with multiple class dependencies

I am trying to run a jar file I made, I keep getting this error:

     java -jar Client.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Client (wrong name: Client/Client)

12. Use a resource from a jar file?

I'm trying to use an XML resource file which I package inside a jar file (let's call it wrapper.jar) I found this other thread which was very useful but I stumbled upon ...

13. How could I repack a jar file with all of its dependencies?

I am developing an application which is supposed to run standalone. However, this project involves a .jar file which contains a lot of dependencies, and if I simply distribute this .jar ...

14. How can I add a .jar file dependencies when building it with the command line tool?

Pretty straightforward question. Can it be done without the use of Ants or Maven? (And by that, I mean the command line tool specifically) Please notice that I don't want to create ...

15. A good website that tracks reverse dependencies of Java Jar files

Can anyone recommend me a site that tracks the metadata of Jar files including reverse-dependencies? To let you know what a reverse-dependencies are; Reverse dependencies of a given-jar are the jars that ...

16. How to run Applet with dependencies jar file in HTML

I have a jar file containing applet files which are dependent of below additional jar file. Its running fine as standalone jar file. The applet uses:

  1. xmlrpc-2.0.jar
  2. commons-codec-1.3.jar
But when I tried to run ...

17. How can I test if my jar file has any unresolved dependencies?

I'm writing a custom tool to build jar files from our build tree. We like to build "minimal" jar files that contain only the .class files actually referenced from the "root" ...

18. Jar File dependencies

19. Deploying a java application with class path dependencies as a .jar file

Hi, I have developed a java application with several class files with dependencies on 3rd party api's which were on the class path. Now I want to deploy this application as a packaged jar file,which on double click executes the Main() method as specified in the, my question is what's the best way to package those 3rd party jar files, ...

20. Building a JAR file with it's dependencies

.jar archives use the standard zip format, so you can use your favourite archive manager to add things. Or consult your build tool documentation to see how it would do it. But I agree with unvadim, this would make your application very hard to run. Better to deploy your application with your library classes in their own jar archive.

21. Running Jar file with dependencies