jar

Is a Java JAR file similar to an .Net Assembly?

I'm familiar with .Net and what assemblies are - but sadly my Java knowledge isn't as strong. I know Java and .Net are different "worlds" (possibly like comparing apples with pears) but are JARs and .Net Assemblies roughly eqivalent concepts? Edit: Update base on initial responses The way I interpret this is that yes they have similar...

Tomcat errors, reasons JAR not included in build

When I try to deploy my Spring application to Tomcat, it gives me errors (localhost-{date}.log) saying I'm missing commons-pool-{version}.jar. However, the source code is part of a STABLE release. I'm using maven to build and I've successfully built and deployed this project successfully (earlier today, in fact). So something must ha...

Using external Jars on GWT server-side

Hi, Im new to GWT. Im using the eclipse plugin and started tweaking google's 'hello, world!' project: greetServlet. Im trying to build a webapp that will use XML (de)serializing. I chose XStream library for the relative easiness. my classpath includes the xstream.jar. I also manually copied the jar to the WEB-INF/lib folder (Is this...

java applet domain locking

I need to be able to lock a java applet to a specific domain or range of domains. I know that it is possible to do this with flash .swf files see article. I need to be able to do this with a java applet or jar. If anyone has any information on this it would be much appreciated. ...

Simple Classpath question using with jars

I have a toy program that is called Test.class. It accesses a class in a jar called myjar.jar. That jar is in my CLASSPATH variable set as part of my Windows environment. When I type echo %CLASSPATH%, I see C:\myclasses\myjar.jar. When I execute my program java Test it runs fine. But if I package the code as a jar and try r...

j2me jar api creating jar file run time

java.util.jar is not avail in j2me, what if using j2me app wants to create jar file from midlet at run time ? ...

Executable Jar with depedencies

Hi all, I'm trying to build an executable jar from the command line (I don't want to use ant or OneJar ) . Here is the content of my file.jar: jar tvf file.jar 0 Mon Sep 20 17:16:12 CEST 2010 lib/ 45396 Mon Sep 20 17:16:12 CEST 2010 lib/org.apache.commons.logging_1.0.4.v201005080501.jar 321330 Mon Sep 20 17:16:12 CEST 2010 lib/or...

JAR hidden inside EXE?

Minecraft, a Java game, is free this weekend. The Windows version downloads as an exe file. I was curious what the EXE file is doing and where it's unpacking and running the actual game JAR from. So using a command, I found the command-line arguments to the running javaw.exe process; and oddly enough, it was launched with a classpath poi...

How to isolate an API's dependencies from the main program where it is used ?

I have a system for which I am creating a plugin through a well defined access point. However the plugin in question uses some jar that the framework also uses but of a different version. The code is structured in a way where the code integrating in the framework (extending the plugin extension points) and the code doing the actual wor...

maven project include local jar files

I do not want to install few jars into repository(local/remote) , i have few jar files located in c:\work\projects\myapp\src\main\webapp\WEB-INF\lib\test.jar c:\work\projects\myapp\src\main\webapp\WEB-INF\lib\test2.jar how to include it into my project when open/edit with netbeans? ...

java runnable jar from netbeans 6.9.1

Hi, I have a project in NetBeans6.9.1. It works fine from inside the IDE. But when I try to run the jar, that NetBeans has automatically created under the dist directory, I get a NoClassDefFoundError for classes inside my project. What am I doing wrong? Should I be using Ant or something (don't know Ant) In eclipse I do a "create runna...

Including external jar-files in a new jar-file build with Ant

Hi, I have just 'inherited' a Java-project and not coming from a Java-background I am a little lost at times. Eclipse is used to debug and run the application during development. I have through Eclipse succeeded in creating a .jar-file that 'includes' all the required external jars like Log4J, xmlrpc-server, etc. This big .jar can then ...

How to store high score inside a jar file.

Hi, I am developing a small game in Java and I am shipping it as a single Jar file. I want to store the high scores/best times for that game somewhere. Instead of storing it in a separate file, I would like to store it in the application itself (inside the Jar) so that its not lost. Is this possible at all ? If so, how to do it programa...

reading MANIFEST.MF file from jar file using JAVA

Is there any way i can read the contents of a jar file. like i want to read the manifest file in order to find the creator of the jar file and version. Is there any way to achieve the same. ...

Java JNA does not seem to be working

I recently downloaded the Java JNA from https://jna.dev.java.net/servlets/ProjectDocumentList?folderID=7408&expandFolder=7408&folderID=0 and tried using it. However, as exemplified by the screenshot below, the demo source code provided in https://jna.dev.java.net/ won't compile, no matter where I place the files. Mind you, I've t...

Importing Spring beans from other Maven modules inside a WAR?

I have a new web app that is packaged as a WAR as part of a multi-module Maven project. The applicationContext.xml for this WAR references beans that are imported from the "service" module, which in turn imports beans from the "dao" module. The import statement in applicationContext.xml looks like this: <import resource="classpath*:se...

Compile a jruby on rails application to a jar?

Is there a quick way to pack a jruby on rails application into a jar? Is there an ec2 on rails like virtual appliance for jruby on rails apps? ...

Java - Difficulty installing program from 3 separate .jar files (involves CLASSPATH)

Hi all, I'm having a little trouble running some Java code, which requires three .jar files to be used. I'm at a lost as to what to do with them--I've tried setting the CLASSPATH (and following the instructions for how to do so in the readme files), but to no avail. I was wondering if someone could walk me through it? I'd imagine three...

Can I prevent javac accessing the Class-Path from the manifests of our third party jars?

Since Java 1.5 or so, javac has been looking into the manifest of third-party jars to find other jars. This causes a number of undesirable side-effects: As jar files have been renamed, we now get a flood of warnings whenever we compile (can be diabled with -Xlint:-path) Files we don't want on the classpath are being brought back onto...

Using a .jasper file present within a jar file

Hi, We are using jasper reports as our reporting tool. Earlier we were using relative paths for jasper files for filling report and it's working fine. Now, we want to create a new jar for all compiled jrxmls. i.e a jar containing all .jasper files for our project. Is there a way to access those .jasper files within a jar file while fi...