jar

Can classes of same package spread across multiple Jar files ?

Hi I am using some classes from a JAR file and they belong to a package (Say -- com.abc.xyz). The class am writing also belongs to that package but I won't be able to bundle my file into that JAR file. Is it possible to have classes that belong to the same package spread across multiple JAR files ? Thanks A Java Novice ...

How to share log4j library most effectively

i have a few batch java command-line applications which are planned to be deployed as: batch_apps app_1 batch1.jar run_batch1.sh app_2 batch2.jar run_batch3.sh {...etc...} what would be the best practice on organizing a shared library pool - for example log4j: batch_apps app_1 batch1.jar run_batch1.sh ...

client-side applet caching?

Is it possible to cache a jar file used in an applet on the client-side? I am reading conflicting information: it appears you can set a "cache" parameter with <object> + <param> However - I guess <applet> is the preferred way to go? I have not seen any sort of cache attribute for the applet tag. Does anyone know of a way to c...

Can I dynamically unload and reload (other versions of the same) JAR?

Hello! I am writing a server program which is used to run unit tests of an API (displaying lots of information and providing web access to control / monitor the whole thing)... This API is known to the server during compile time and is provided as a JAR. To be able to compare between unit test results of different versions of the API ...

Apache Cocoon JAR configuration - I want to use .class files !

Hey guys and gals I'm using the Apache Cocoon framework, set up several eons ago for the web app I'm developing. I don't know if its how cocoon is set up for everyone, or its if some 'special' configuration my company has performed, but this is what happens. In order for cocoon to use ANY class files, they must be bundled up into a JA...

Give an Executable Jar a Custom Image

Hi all, Just finished a little app that I want to distribute and at the moment for windows platform it is just an executable jar. Is there anyway to give this jar another image than the java cup? Thanks ...

What jar should I include to use javax.persistence package in a hibernate based application?

Is it ok to take it from Glassfish project ( glassfish-persistence-api) or may be there is a Hibernate jar? ...

Need a way to gather total size of JAR files

I am new to more advanced bash commands. I need a way to count the size of external libraries in our codeline. There are a few main directories but I also have a spreadsheet with the actual locations of the libraries that need to be included. I have fiddled with find and du but it is unclear to me how to specify multiple locations. C...

Jar files and FAT32

I am doing some analysis for a chunk of a desktop app we're working on. One requirement is that it be able to do i/o of some legacy file formats, which in practice are running as large as 800Mb each. An import might reasonably be expected to be on the order of 5Gb in size. Ideally, I'd just stick whatever files I want into a jar file,...

Binary Difference in Zip/Jar file

It seems like building a jar or zip from the exact same source files will always yield a different file. I tried this both using the java jar command, and the jar and zip tasks in ant. It appears to be due to the fact that new jars/zips have the timestamp set to the current time on each stored file. Is there a way to force a zip tool ...

Where is class weblogic.jndi.WLInitialContextFactory?

Hi, when trying to execute my jar file I get an exception: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory] I guess this is some kind of missing library on the classpath. Can anyone tell m...

JarScan, Scan all jar files in all subfolders for specific class.

We are seeing an older version of a class being used although we had the latest one deploy, to scan all jar files in all subfolders of appserver we need to write a small shell scripts that prints out jars in which this specific class is found. ...

My code compiles in Eclipse but I get a ClassNotFound at runtime how can I fix it?

What would cause a jar to be added successfully to an Eclipse Java project but then at runtime some of the classes from that jar are not found with ClassNotFound exceptions? ...

What's the difference between CLASSPATH "bootstrap entries" and "user entries" in Eclipse?

Eclipse has a Run Configurations screen with a Classpath tab. I had some jars listed in the "user entries" section of this tab but my project did not run until I duplicated those jar files into the "bootstrap entries" section. After the jars were listed in both sections, the project ran successfully. Why? What's the difference betwe...

JAX-WS Loading WSDL from jar

I'm writing a fat client that makes use of a SOAP service for some features (bug reporting etc.) I've got JAX-WS working fine, but by default (in netbeans at least) it fetches the WSDL from the remote server every time the service is initialized. I expect this helps provide some versioning support etc., but it's not what I want. I've ...

accessing properties files outside the .jar?

I have a .jar file I'm putting together. I want to create a really really simple .properties file with configurable things like the user's name & other stuff, so that they can hand-edit rather than my having to include a GUI editor. What I'd like to do is to be able to search, in this order: a specified properties file (args[0]) MyApp...

How To Check Dependencies Between Jar Files?

Hi all, 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 yes, no documentation exists. The system has over 40 jar libraries, and most of them are redundant due to old versions and testing. To remove one jar, I must check that it...

update file in a jar

I'm trying to update a file in an existing jar (in this example antlr) using the command: jar -uf antlrworks-1.2.3.jar org/antlr/codegen/templates/Java/Java.stg But I get the following message java.util.zip.ZipException: duplicate entry: antlr/ANTLRError.class at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream...

Getting the absolute path of a file within a JAR within an EAR?

I have a J2EE app deployed as an EAR file, which in turn contains a JAR file for the business layer code (including some EJBs) and a WAR file for the web layer code. The EAR file is deployed to JBoss 3.2.5, which unpacks the EAR and WAR files, but not the JAR file (this is not the problem, it's just FYI). One of the files within the JAR...

Get size of jar file loaded by urlclassloader

Does anybody know a good way to find the file size that is dynamically loaded by urlclassloader? I am using the urlclassloader in the following manner, but need to keep track of how much bandwidth is being used. URLClassLoader sysloader = (URLClassLoader) ClassLoader .getSystemClassLoader(); Class<URLClassLoader> sysclass = URLCla...