classpath

Environment variable CLASSPATH <> Clojure's CLASSPATH. Why?

Here I check the environment variable CLASSPATH daniel@daniel-laptop:~/ps/clojure/projects/ring-tutorial$ echo $CLASSPATH /home/daniel/ps/clojure/projects/ring-tutorial/src Here I check what java thinks it is. daniel@daniel-laptop:~/ps/clojure/projects/ring-tutorial$ lein repl Clojure 1.1.0 user=> (System/getProperty "java.class.path") ...

[Eclipse] Add user libraries to Ant Builder classpath

Hi @ll I am having a problem with setting up an Ant Builder for my Eclipse projects. I do have several 3rd party libs configured as user libraries within Eclipse. Those libraries are added to the build path of my projects and everything is working fine. My problem is, that if I want to use the Ant Builder from Eclipse, I will have to ...

How to fix?: Server in Eclipse suddenly requires jars in server's launch classpath.

I have a web project built in eclipse using Spring and for Tomcat. Before some recent changes that I either cannot remember or undo, I could simply start the server in the ide and hit my servlets without issue. After making those changes, when I started the server, I got the stacktrace as follows. SEVERE: Error configuring application...

Importing Jars not working

Hey guys, I'm trying to do something very simple. All I want to do at this moment is build a file that contains the appropriate classes. I have a file called Promomon.java class Promomon { public static void main(String[] args) { System.out.println("Hello World!"); } } Simple simple, everything is fine there. I can compile...

Running TestNG testng.xml tests from Eclipse

I have some packages com.company.testing.module1 com.company.testing.module2 com.company.testing.module3 I also have some classes that have TestNG annotations in com.company.testing.tests Now I put testng.xml in com.company.testing The XML file looks like <?xml version="1.0" encoding="UTF-8"?> <suite name="Foo"> <test na...

Java Classpath Issue

I have two classes: MyApplication Library The Library has already been compiled into Library.class and the source code is no longer available. I am now trying to compile MyApplication from source. MyApplication depends on the Library. The Library has a package name of org.myCompany. I tried setting my classpath to the following: s...

Classpath problem for my Ant Build file

I have been using this exact Build.xml file. I had problems in the beginning using the junit task with it, but I figured out those problems a couple months ago. Recently I got the all to common error message when I ran my build file with the test task. test: [junit] Testsuite: com.mmz.mvc.test.AgentDAOTest [junit] Tests run: 1, Failure...

java class files in current directory?

How "java" knows the class file to execute without setting the class path.ie.,Does it check in the current directory by default or we need to set the class path for current directory too. ...

How to add resources to classpath

Hello! How do you add a folder (e.g. a resource folder containing arts) to the classpath of a netbeans project? I managed to do that manually via editing the NB generated jar file of the project (that is its MANIFEST.MF file + copying the resources manually), but there should be a way to tell netbeans as well to mind the resources, no? ...

help with running clojure, possible classpath issue

admin@apollo:~/clojure$ clojure Clojure 1.0.0- user=> (require 'clojure.contrib.str-utils) java.io.FileNotFoundException: Could not locate clojure/contrib/str_utils__init.class or clojure/contrib/str_utils.clj on classpath: (NO_SOURCE_FILE:0) user=> What have I done wrong while installing clojure? Why cant clojure locate my java clas...

How to set the NetBeans boot class path to include mail.jar?

I have a javamail app that works fine in the Android/Eclipse environment, but throws the following in NetBeans (porting Android app to Desktop): javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed boundary="----=_Part_0_7749469.1284737984291" I found a workaround here, but can't figure o...

Simple Classpath question using with jars

I have a toy program that is called Test.class. It accesses a class in a jar called myjar.jar. That jar is in my CLASSPATH variable set as part of my Windows environment. When I type echo %CLASSPATH%, I see C:\myclasses\myjar.jar. When I execute my program java Test it runs fine. But if I package the code as a jar and try r...

Tomcat reporting IncompatibleClassChangeError - classpath problem?

I'm trying to deploy an application to Tomcat 7 on a Windows server. I have a local copy set up and have tested with Eclipse without any trouble, but on the production server I get IncompatibleClassChangeError messages. This had been a problem on the local server when there were problems with the classpath, but I configured the correct...

ClassNotFoundException when starting Maven 2 RCP application

Hi, I've started a very basic Eclipse (Helios) RCP application with the "Hello RCP" template. I enabled Maven dependency management and added Spring 3 to the POM. After that I created a view and added the following code to my view. @Override public void createPartControl(Composite parent) { RestTemplate restTemplate = new RestTempla...

Add a properties file to intelliJ's classpath

I feel like a schmuck for asking this, but I'm tired of guessing. I'm running a simple java program from the IntelliJ IDE using the Run->Run menu. No problem, it works fine. Now I want to add log4j logging. I added a resources folder under my project root. I added a log4j.properties file in that folder. I changed the code to log some...

Eclipse link source and source control

I am working on a project that is under source control (perforce) and already has an Eclipse project in source control (I still have to edit it manually, but that is a different issue). I have been working on some code in a completely different location. I want to include this into the main project classpath. The problem is if I just do...

Java - Difficulty installing program from 3 separate .jar files (involves CLASSPATH)

Hi all, I'm having a little trouble running some Java code, which requires three .jar files to be used. I'm at a lost as to what to do with them--I've tried setting the CLASSPATH (and following the instructions for how to do so in the readme files), but to no avail. I was wondering if someone could walk me through it? I'd imagine three...

Classpath Issue with Java

Should there be any reason why I'm unable to run my Java program from within Eclipse when I insert this snippet of code before everything else: ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader)sysClassLoader).getURLs(); for(int i=0; i< urls.length; i++) { System.out.println(urls[i].getFil...

Is the order of the value inside the CLASSPATH matter?

I have 2 java program located seperately One in c:\test and the other in c:\test\new I can compile both of it without any error \javac But when i try to execute the file \java it shows the error like this Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at ButtonFrame.makeButton(ButtonTest3.java:42) at But...

Error "main class not found"

All, My classpath has been set to the following folder: CLASSPATH = .;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\Java\jdk1.6.0_21\bin\project All my java files and class files are under project folder listed in CLASSPATH. Yet I am getting the following error while running a DriverClass in project folder: C:\Program File...