jar

How are secure database connections usually implemented in JAR files?

I'm not a Java developer, but my client has hired one to update some JAR files on their site. Prior to doing so, we audited the existing code and found a number of security vulnerabilities. One of the solutions we employed to make the files more secure is to create a new database user with read-only access to the database, and only for t...

Java, using another java program in jar format

Hi folks i want to embed an open source editor to my java desktop application. But i am not sure yet how to do it. I got jnlp web start and jar file to import library. The program which will be imported is like below. In fact i just need internal frames but if it is too completed i can embed whole program too. I think about 3 options b...

How do I import JARs and Packages in Java

Hi, I'm relatively new to Java. I've been using Eclipse to do some work but I want to get back to basics and just use a text editor in conjunction with the JDK. The problem I'm now having is that Eclipse and other IDEs hide away a lot of fundamental stuff which is very important to know and fully understand. This is what I'm trying to ...

JAR version control

Hi all, Can i generate jar from eclipse with version number for the jar created newly for every jar export? Regards, magggi. ...

ISSUE java.lang.IllegalStateException: zip file closed

I have created a jar file which throws the below error, Its a simple swing app which inserts a row whn i press a button, not sure where I am going wrong please advise. private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: setatmid(jTextField2.getText()); setaa10(Integer...

How to read external xml file from jar

Hi, i need to read an external XML file from my java application in jar executable file. If I lunch it from console (java -jar package.jar) it works fine, but if I lunch it by double click (Java Platform SE binary) it don't work. I have this problem with relative path. With absolute path it work in both way. ...

Access restriction on JARs (what is the proper way to get VecMath?)

I need Vecmath, so I went to Oracle to get the latest version of Java 3D. I didn't see a place to download a JAR, but it had an installer. I downloaded and ran it. I assume that the installer added the JAR as a JDK extension I restarted Eclipse, and it sees that VecMath is present. However, it still complains: Access restriction: Th...

JAR file—nothings happens when I run it.

I'm trying to run a JAR file and nothing happens? Any idea why? Did I maybe do the export wrongly? Some guidelines would be very welcome! ...

'lein jar' and 'lein uberjar' not setting the main-class properly

Hi, I ran lein uberjar on my project and it created the corresponding jar files. When I run the jar a ClassNotFoundException: explodingdots.core is thrown. I specified explodingdot.core as my main class. I extracted the jar file and there was indeed no core.class in the corresponding directory. What did I forget? I have the following c...

android: Adding external JAR file in to android

We are making an application that needs to convert one file format to another. I am not sure whether we can add a JAR file in which we develop the code to convert the file format to our required file format, to our android project. ...

Accessing classes in default package in a JAR file

I have a Java application and the Java files are in a package called app. I have added a JAR file to the classpath. All classes in the JAR file are in the default package. From my Java application I can't access classes of this JAR file. Only if I put my application files in the default package, then I can see the classes in the JAR fil...

How to package roo project without aspectj files into a jar.

Hi I am using Spring Roo to create a service to access the data base, just that. so, when I try to export to a jar using eclipse, the jar not contain one java class, but these files: Contact.class Contact_Roo_Configurable.class Contact_Roo_Entity.class Contact_Roo_ToString.class Contact_Roo_JavaBean.class I know these was AspectJ files...

How do I run JUnit tests during my Ant build script while omitting test classes from my resulting jar?

I'm using the Hello World with Ant tutorial from the Ant manual to learn about Ant. The last part of the tutorial involves adding JUnit tests to the project. I've got everything working as described in the tutorial and am now going on to make some minor changes. One of the changes I would like to make is to run the tests during a typi...

How to make a Java Program unextractable.

Sorry I am not very sure how to state the question title. My problem is like this, I had developed a Java program, and I wish to distribute it to my friends. So I export it to Jar file, but I don't want them to extract the jar file to view the code. Is there anyway to make the program so that nobody can get the source code instead just l...

Creating a runnable JAR which includes .exe files via eclipse

Hey guys - I've looked through a plethora of forums online as well as asked many professional java developers but I was unable to find adequate assistance in creating a standalone runnable jar file of a financial application that I am currently finishing up. The application uses two external programs; an ImageMagick file conversion progr...

jar files are deleted on restart

Hi all, The application we are currently developing has a bizarre issue. Occassionally, all the jar files (except one) are deleted from the lib folder. Has any one seen this at all. I've seen references on Google to temp jar files but not real/live/active ones. Many thanks. Simon ...

Reading a zip file within a jar file

Previously we had some zip files within our web application. We would want to pares a specific text document within the zip file. This wasn't a problem: URL url = getClass().getResource(zipfile); ZipFile zip = new ZipFile(url.getFile().replaceAll("%20", " ")); Entry entry = zip.getEntry("file.txt"); InputStream is = zip.getInputSt...

mobile java app

I'm trying to change a mobile app which has been written in Java, I've extracted the .jar file which has resulted in the following directory tree: . |-- aa.class |-- ab.class |-- ac.class |-- a.class |-- ad.class |-- ae.class |-- af.class |-- ag.class |-- ah.class |-- ai.class |-- aj.class |-- ak.class |-- al.class |-- am.class |-- an....

How do I make a (minimal) runnable jar file from a scala eclipse project

I have made a runnable jar using this process: http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/?wscr=1366x768 editing the ant build.xml to include scala-library.jar (5.9 MB) Isn't i possible somehow to get eclipse to extract the needed parts of scala-library.jar? So I can get a smaller, less bloated ...

How can I load a class from a JAR-archiv which implements my interface? (java)

Hallo everybody, I got a question: I have written a Java program that implements a STAF service (just a framework for testing, http://staf.sourceforge.net/). For STAF, all my Classes have to be in an Directory STAF-INF/classes. So I packed my program to an JAR-file MyProg.jar, that looks like this: MyProg.jar --> STAF-INF/ -------> c...