jar

package java applet with minimal dependencies, autojar plugin for buildr?

I'd like to build a java applet with all its dependencies included, but still keeping the jar as small as possible. I'm using buildr. It looks like autojar is the tool I'm looking for. Now I need to integrate the two. This is what I have: package.enhance do |p| p.enhance do |pkg| tempfile = pkg.to_s.sub(/.jar$/, "-unstripped.j...

Un signing a signed jar

I am using bouncy castle provider for AES encryption. I need to create a fat jar from bc and my jar but as soon as i do it i get Algorithm not found exception. Is it possible to get rid of the sign and create regular jar out of it? My build process is.. i unzip all jars in to my build directory. then remove META-INF directory compile ...

Can A Midlet invoke another Midlet?

I been looking around and at sources like this one they say that a Midlet can invoke another if they are in the same suite, or if they are in the same namespace and in the same jar file. I do not understand what a Midlet-Suite is? Also after searching through the web I did not find any documentation or code examples for One Midlet invo...

compiled Jar file contains excess class files

In a NetBeans Mobility Project I have attached a zip file to the Resources folder, this zip file contains around 10 .class files. In my mobility application I am actually using 4 classes from the zip file, however when I compile and build my project the destination jar file seems to contain all the 10 .class files from the zip file. I...

Question about Java Eclipse Export function

I'm trying out the Eclipse Java 'Export Runnable JAR file". It creates a single JAR with all files in it, which is great. But one issue, in my project I have two directories and a few external libraries, like the following layout src resources mypic.jpg JRE System Library Referenced Libraries a bunch of external libraries ...

Reading properties file from JAR directory

I’m creating an executable JAR that will read in a set of properties at runtime from a file. The directory structure will be something like: /some/dirs/executable.jar /some/dirs/executable.properties Is there a way of setting the property loader class in the executable.jar file to load the properties from the directory that the jar is...

Easiest way to unpack a jar in java

Basically, I have a jar file that i want to unzip to a specific folder from a junit test. What is the easiest way to do this? I am willing to use a free third party library if it's necessary. ...

How to prevent requests to server when loading properties that are already in applet jar file?

I maintain an applet that helps users to upload photos to our service. The applet jar file has a few .properties files: >> jar -tf applet.jar | grep prop res/messages.properties res/messages_ca.properties res/messages_es.properties ... These are loaded during applet initialization. messages = ResourceBundle.getBundle("res.messages");...

NSIS to set default program to launch specified file type

I am using an NSIS script to create an installer for my Java program. My executeable jar is launched from a BAT file. The installer works fine, but I want a specific file type (just for an example ".zip") to always use my app as the default. Right now if I double click the file, I have to browse into "Program Files > Company Name > bat f...

NSIS get caller file path

I have an altered Java Launcher exe file written in NSIS that launches a JAR file (http://nsis.sourceforge.net/A%5Fslightly%5Fbetter%5FJava%5FLauncher). I want to pass into the JAR a parameter, that parameter being the absolute path of the file which called the exe. In a BAT file I can use "start MyApp.jar %1" and that fills in the abs...

Add Jar to Runtime Path for JSP

I'm using IBM's Rational Software Architect (essentially Eclipse I suppose). I have a JAR file that contains Proxy classes to access a Web Service (JAX-RPC). I've created a Dynamic Web Project with a simple JSP page in which I'm trying to consume the Web Service using a Proxy class from this library. Code from the JSP page: <jsp:useBean...

How does one access a method from an external jar at runtime?

This is a continuation of the question posted in: http://stackoverflow.com/questions/194698/how-to-load-a-jar-file-at-runtime I am uncertain as to how to continue to the method invocation level. From my understanding, from the clazz object, I would used getMethod or getDeclaredMethod to get a Method object from which I would call invok...

Unicode in Jar resources

I have a Unicode (UTF-8 without BOM) text file within a jar, that's loaded as a resource. URL resource = MyClass.class.getResource("datafile.csv"); InputStream stream = resource.openStream(); BufferedReader reader = new BufferedReader( new InputStreamReader(stream, Charset.forName("UTF-8"))); This works fine on Windows, but on Lin...

Logging configuration for certain EJB Jar on JBoss Server

Hi, can you specify on JBoss server logging level for single EJB Jar? I've got two EJB Jars with two different Web Services. I would like the WS logs from first jar to be printed completely to server log file whereas WS logs from second jar are irrevelant and i don't want them printed anywhere. Can it be configured on JBoss? I'm using ...

Maven-assembly-plugin: custom jar filenames

I use the assembly plugin to create several jars with some classes in it. I need custom names for the resulting jars: *app_business.jar* *app_gui.jar* core.jar etc. Currently I have to following configuration: <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <appendAssemblyId>false</appendAs...

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 a single jar for ease of deployment. I was trying to set it up so I could just change a configuration file and change drivers (as I would in .NET). However, because of the ...

Run Executable In Jar With ProcessBuilder

I have an application I've built that uses a non-Java executable that it calls via ProcessBuilder: ProcessBuilder pb = new ProcessBuilder(invocation); pb.redirectErrorStream(true); Process proc = pb.start(); InputStream is = proc.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedRead...

OSGI - handling 3rd party JARs required by a bundle

I'm just getting started with OSGI development and am struggling to understand how best to handle dependant JARs. i.e. if I'm creating a bundle the likelyhood is that I will need to use a few 3rd party JARs. When I create my bundle JAR to deploy to OSGI, obviously these 3rd party JARs are not included and thus the bundle will not run. ...

What is the replacement of "amazon-a2s-2007-10-29-java-library.jar" ?

Does any body know what will be the replacement of this existing jar? Is there a latest jar in place of this? Since the 15th of August signed request has become mandatory. ...

Jar placement for Web Apps using WebLogic

This seems like an elementary question, but I want to make sure that we're doing things right. We're making webapps using Spring MVC and serving them using WebLogic. Where should jars be placed in this setup? We have talked about placing business logic into jars that would live in the server classpath and app-specific jars would be pac...