I would like to modify a file inside my jar. Is it possible to do this without extracting and re jarring, from within my application?
File i want to modify are configuration files, mostly xml based.
The reason i am interested in not un jarring is that the application is wrapped with launch4j if i unjar it i can't create the .exe file a...
Hey guys,
I can't quite figure out how to add all of my .jar dependencies to my client jar.
This is what I have so far:
<target name="create-metrics-client" depends="clean,build">
<jar destfile="sd-metrics-client.jar" basedir="${build.home}">
<manifest>
<attribute name="Main-Class" value="com.mycompany.client.M...
Have a project developed in JBuilder 2007.
I can create a jar with the compiled classes and resources by right-clicking on the project in Package Explorer and selecting Export, but is there a way to set-up the project to automatically generate the jar file, whenever the source changes ?
...
Hey guys,
How exactly should I specify the location of all the properties files inside the ant manifest?
My jar is not working because it can't find the log4j, Spring, etc properties.
These files are all contained within a folder called "server-config" that sits at the same level as the source code, ie:
META-INF
com
server-config
...
I created a JAR file like this:
jar cf Predit.jar *.*
I ran this JAR file by doubling clicking (it does not work). So I ran it from the DOS prompt like this:
java -jar Predit.jar
It raised "Fail to load main class" exceptions. So I extracted this JAR file:
jar -xf Predit.jar
and I ran the class file:
java Predit
It worked wel...
I have a web app: MyApp.war, inside it, I have a jar file: WEB-INF/lib/PublicJar.jar
I want client applications to be able to download that jar like a web resource.
e.g http://theserver.com/myapp/jars/PublicJar.jar
I want the web application to be able to compute the hashcode of the jar file to
see if it has changed, so clients know i...
It's not in apache-log4j-1.2.15.tar.gz available from the Apache website and the mirrors, and Google returns nothing. Apache Commons Lang had a javadoc jar within the tar.gz file for the release, but no luck finding the same inside the log4j tarball unfortunately.
...
Hi everyone!
I recently created an application and successfully jarred this to c:/my/folder/app.jar. It works like a charm in the following case [Startup #1]:
Open cmd
cd to c:/my/folder
java -jar app.jar
But when I do this, it doesn't work [Startup #2]:
Open cmd
cd to c:/my/
java -jar folder/app.jar
Because app.jar contains a ....
Hi All,
I have deployed 2 apps as app1.war and app2.war on jboss. These two apps use a common java package, say, myPackage. Earlier my wars looked like this
========================================================================
app[12].war/
-----web.xml
-----app specific classes (.class files like)
-----appClass1.class
-----appCl...
I am trying to access the class files packaged as a library but unfortunately the jar libraries should be packaged in another jar file.
As an example say I have a.jar that contains some class libraries. I can call (import) the classes in the jar file from my external java application. Now I need to put this a.jar inside another jar say...
This is my first time trying to use Web Start, and I am trying to launch my runnable jar. I get the following error from my webpage as I click the link to launch the jar. Can anyone help me out? The Notepad example from the tutorial works fine from another link on the test page (JNLP and jar in same folder as I have too). The jar and jnl...
Hi all,
I am a newbie to aspectj...
I have written the following aspect which is intended to add logging to function calls of type public * doSomething*(..). If my main class is part of the same project the weaving of the aspect is performed without a glitch and the code executes. If I pack up the weaved code into a jar and call it fr...
How do I set up multiple entry points in an application client jar?
I am using Glassfish application server. I can grab the client using
asadmin get-client-stubs --appname APPLICATION_NAME .
I currently can run the default mainclass that I have specified in the MANIFEST.MF. However, I want to be able to specify another mainclass a...
Is it possible to sign a jar file as you export it from Eclipse 3.5? Or a plugin to allow this to happen?
I can easily export a runnable jar, and sign it myself using jarsigner, but manually doing this every change is not efficient.
...
Hi there. For a java project I'd like to merge all third-party jars it depends on into the main jar created by Apache Ant, which I already managed to do.
The problem is that some of these jar-files have signature-files in their META-INF-directories, so when I try to run my jar-file, I get the error message "Invalid signature file dige...
I am new to using ANT and am trying to include third party jars in the build using Eclipse 3.5. I keep getting "cannot find symbol" errors in the compilation, so obviously it is not taking these two jars into consideration. If anyone can show me where I am going wrong, or suggest another route, I would appreciate it. Thanks.
JarPath bel...
I have a java project that is built with buildr and that has some external dependencies:
repositories.remote << "http://www.ibiblio.org/maven2"
repositories.remote << "http://packages.example/"
define "myproject" do
compile.options.target = '1.5'
project.version = "1.0.0"
compile.with 'dependency:dependency-xy:jar:1.2.3'
compil...
How does one create a JAR file programmatically using java.util.jar.JarOutputStream? The JAR file produced by my program looks correct (it extracts fine) but when I try loading a library from it Java complains that it cannot find files which are clearly stored inside it. If I extract the JAR file and use Sun's jar command-line tool to re...
Hello!
Netbeans doesn't allow me to specify, which files I want to have additionally
included inside the JAR.
Can I work this around by editing the manifest.mf?
Or by editing build.xml?
What else could be done?
EDIT
I need the files to appear in jar's root (files such as LICENSE.txt
or some exec script), because otherwise they would...
Using Hudson, Ant 1.7, Tomcat 6.20, JDK 1.6 and JDK 1.5; all on Windows boxes.
My Ant build script for a WAR file uses JARs stored on a remote server. The directory path to the remote server is mapped as a network drive in Windows. A build.properties file is used to specify the paths to the JAR dependencies. When building with Ant, e...