classpath

Eclipse .classpath location

Is there a way to specify where the .classpath file is located in an Eclipse project? By default it is at the top level of the project. Being able to change that location would be helpful. ...

About import statement in Java

test.java: import javax.media; Which directories are javax.media searched from? I suppose those in CLASSPATH specified by javac -cp will of course be searched. But will it also search in the directory where test.java locates? And are there any other possible places that will be searched? ...

m2eclipse - after pom and dependencies definition - no libraries on classpath / Maven Dependencies

Hi, I've been doing just simple archetype projects until now, and always after dependencies definition and saving pom.xml, immediately after that the Maven Dependencies library was full of libraries. But now I declared: parent(pom packaging, scm, repository management) parent(pom packaging, shared dependencies) actual project (jar pa...

Can't compile grails Tomcat plugin

I'm using Netbeans to build a Grails app, while I have used this fine before on this new computer I can not get even the basic project to compile and run. I am getting errors around compiling the Tomcat plugin. If I uninstall the plugin it and use Jetty instead it will compile but the project isn't set up for Jetty and is missing files. ...

package is not found, even though it's in both build classpath and runtime classpath

I am unable to compile a Java program because some of the imported packages are not found even though they are in both the build classpath and runtime classpath. The image below shows the problem. I have highlighted the gdata-media package in eclipse. It corresponds to the first compile error. Click for full size What am I doing wr...

NoClassDefFoundError for a packaged class

I'm trying to run a jar file that uses the YouTube Data API and I'm getting a NoClassDefFoundError for one of the API classes: AuthenticationException.class is found in the gdata-core-1.0 jar: The gdata-core-1.0 jar has been added to my classpath: What am I doing wrong? ...

too long line in manifest file while trying to create jar

I am getting a too long line error while trying to build a jar. the long line in the manifest file is the Class-Path line as the application uses a lot of third-party libraries. needless to say, I am using Windows :-( and Eclipse Java 1.6 I tried Class-Path: lib or Class-Path: lib/ but they did not work. ...

Eclipse RCP: How to troubleshoot plugin dependencies & classpath problems?

I am working on an RCP project based on eclipse. It has been working fine but recently I thought I'd upgrade it to use a new eclipse version (3.2 -> 3.5). After a bit of trouble, it was running on the new platform. Then I did something. Don't know what. The end result is that I'm now getting a classpath error when one of my plugins (A) ...

classpath question, head first servlets book

I'm studying via Head First's Servlets and JSPs, and doing the assignment on the third chapter. On page 81, there's this javac call: > %javac -classpath /Users/bert/Applications2/tomcat/common/lib/ servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java I don't get what it's trying to do. The book says th...

Does GPL classpath exception apply for "fat jar" contianing all JAR files or do I have to redistribute source?

I am reading here: http://www.gnu.org/software/classpath/license.html for http://www.jidesoft.com/products/oss.htm I would like to keep a single JAR file if possible for everything. Thank you Misha p.s. Alternately, is there a good, cross-platform (Windows & Mac) way to deploy multi-jar files without Java Web Start (I need it to run ...

Using a custom PMD ruleset file within Ant

I'd like to use a custom PMD ruleset file for my build. Basically, I want to use many of the built-in ruleset packages with some rules turned off. For example, suppose I only wanted the strings and basics rules, I have this ruleset file, called ruleset.xml: <?xml version="1.0"?> <ruleset name="Custom ruleset" xmlns="http://pm...

Tomcat 6.0 on Mac OS X

Hey, I'm trying to run Apache Tomcat 6.0.26 on Mac OS X - Snow Leopard, but with no luck :( I've downloaded Tomcat core from: http://tomcat.apache.org/download-60.cgi unarchived it at /Livrary/Tomcat directory, but when I'm trying to run it using ./bin/startup.sh command from log/catalina.out logs it seem's that it can't find servlet-ap...

best way to deploy a package

When I finished to write my classes I put them into a package structure and then I jarred all. Now which is the best way to deploy and use my jar? setting classpath; use CLASSPATH variable; using the extension mechanism. ...

How to set the classpath for rJava in R?

Hi, I have a package for R which contains several jar files. For better maintenance I want to split the jars in a separate package and have the R source and two small jars in the main package. But now I always get a "NoClassDefFoundError" from rJava, if I call my functions. In the main package I have an onLoad function, which starts th...

How can I access resources on a parent classpath using Spring 2.5.x?

In my Websphere Portal environment, I'm trying to configure a bean that uses a resource found outside of the WAR (it's in some parent classpath for WAS). I'm sure it's there because I can access it using the following: URL url = getClass().getResource("/config/someProps.properties"); However, in my Spring applicationContext.xml, the f...

getClass().getClassLoader().getResourceAsStream() is caching the resource

I have a resource (velocity template) which I'd like to be able to swap during development. However, getClass().getClassLoader().getResourceAsStream() seems to cache the template. Is there a way to disable this besides using a file loader instead of the class loader? ...

Hibernate Tools Eclipse Classpath

How do I set the classpath in eclipse which is used by Hibernate Tools? I have tried right-clicking on my project, going to properties, then Java Build Path, then the Libraries tab, and adding the appropriate JARs. However, Hibernate Tools still gives a classNotFound even after I added the JAR using the above process. ...

.class path api java

Hi! I would like to insert an API java into a web page. Even with such an easy code: applet code = 'Ejs.Simulations._apps._examples.HVmin' archive = 'Ejs/Simulations/_apps/_examples/HVmin/hVmin.jar', width = 300, height = 300 /> I get this error: cargar: clase Ejs.Simulations._apps._examples.HVmin not found. java.lang.ClassN...

Websphere 6.1 - Classloader.getResource returning URL instance failing to convert to URI

I have create one utility which reads all files stored in the directory on classpath. The directory location is configurable through properties file. When I am trying to read the directory location using URL url = XXX.class.getClassLoader().getResource("com/abc"); //abc is directory on classpath. URI uri = url.toURI(); //This fails with...

Eclipse not using jars from add classpath variable

I added a classpath variable (via eclipse's build path) that points to a cache of jars. While this folder is represented in eclipse's folder view, the contained jars are not recognized for some reason. For example, when I import a class that is present in a jar in the cache (and thus the added classpath variable), eclipse indicates tha...