jar

ant error Unable to rename old file to temporary file

I'm using ant 1.8.0 and java 1.6.0.17 and I'm running into a strange problem. In my build.xml, I have a simple task that compiles the code <javac destdir="${dir.build.classes}" debug="on"> <classpath refid="classpath"/> <src path="${dir.src.java}"/> </javac> In the "classpath" is a jar, call it library.jar In a later task, I...

Glassfish War deployment Jar not loaded

I have a very annoying problem. So I want to include 2 jar files in my java web application (.war file) - to be loaded on glassfish version 2.1. The files are: axis2-adb-1.4.1.jar and wstx-asl-3.2.4.jar. In my console application, I simply add these to my classpath and they run fine. However, when I deploy this to glassfish (jars are...

where can i get the sandbox tag library jar file

Hi I am trying to use sanbox in my jsf application. So i need tag library for sandbox or jar file can anyone help me out in this. ...

How to use and package a JAR file with my Android app?

I have an API in the form of a JAR that I would like to use in my Android app. Not sure if it should be part of the project in Eclipse or kept separate and added to the project properties. This JAR also needs to be packaged with the application, so how is that done for Android apps? ...

Reducing the applet loading time

I have an html file which has a jar file included in it as an applet. When ever i am opening the html file its getting too much time to load the applet. Is there any way by which i can reduce this loading time?? ...

How to use jar files without package information?

I have a jar called "MyTools". The jar is in c:\data folder. I created a new file in the same folder called "UseTools.java". Now I would like to use some of the classes from the MyTools.jar in my UseTools.java. I tried this but it doesnt seem to work: import MyTools.*; public class UseTools { public static void main(String[] args)...

Update JAR used by Android app in Eclipse

My app uses an API from an external JAR file. This JAR file has been added into my project and added in the build path. My project builds and runs just fine, but now I need to update the JAR file (some code in those classes has changed). I created a new JAR and copied it into my project after removing the old one. Do I need to "re-import...

Add Maven generated site to generated package

Hi folks! In order to deliver an all-in-one Jar for our project, we are wondering if it is possible to include the project's generated site (generated via the site plugin) into the generated project's package? The idea behind this is very simple, we have a project named "sample" that demonstrates the usage of our API and we want to give ...

Webapp requiring additional jars (eg webservices-rt.jar) works in jetty 6 but not 7

I have a really simple web service which works fine in jetty 6: java -Djetty.class.path=/path/to/webservices-rt.jar -jar start.jar but the same commandline for jetty 7 fails with a ClassNotFoundException for WSServlet. I also tried adding the jar to lib/ext but that didn't work either. I've tried an example "hello world" app (also re...

Manifest vs Properties file format

After some searching on Google and here, I still haven't found any answer to the following: Is there a reason that JAR manifests don't just use the properties format? I am guessing this is historical but it would be nice to know how exactly this came to be was the decision not to use properties format explicitly made or was the proper...

Is it possible to run an executable jar file on a machine without installing java first ?

Can I include the rt.jar in my executable jar file and double click to run it without installing java on the machine first ? I hope it to use that rt.jar in my jar to start it self, possible ? If not, any other way ? ...

Java distribuion as jar file containg config, libs and deps

Hi folks, I am developing a framework that needs a lot of stuff to get working. I have several folders inside of my Eclipse project that are needed [root] - config - src - lib - serialized Also there are important files like the log4j.properties and the META-INF dir inside the src directory. I wonder if there is a way to distribute o...

Applet served by Java Web Start, resources requested to WEB Server before look in the JAR files

Hi everybody, I am new here and I apologize for my bad English. I have a little problem with an Applet class served by Java Web Start technology. I have some platform dependent JAR files which Web Start download correctly, but when I get the content by getResourceAsStream(String fileName) method of ClassLoader object, first is made a G...

AJAX with Struts 1.x Version

I am having an application developed with Struts1.3, Jboss4.X version and jdk1.5 Now as an enhancement we are planning to implement AJAX to the web application Can you please suggest me Whether I can use AJAX with Struts1.3 Framework? Which Jar I need to use if I Can implement AJAX? At Some website, I realised struts2-dojo-plugin.jar...

Java Netbeans JAR building and running

I have several packages in my Netbeans project. One of these packages has a main method, which is set as the main method for the project. I use clean and build and the Jar is created successfully, however when I try and run the .jar file The application does not run correctly. The Main.class that I am running has buttons that create i...

How to save a resource from an executable jar file to local drive ?

I wonder if there is a way to extract a resource file packaged in an executable jar file and save it to a local drive, so when a user downloads my jar file and double clicks on it, it will first save one file from the resource to his C: drive, then run my program. ...

How to include a resource file in the Jar file generated by Netbeans ?

I'm using NB6.7 to auto generate an executable jar file for my project, how and where to tell NB to include a certain resource into the result jar file ? I know if I put the resource in the "lib" directory, NB will put it into "dist/lib/", but what I want is to include the resource within the final executable jar, where in NB do I specif...

Can you bundle a JavaFX jar as an OS X application?

I'm looking for a way to bundle JavaFX applications similarly to the way I can bundle Java applications using Jar Bundler? I really would like to have a custom icon for my program(and the ability to pin it to the Dock). Is there a way to do this now, or do I have to wait for JavaFX to mature in the Java market? ...

How to build javadoc from sources within a .jar file?

I have to build Javadoc from myCode.jar that contains both sources and class files. Can I do it without extracting the jar? According to http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#classpath I should be able to do so this way: C:\>javadoc -d docs -classpath myCode.jar net\kem\jmx\CacheManagerMBean.java However, I g...

How to get the path of executed .jar file?

How do I get the path of a an executed .jar file, in Java? I tried using System.getProperty("user.dir"); but this only gave me the current working directory which is wrong, I need the path to the directory, that the .jar file is located in, directly, not the "pwd". ...