classpath

Running a java program at the command line, what am I doing wrong?

Note I'm running windows, the path just looks like it's linus because I typed it manually and thats how I think of paths. I'm trying to run a java class That I have built to diagnose my connection to a databse, it references the oracle jdbc adaptor. When I just run it without a class path: %> java DBDiagnostics <connectionString> I ...

Eclipse: How to build an executable jar with external jar?

Hi all, I am trying to build an executable jar program which depends on external jar downloaded. In my project, I included them in the build path and can be run and debug within eclipse. When I tried to export it to a jar, I can run the program but I can't when I try to press a button which includes function calls and classes from the ...

How can I add jars to the classpath when I invoke Jython *without* adding them to $CLASSPATH?

I'd like to do something similar to jython -cp FOO:BAR:BAZ argle.py. If I add FOO, BAR, and BAZ to $CLASSPATH this works. I tried to add them to sys.path at run-time, but that doesn't appear to work for jars. It does work if I add a path to the expanded jars to sys.path at runtime. Is there a simple alternative to exploding the jar file...

Java logging configuration only partially taken into account

I've an issue with a project I try to deliver using the one-jar packager to simplify the deployment process. Without the packaging, everything works fine and the logging configuration is perfectly loaded, but within the packaging, only part of the configuration is appied. So, here is the logging.properties I use: handlers= java.util.lo...

Java's default JAXB implementation is chosen over my classpath.

I've written a java application that utilizes JAXB for XSL transforms. I've included the saxon9.jar in my classpath so that I can use XSLT 2.0 rather than XSLT 1.0 on the command line. java -classpath ./lib/saxon9.jar:./ -jar myApp.jar I've included code in my XSL to report the XSLT used. <xsl:comment><xsl:text > </xsl:text>XSLT Ver...

Howto print java class garbage collection events ?

Hello, java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode) I'm trying to debug a NullPointerException I'm getting for passing a reference to statically defined field. To be more specific, I'm setting a global on a Drools3 working mem...

can't get the classpath right

i'm trying to compile this slick2d example (first one) but i can't get it to work. here's the code: import org.newdawn.slick.AppGameContainer; import org.newdawn.slick.BasicGame; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.SlickException; /** * @author panos */ public class Wizar...

adding classpath in linux

Hi, export CLASSPATH=.;../somejar.jar;../mysql-connector-java-5.1.6-bin.jar java -Xmx500m folder.subfolder../dit1/some.xml cd .. is the above statement for setting the classpath to already existing classpath in linux is correct or not ...

Quickest method to package a Java console app

I've got a very small set of classes built up in a custom package hierarchy with one console app class that employs them. Everything works fine from JCreator and from a command prompt. I'd like to build a second console app that re-uses that same package. As a Java newbie, what is the quickest, dirtiest method to do that? My main con...

Problem compiling in Clojure

I've been trying to compile a very simple test.clj in Clojure without any success. I have a thread on the Clojure Google Group with several responses, but nothing has helped. To quickly summarize, here is my clojure file: (ns test.test (:gen-class)) (defn -main [gre] (println (str "Hello " gre))) Basically it's the exam...

How to get MigLayout to work with my project?

I'm trying to make a small GUI app and I want to use MigLayout with it. As Java newbie I don't know how to get MigLayout to work with my code and I'm running out of ideas. My project source code is in ~/git/project/src/qdb/ The qdb is my java package name. I downloaded miglayout-3.7-swing.jar and miglayout-3.7.jar and placed them to m...

Jasmin in CLASSPATH

I have download jasmin.jar from http://sourceforge.net/project/showfiles.php?group_id=100746 I have changed my CLASSPATH to the following: echo %CLASSPATH% C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\Sun\SDK\lib;C:\Sun\SDK\jdk\lib\jasmin\jasmin.jar; The following command works without a problem: java -jar C:\Sun\SDK\jdk\lib\ja...

Remove project .jars from project explorer view in Eclipse

the list of jars just takes too much place. Can I collapse it or hide it? ...

"SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found" when using Batik in a webapp on Tomcat

This is possibly related to a classpath problem, but I'm really not sure at this point, since I don't get this error on some machines. The error at the top of the stack is SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found. Why would I get this error only in some environments, but not others? How can I further investi...

Getting Ant <javac> to recognise a classpath

I have an Apache Ant build file with a <javac> command that requires four specific JARs to be on the build classpath. I've tried to do this: <project basedir=".." default="build_to_jar" name="Transnet Spectrum Analyzer"> <property environment="env"/> <property name="src" value="src"/> <property name="libsrc" value="library_s...

jdbc connection using thin driver

i am connecting orace 10g xe with java but getting the exception java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver even i have included the classpath of driver i.e ojdbc14.jar if i have set wrong classpath plz tell me the correct way to set the classpath ...

How do I set an embedded Groovy scripts classpath?

I am trying to extend an Eclipse code builder (for generating DTOs from Hibernate VOs) - and it uses Groovy for its template system. The code it uses to create the groovy Script is a little weird (not what I see in the Groovy docs) but it works, mostly: GroovyShell shell = new GroovyShell(); script = shell.parse(source); Then, later...

How to add external library to the classpath in scala's interpreter?

I'm trying to reference some classes in the Scala Interpreter that were writen and compiled using Eclipse. Eclipse stores compiled Java byte code in a folder {workspace}/myProject/bin. Is there some command which will add this folder to the classpath used by the Scala Interpreter? Maybe scala.bat should be edited or parameterized with s...

Tomcat cant pick class-path from Manifest file

Tomcat Version :5.0.28 JDK: 1.5.0.14 The problem: I am using both hibernate and struts We are not on the latest and greatest of the version for these libraries So- both need a different version of apache-commons library. The solution I have in mind: Use manifest file and specify a different version of apache-commons for each My web ...

read file in classpath

Here is what I want to do and I am wondering if there is any Spring classes that will help with implementing. I don't have to use spring for this particular problem, I'm just implementing it with everything else. In my DAO layer I want to externalize my sql files aka 1 sql per file. I want to read and cache the sql statement even maybe...