jar

Eclipse reference automatically built code

I have a project which includes some xsd schema definitions. These are compiled into a jar at the start of the build (using ant and xmlbeans) and when compiling the Java src, that jar is placed on the classpath. I have other code which references the classes in that jar, and when viewed in Eclipse, any references it will display as error...

Eclipse VM Argument and external JAR file error

I just added "-Djava.library.path=" to the "VM Arguments" under Run Configuration in Eclipse and everything works fine until I tried to add an external JAR file. I get the following error: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.U...

How can I use an external jar in an Android project in NetBeans?

I need to create an Android library which I can include as a jar in any Android application. I use NetBeans 6.8, the nbandroid plugin, and the Android SDK. The steps I took so far are: 1) Create the library project, with android.jar included to have access to Android classes (the library uses android.util.Log and other Android classes)...

MissingNativeError thrown when importing Jar file on BlackBerry

I have several libraries that I want to import into my project. They are all Jar files I've created, and they were built using Eclipse, then preverified using the command-line tool. Now, I'm working in the BlackBerry JDE (not Eclipse) and I've added the Jar files into my main project. Originally, it wouldn't compile, complaining about...

How do I use a more recent version of a hadoop/lib jar in my map/reduce jobs?

Hadoop currently ships with commons-httpclient-3.0.1.jar in its lib folder. If I have a map/reduce task that requires commons-httpclient-3.1.jar, it does not seem to be sufficient to bundle this jar in the lib folder of my hadoop jar (as one would do with any normal external jar dependencies), as hadoop seems to be loading the previous ...

Is putting external jars in the JAVA_HOME/lib/ext directory a bad thing?

We have an application which runs in a JRE environment. The application uses some external jars and we have been putting them in the JAVA_HOME/lib/ext folder. This has worked for us for years but recently a new programmer joined our team and seems emphatic that this is some how a bad thing to do. I can't understand why and I'm tryi...

Handling resource file paths in JAR's and development

I have a keystore file that I want available to several classes in my application. I made a .config file that points the name of the keystore file, it's password, and other information. It's a Maven-based project, so the keystore is in /src/main/resources. I build a jar and move the file to /resources in the jar. I'd like the .config...

Package method having no effect in Buildr

I'm trying to package a scala project into a jar and write properties to the Manifest using Buildrs package() method. The package seems to have no affect on the Manifest. Here's the build file: VERSION_NUMBER = "1.0.0" GROUP = "Green" COPYRIGHT = "Green CopyRight" require 'buildr/scala' Buildr::Scala::Scalac::REQUIRES.library = '2.8....

Problem in executing a built jar file in netbeans

I've just made a game in netbeans. The Problem is that after builting the game. I'm not able to execute the jar file and getting the exception: Failed to load Main-Class manifest attribute from Game.jar What to do??? ...

[ant] how to add a complete folder to a jar

Hi All, I'd like to create like a "fat" jar with ant where I have, not only the usual classes, manifest files, etc, but also my 'libs' folder too. I tried with: <jar destfile="myjar.jar" update="yes" basedir="${libs.dir}"/> but this adds the files in 'libs' the root of the jar file where I'd like to have the libs folder itself in th...

Batch-file for finding the current folder and running a cmd-line with this path?

hi, I would like to have some kind of starter-batch for my *.jar file, but therefore I need the current folder path. How do I create a batch that can get the folder path, the batch and the jar files are in and then using this path for the jar-command in the command-line? Thank you in advance for any hint! Andreas ...

Java: Load class while jar-file is updated

My Java program loads classes dynamically at runtime. All classes are located in the same jar. After deploying a new jar file, I sometimes get errors while the jar file is copying (NoClassDefFoundError etc.). This goes away the next time I run the program of course. Is there a way to preload classes so that my program is not affected wh...

How to specify the jar file in manifest ?

I have created a mail.jar file and mywar.war file. What I need to set into the manifest.mf use the mail.jar as a library? ...

How can I let differenct version of JAVA API work together?

Hi all, I want to support different versions of a 3rd software. So I plan to create a factory which can create different versions of Object, but I don't know how to do that, different version of 3rd software have the same package hierarchy, and conflicts will happen when I put them together into one project, anyone have such experience...

Managing dependencies to multiple versions of a library in Java and Eclipse

Hi, In the Eclipse environment I have project A. A has dependencies to projects or libraries B and C. (does not make a difference if they are projects or libraries) B has dependency on LibX.v1 and C has dependency to LibX.v2. During runtime, A will need B.jar and C.jar. Also classes in B.jar will need LibX.v1 and classes in C.jar will ...

Including jars in classpath on commandline (javac or apt)

Hey all, trying to run this program. I think that to setup all of the web service stuff I need to run apt. (Although using javac I am having the same issue). I think what I am getting is compile errors. (Shown at bottom). I think what I need to do is include this jar in my class path: jsr181-api.jar (source). Is there a simple te...

Is it possible to use jnlp without signing the jars?

Is there any way at all to use jnlp without having to sign the jars involved? (The application is being used in a secure environment so from the security point of view signing is not necessary) ...

Can't make JDBC connection to MySQL (using Java, IntelliJ, and Linux)

I am having issues trying to get a database connection using the code below: try { Class.forName("com.mysql.jdbc.Driver"); Properties p = new Properties(); p.put("user", user_name); p.put("password", password); connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1/jsp_test", p); }...

Java Command Line Jar File

I've created a few .jar files (using Eclipse's export feature), but they were all GUIs. I want to create a .jar file that is strictly command-line; is this possible? ...

How to include external java xerces jar files in a gwtext application in eclispe

I am new to gwt and am using the eclipse ide ,I have included the jar files in the libraries folder but when I run my code ,i get an error saying cannot emulate the source code ,can someone help ...