jar

How can I specify dependencies in the manifest file and then to include it into my .jar file?

I generated .class files by the following command: javac -cp \directoryName\external.jar myPackageDirectory\First.java myPackageDirectory\Second.java I needed to use -cp during compilation and name of .jar file of an "external" library (external.jar) to be able to use this library from my code. Using my .class files I have generate...

Unsupported Media Type when deploying OTA Blackberry App

I have a blackberry app that I am trying to deploy OTA (over the air). I have set the MIME type on my server to be: cod application/vnd.rim.cod jad text/vnd.sun.j2me.app-descriptor jar application/java-archive When I access the JAD file on my web-server through the BlackBerry Browser, I get the message Unsupported Media T...

java annotations - problem with calling a locator class from a Vaadin Project

Hello, I'm not sure how to explain this without writing several pages so I hope the actual code is more expressive. I've made a jar containing multiple annotation declaration similar to the following: @Target(ElementType.PACKAGE) @Retention(RetentionPolicy.RUNTIME) public @interface MarkedPackage { } then I have made a test jar cont...

SDK jar file downloading taking time in production

Hi All, I am having a strange issue, In our ASP.NET MVC application we are using jar files (Applet) , which will get downloaded in one of the first pages, In the QA environment these jar files were downloading with no time but in the production envirnment its these jars are taking more than a minute. I don't have much knowledge on the ...

ojspc always returns 0 on errors

In my Ant build.xml file, I am trying to compile JSPs using ojspc. The files are being compiled, however, the build process is still running to completion when the JSP compilation has errors. This is part of my build.xml: <java fork="true" jar="${env.ORACLE_HOME}\j2ee\home\ojspc.jar" resultproperty="result"> <jvmarg value="-Djava.co...

Starting Java applet directly from jar file

The goal is to have an applet run from a jar file. The problem is that the applet only seems to want to run from an exploded jar file. Samples on the Internet suggest this applet tag: <applet code="com.blabla.MainApplet" archive="applet.jar" width="600" height="600"> This will not even try to look in the jar fi...

What exactly is a .jar file and how do i create one?

What exactly is a .jar file and how do i create one? ...

java - reduce external jar file size

Hi all, still learning, so be patient :) I've developed a module for a Java project. The module depends on external library (fastutil). the problem is, the fastutil.jar file is a couple of times heavier than the whole project itself (14 MB). I only use a tiny subset of the classes from the library. the module is now finished, and no-on...

How to avoid copying dependencies with Ivy

I'm looking into using Ivy to manage dependencies but wow - that thing really likes to make multiple copies of jars! It spreads like the ivy in my back yard and is just as undesirable! Is it possible to have Ivy simply define a classpath (for a specified profile) that references the resolved dependencies so my javac can reference them ...

Hudson can't find local maven repository (including 3rd party jars)

Hi all, I have created a Maven2 project. Everything works fine. Now, I have set up a Hudson project in order to make nightly builds possible. Hudson should check out the current project state from a Subversion repository, run the tests, build the project and deploy everyting to a repository. My Subversion repositroy contains my Maven2 p...

Loading from JAR as an InputStream?

Is there a ClassLoader implementation I can use to load classes from an InputStream? I'm trying to load a JAR for which I have an InputStream into a new ClassLoader. ...

Android - Adding external library to project

Hi, I am having a lot of trouble adding the WEKA library to a project I am working on. I have followed several tutorials that explain how to do this including the Android Developers guide: http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary and several of the postings on SO. I have created a folder in...

Why my jar file build by eclipse cannot run on BlackBerry?

I build a project in Eclipse for my BlackBerry. I got a trouble that the jar cannot runs on my phone with the error "907 Invaild JAR Descriptor missing required atrribute:MIDlet-1". What could be the reason for this? ...

how to run .jar file in micro?

I have a .jar file to convert Excel into XML format. I want to have a button on the spreadsheet, when user click it, it will call. jar to convert the spreasheet. tried to use: Shell ("C:\Program Files\Java\jre6\bin\java -jar XMLGenerator.jar") it is not working, does anyone know how to do this? thanks. ...

add images into jar ,into specipic locate using ANT

i am successfully inserting images into my jar file but all images go to the root directory inside the jar how can i place image in a specific location inside the jar this is what i have so far ,thank you <target name="dist" depends="compile" description="generate the distribution"> <jar jarfile="target/jarFile.jar" basedir=...

How to set classpath in manifest file , while creating JAR from eclipse?

I am trying to creat JAR file through eclipse. I read some of the threads from stackoverflow as well as other forums. But nothing is helping. I have created a separate manifest file like this one. Manifest-Version: 1.0 Main-Class: Main Class-Path: gnujaxp.jar iText-2.1.5.jar jcalendar.jar jcommon-1.0.16.jar jfreechart-1.0.13.jar jfr...

Why Eclipse does not see .jar file of a library?

I have a java project in which I have "Referenced Libraries". In the "Referenced Libraries" I have a .jar file of a library that I use (I use only one external library). When I try to "Run -> Run" the code I have a NullPointerException. From my previous experience I know that it it (very likely) because my code does not see the library....

Accessing JAR resources

I have a jar file with resources (mainly configuration for caches, logging, etc) that I want to distribute. I'm having a problem with the relative paths for those resources, so I did what I've found in another stackoverflow question, which said that this was a valid way: ClassInTheSamePackageOfTheResource.class.getResourceAsStream('res...

Deploy a jar in Jetty

Hi guys, I was wondering if is it possible to deploy a jar file in Jetty? If not, are there applications servers who can do so? I am beginner. I am asking this question because all the docs that i have found, it seems that we can only deploy war archive in application servers. Is that true? ...

Java applet icon doesn't show

I have a java applet where I've changed the image icon that appears in the top left corner of the window. The code I use is this: Toolkit kit = Toolkit.getDefaultToolkit(); Image frameIcon = kit.getImage("src/myapp/resources/logo.png"); getFrame().setIconImage(frameIcon); Everything works fine until I deploy the ap...