jar

How do you make Eclipse recognize JEE jar files so Servlets can compile?

I am setting up my Java EE version of Eclipse to compile Servlets. I have the problem where Eclipse says "HttpServlet" cannot be resolved because it can't find the JEE jar files. I am using Windows XP. I already have Tomcat 6.0 up and running. I think the easiest solution would be to link to the servlet-api.jar file in the Tomcat instal...

How to summarize view-components/widgets-information in a JAR-File?

I would like to use an ajax toolkit/framework like ZK (www.zkoss.org) or GWT. But I don't know whether it's possible to bundle resources in a JAR? Do you know which one support such resource loading? ...

packaging tagfiles in jar

how can i package tagfiles in a jar so it can be reused acrossed multiple projects? ...

Finding unused jars used in an eclipse project

Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars? ...

NoClassDefFoundError while trying to run my jar with java.exe -jar...what's wrong?

I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes and try to run it with java 1.6 in the same cmd window, I start getting exceptions: C:\dev\myapp\src\co...

How do I update a pre-existing Jar file

I've got a WAR file that I need to add two files to. Currently, I'm doing this: File war = new File(DIRECTORY, "server.war"); JarOutputStream zos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(war))); //Add file 1 File file = new File(DIRECTORY, "file1.jar"); InputStream is = new BufferedInputStream(new FileInputSt...

Java resource files

I'm writing a small GUI app that contains some "editor" functionality, and something that I'd like to let users open a few sample text files to test things out quickly. The easiest way of doing this would be to package a separate zip with the appropriate sample files, and have them open them manually; I'd like to make things a little mor...

Highly complex, integrated web app - which language would you use?

Say you had to develop a web-based application that needs to be able to read the contents of a .NET DLL, and from that, populate the local database with a list of all the namespaces, classes, etc. It has to also do the same thing with Java JAR files. Are there limitations on what language I could use to develop this? I'm leaning towar...

Java: How do I know which jar file to use given a class name?

Given a class, org.eclipse.ui.views.navigator.ResourceNavigator for example, how do I find out which jar file to use? I know it's in org.eclipse.ui.ide, but how would I find that out? Edit: Thank you to all of you who answered. Like many things, there seems to be several ways to skin this cat. I wish javadoc contained this info. So far ...

Struts - Loading result-templates (like JSP) from JAR-Files

How can I define it in the struts framework, when I would like to load templates (JSP, ZUL etc.) from different JAR-Files? ...

Add Java Libraries to a Groovy on Grails Project.

I am just getting started with Groovy on Grails. How do I add Java libraries to my Grails project? I added the Smack library jar to the lib folder of my Grails project, but I still cannot import any of its packages into my Java or Groovy classes. I am using the Netbeans IDE. Any help would be appreciated.. Buzzy ...

Eclipse: Attach source/javadoc to a library via a local property

I have a third-party library in my SVN repository and I'd like to associate source/javadoc with it locally in Eclipse. I.e., there should be some local setting (for example, an entry in the local.properties file) that associates the source/javadoc with the JAR file, but which doesn't introduce local dependencies into the repository via ....

compiling an Eclipse project into a jar.

I reference another eclipse project from the current project I am working on. Everything is working fine except when I try to jar up the referenced project and use the jar instead of the eclipse project my project doesn't run properly. I know this is a bit vague but is there something I might be doing wrong in jaring up the referenced ...

How do I include jars in a groovy script?

I have a groovy script that needs a library in a jar. How do I add that to the classpath? I want the script to be executable so I'm using #!/usr/bin/env groovy at the top of my script. ...

Problem running a Jar file

I've compiled a java project into a Jar file, and am having issues running it. When I run: java -jar myJar.jar I get the following error Could not find the main class: myClass The class file is not in the root directory of the jar so I've tried changing the path of the main class to match the path to the class file and I get the s...

Security considerations when hosting signed jars

What are the security implications for hosting signed jars on the internet? As I understand jar signing, once a user choose to auto-accept a certificate, it doesn't matter if the signed jar came from your domain, linked from another domain or hosted on another domain. For example, Sun uses this method to give applets OpenGL support, by ...

Viewing contents of a .jar file

What would be the easiest way to view classes, methods, properties, etc. inside a jar file? I'm looking for something equivalent to the very useful Lutz Roeder .NET Reflector - for Java ...

How to get the path of a running jar file?

My code runs inside a jar file, say foo.jar, and I need to know, in the code, in which folder the running foo.jar is. So, if foo.jar is in C:\FOO\, I want to get that path no matter what my current working directory is. ...

Insert a dependent jar into an installer jar

I have a multi-module maven project with an installer sub-project. The installer will be distributed as an executable JAR. It will setup the DB and extract the WAR file to the app server. I would like to use maven to assemble this jar like so: /META-INF/MANIFEST.MF /com/example/installer/Installer.class /com/example/installer/......

Where to put the external jars?

Hello, i use eclipse (3.4) an my class compiles without warning nor errors. My project uses an external jar file. Where do i need to put this external jar file in order not to get a java.lang.NoClassDefFoundError when using this class from another project (not in eclipse)? Edit: I could just extract the jar into the project folder, bu...