jar

"Could not find the main class: bla.bla.yada", although specified correctly in the MANIFEST.MF

Hi, I'm trying to run a .jar file with the command "java -jar Filename.jar", but I am always getting an error saying "Could not find the main class: bla.bla.yada". I build the whole application with Maven and specified a Main-Class in the MANIFEST.MF. The path in the file is correct and the class also exists at the right location in the...

"java.lang.ClassNotFoundException: javax.ejb.EJBObject" when running JAR

I'm getting a java.lang.ClassNotFoundException: javax.ejb.EJBObject error when I'm running my application as a JAR file. When running it in Eclipse everything is working fine. The application properly access the main class and the main method. But when it tries to load the application context it cannot resolve a reference to an EJB bean...

Determining what minimal jars are needed for a feature

How do you determine what jars are needed for such and such feature of a framework? For example, what jars would be needed out of all those available for Spring in order to support only dependency injection? ...

read java.security.key stored as object inside a file which is in jar

I saved a PublicKey instance in a file using ObjectOutputStream. This file is then stored inside a jar file which is then loaded by JBoss. I'm trying to read this file but it throws me an exception telling that it's not serializable. Here is the code : InputStream input = KeyLoader.class.getClassLoader().getResourceAsStream(resource); ...

Is it possible to declare an applet's classpath into the JAR and not into the applet tag ?

I'm building an applet with a quite big classpath. (externalLib1.jar, externalLib2.jar, etc.) MyApplet.jar, the applet's jar contains a Manifest.MF including a ClassPath attribute listing all the required jars. ClassPath = externalLib1.jar externalLib2.jar externalLib3.jar externalLib4.jar etc.jar Is there a way to load the applet wi...

How to make an application client jar file for IBM's launchclient

Hi I'm facing with a bug in old ejb application which is deployed on IBM Websphere 6.1. Previously it ran but now it stopped for some reason which I have to investigate. I'm trying to get it to run locally on my desktop, and I'm trying to access the session bean with IBM's launchclient application. I pass in the ear as the argument (yes...

java create a jar file for contrib packages in lucene

I have downloaded the source code of Apache Lucene using svn. Now I want to create a jar file for a particular java file in the contrib portion of the code. the problem is that when I do javac x.java to get a class file and package it into a jar file using jar cf jarfile.jar x.class the package hierarchy is not preserved in the jar file...

creating jar file for java application

Hi all i have created a java application which uses data from its config folder and , it also uses third party jar files those are located in lib folder, could anyone tell me how to create jar file for this project with the content stored in config file and lib folder. i tried creating jar using eclipse export functionality. when i ru...

Which library/config file can I add. Unable to load config class

My application keeps on giving the following error relating to Unable to load config class org.apache.struts2.s1.ActionFormValidationInterceptor. Which jar or config file can I add to make this work? Thanks, 2010-05-11 15:01:04,171 WARN com.opensymphony.xwork2.config.providers.InterceptorBuilder.warn:45 - Unable to load config class ...

How do you use ant to unjar multiple JAR files and rebuild them into one JAR file?

I would like to unjar multiple JAR files and then rebuild into one JAR using an ant build script. Is this possible? ...

How to distribute the android reusable code in a package?

Hi, I have developed some reusable android component which is basically a class . This class has some resource dependencies e.g. some png drawables, some xml layouts etc. So this class referenced the auto-generated R file.I would like to distribute this code in a single package like jar file to other developers for use in their applicat...

How do I package up an applet with multiple .jar libraries?

Hi, I'm creating a Java applet from a large scale pre-existing project (Vizster). I am using NetBeans 6.7.1 with JDK 1.5 on Mac OS X. I am attempting to run the applet from it's single output .jar file, but when I do this, it says "applet loaded" at the bottom of screen in Firefox, and there is nothing in the java console, but nothing...

how to force operating system to give java more memory?

Hello, I've got problem with java jar files and memory. I use netbeans 6.7 to develop an application and this application need more memory to run because it converts another files. Whenever this application convert a 6-10 mb file, it'll crash. So I set netbeans VM Options : -Xms32m -Xmx256m and the application can convert 6-10mb files w...

Software to cd (change directories) into .jar/.ear files?

Is there any software/script that will allow me to cd (change directories) into .jar/.ear/.zip files and edit the contents of the files it contains? I'm working on a large EJB project (yuck), and I frequently find myself in situations like the following: something.ear/ |-- something.jar/ | `-- fileINeedToEdit.xml I work primarily v...

How do I get the directory that the currently executing jar file is in?

I'm running a jar file in various locations and I'm trying to figure out how to get the location of the jar file that is running. ...

Error running java -jar command

Hi all, I created a jar file using the following ANT script <manifestclasspath property="jar.classpath" jarfile="${bin.dir}/${jar.app.name}" maxparentlevels="0"> <classpath refid="main.class.path" /> </manifestclasspath> <target name="jar"> <mkdir dir="${build.dir}/lib/isp"/> <mkdir dir="${build.dir}/lib/jasper"/> <cop...

How to load modules in Java

I'm building a server that loads modules. Each module is a .jar file. Inside the jar there's all the classes that the module needs. The server needs to read the jar, find the main class (it doesnt have the main method on it is just the class that makes the module work but not as a different program), build an object of that class and sto...

How do I set maximal jvm-memory (XMX) for a jar-file

How do I set the maximal jvm-memory without adding an extra batch-script to my Programm. Answer is provided below. ...

Automatically copy new Jar file to Tomcat project WEB-INF/lib folder

I am developing a Tomcat app (actually it's a Red5 app, but this is effectively the same). This contains the usual /WebContent/WEB-INF/lib folder, which is where I locate the various jars it uses. Recently, I pulled a package out of my app project, and converted into a separate Jar project which was then released as open source (this ...

how to load same class from different jars

I have a class Client.java in two different jars jar1 & jar2 Now at run time i want to decide which Client.class loaded like if (country==india){ // load Client class of jar1 ) else{ load client class from jar2 } can i do that... ...