jar

Create Runnable JAR with .properties files using Java Eclipse

Hi, I'm trying to build a runnable JAR using Eclipse's Export function. everything works fine except several .properties files I have under the root directory. I added all the .properties files into Build Path, and they appears under 'Order and Export' tab in Java Build Path dialog. However, when I try to run the Export, I got the foll...

jar policy file

I'm packaging my java application into a jar file but it only packages the class files. When I run the java program from the command line, usually this is what I have to do: java -Djava.security.policy="..\java.policy" Server My question is: is there a way to package a jar file and include this policy file? For instance, When the user ...

How to patch a subcomponent in a maven-managed framework?

I need to patch the mule-transport-jms subcomponent of mule for this bug (http://www.mulesoft.org/jira/browse/MULE-3983). The "fix" is straightforward but what is vexing me is deploying the patched component to my local maven repo (managed by Nexus) and having it continue to play nicely with all the other components of mule. What I w...

Why is an "L" getting added to my Java path?

I have a jar loaded in my classpath (in iReport if it matters) that I am certain has the desired method yet when I try to test the connection, thus calling the jar, I get a java.lang.NoSuchMethodError, saying it is referencing the class Lorg/springframework/web/context/WebApplicationContext I'm not sure if this is related to the probl...

Maven - how can I add an arbitrary classpath entry to a jar?

I have an unusual situation where I need to add an arbitrary classpath entry (that points to a jar file) into the manifest of an executable jar. (This is for a Swing desktop application.) The maven-jar-plugin generates the "Class-Path" entry for the jar manifest using the maven dependencies, and there doesn't appear to be any way of add...

java -- compiling with a .Jar file -- help?

Hey, I'm trying to compile my class along with a provided .jar file which contains classes that my class will use. This is what I've been trying: javac -classpath .:WordSearch.jar WordSearchSolver.java And this is the response: WordSearchSolver.java:16: cannot find symbol symbol : class PuzzleWord location: class WordSearchSolver ...

How to pass Properties to jar from Powershell ?

Hi, I've been using Powershell-1.0 for command line needs for a while, instead of cmd.exe. Unfortunately, there are still some caveats when using java. I need to pass a property to a jar, like that: java -jar -Duser.language=en any.jar This line works fine in cmd.exe, but not in Powershell as it searches for another jar: Unable to ...

Jar files for PDF generation through Java

Where can i get the following jar files from-: adobe-livecycle-client.jar adobe-usermanager-client.jar adobe-utilities.jar? How do i download these jar files? ...

Not able to run my jar file on Windows

I have these files board.class and x4.class (x4.class has main() method). To jar these files, I wrote jar cf x4.jar *.class and got a x4.jar file. I copied this x4.jar file to my Desktop (on windows Vista) and double-clicked it. I am getting this error: Failed to load Main-Class manifest attribute from C:\Users\eSKay\Desktop...

Maven dependency questions

So I finally took the dive and installed maven2 but I've got some problems. My code relies on some third party jars which I installed using install:install-file. I then listed those jars as dependencies in my pom. Maven can compile and package it all fine and dandy. But when I run my jar like so: java -cp "target/*" com.blah.App It do...

how to write java program which can extract a jar file and stores its data in specified directory(location)

I have created a jar file now i created another java program. I want to unpack that jar file in some other directory means i want to do something like unzip. If i run jar -xf filename.jar This causes some error: Exception in thread "main" java.io.IOException: Cannot run program "jar": java.io.IOException: error=2, No such file or direc...

How do you include .jar files in a Java library?

How do you include .jar files in a Java library so that it can be imported directly in a program? ...

How to run CoMIRVA jar ?

I am new in java but I need to run CoMIRVA (http://www.cp.jku.at/people/schedl/Research/Development/CoMIRVA/webpage/CoMIRVA.html) I've download comirva-0.2.N3.jar and put the required libraries in the same folder. When I run the command "java -jar comirva-0.2.N3.jar" it gave me: "Exception in thread "main" java.lang.NoClassDefFoundError...

groovy ant task

Hi, I'm using the groovy ant task to compile my groovy files, but it seems like groovy locks the jar file so it can't be moved, deleted, signed, etc. Has anyone run into this bug before and have a workaround? Seems weird that if I run the groovy ant task and compile to a jar file that groovy doesn't release that jar file. thanks, Jeff...

How to run SpeakerIdentApp, a MARF example?

I've download the bin files "SpeakerIdentApp-bin-0.3.0-devel-20060226.tar.bz2" in http://sourceforge.net/projects/marf/files/. I've extracted them and thrrought the console I made: java -jar SpeakerIdentApp.jar It happears the help saying how the command must be performed. If I execute java -jar SpeakerIdentApp.jar --stats it works I...

creating jar file

can some one explain me how to crate jar file. my source folder has various sub folders and image files. you can see images explaining source folder structure from following url http://img63.imageshack.us/gal.php?g=capturev.png. when jar is created using eclipse export jar function, it only include class files only , but i want to crea...

Java Classloader - how to reference different versions of a jar

Hi All, This is a common problem. I'm using 2 libraries A.jar and B.jar and these depend on different versions of the same jar. Let's say that at runtime I need THIS.x.x.x.jar MY.jar -> A.jar -> THIS.1.0.0.jar -> B.jar -> C.jar -> THIS.5.0.0.jar I can compile the specific jar (A.jar/B.jar) against its dependency but at r...

How to turn directories to .jar files with Ant

Hi All ! How to turn a list of directories into a list of .jar files ? It seems that using Copy Task and Mappers is the right way to do this but I did not find any nested element creating a jar file from a directory. Of course, the list of directories would be computed and not hard coded in the ant script. For instance, a foo director...

Java Desktop.open(File f) reference file within JAR?

It is possible to for Desktop.open(File f) to reference a file located within a JAR? I tried using ClassLoader.getResource(String s), converting it to a URI, then creating a File from it. But this results in IllegalArgumentException: URI is not hierarchical. URL url = ClassLoader.getSystemClassLoader().getResource(...); System.out.prin...

Optimizing images in a jar-file

Is there an advantages to putting all my small widget graphics in one single png-file, which is loaded once, and then creating ImageIcons for buttons and such from sections of this? (Normally I would just use new ImageIcon(aClass.class.getResource("/path/with/image.png")).) What would be a good way of doing this? ...