classpath

Clojure's :require and Instaparse

心已入冬 提交于 2019-12-02 01:11:25
问题 I am trying to use instaparse lib for my clojure project. I use leiningen 2.0 and clojure 1.5.1 in my project dependencies. I add instaparse to my project dependencies as follow: (defproject bachelor "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojure-contrib "1.2.0"] [instaparse "1.1.0"]]) And that is

How to overwrite classes from jdk?

狂风中的少年 提交于 2019-12-02 00:10:38
问题 I'm trying to change some classes from open jdk, so I'm creating the same package structure as the open jdk classes have and I'm changing the classes using netbeans. When i'm building the project if something is wrong in the overwritten classes i'm getting an error. If a successfully build my project it seems like the changes from my classes are not considered by the application, the open jdk classes are used instead. Any idea how can I use my classes and not the ones from openjdk ? Example:

What is use of method addJar() in Spark?

做~自己de王妃 提交于 2019-12-01 23:35:35
In spark job, I don't know how to import and use the jars that is shared by method SparkContext.addJar() . It seems that this method is able to move jars into some place that are accessible by other nodes in the cluster, but I do not know how to import them. This is an example: package utils; public class addNumber { public int addOne(int i){ return i + 1; } public int addTwo(int i){ return i + 2; } } I create a class called addNumber and make it into a jar file utils.jar . Then I create a spark job and codes are shown below: import org.apache.spark.SparkConf import org.apache.spark

JDBC CLASSPATH Not Working

半腔热情 提交于 2019-12-01 23:17:26
问题 I'm setting up a simple JDBC connection to my working MySQL database on my server. I'm using the Connector-J provided by MySQL. According to their documentation, I'm suppose to create the CLASSPATH variable to point to the directory where the mysql-connector-java-5.0.8-bin.jar is located. I used export set CLASSPATH=/path/mysql-connector-java-5.0.8-bin.jar:$CLASSPATH . When I type echo $CLASSPATH to see if it exists, everything seems fine. But then when I open a new terminal and type echo

How to load xml resource file using wild card in Spring 3.1

﹥>﹥吖頭↗ 提交于 2019-12-01 22:31:22
I want to load xml files which contains some error definitions of several modules in a Spring Maven project. I want to load and then pass the file to a JAXB unmasheller. This is what I have done so far String path = "classpath*:/**/definitions/error-definition.xml"; ClassPathResource resource = new ClassPathResource(path); unmarshaller.unmarshall(resource); My resource files are located as follows src/main/resource/module1/definitions/error-definition.xml src/main/resource/module2/definitions/error-definition.xml This gives me the following error java.io.FileNotFoundException: class path

JDBC CLASSPATH Not Working

孤人 提交于 2019-12-01 22:21:43
I'm setting up a simple JDBC connection to my working MySQL database on my server. I'm using the Connector-J provided by MySQL. According to their documentation, I'm suppose to create the CLASSPATH variable to point to the directory where the mysql-connector-java-5.0.8-bin.jar is located. I used export set CLASSPATH=/path/mysql-connector-java-5.0.8-bin.jar:$CLASSPATH . When I type echo $CLASSPATH to see if it exists, everything seems fine. But then when I open a new terminal and type echo $CLASSPATH it's no longer there. I think this is the main reason why my Java server won't connect to the

'Batik not in classpath' error when running servlet

橙三吉。 提交于 2019-12-01 21:59:18
问题 I'm writing an extension of the FopServlet.java included in Apache FOP. My platform is Linux CentOS 5.7-64bit, with Tomcat 5.5. The servlet 'works', but I'm unable to process SVG files. The error I get when Tomcat runs the servlet is 'Batik not in classpath'. But in 'webapps/fop/WEB-INF/lib' there is 'batik-all-1.7.jar' and all the other jars. I'm not a java expert, so I'm unable to focus on the problem; googling around, maybe there is a missing jar, but which one? AVVERTENZA: Batik not in

Configuration problems: Unable to locate Spring NamespaceHandler for XML schema namespace [http://java.sun.com/xml/ns/javaee]

末鹿安然 提交于 2019-12-01 21:21:57
问题 I'm trying to combine JUnit and Spring in a web project. Thanks to this question, I have succeeded in loading the spring config file into TestClass: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class TwitterServiceTest { @Resource IRepository repository; But when the test runs, I got the following error: Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema

Jetty Maven plugin - Put properties file in classpath

为君一笑 提交于 2019-12-01 21:08:27
I'm using the eclipse jetty plugin in my project: <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.0.3.v20130506</version> I have my application that read a file in the classpath of the server, but I can't manage to put it in the Jetty classpath... I would to put it in a folder in my project and make that folder part of the Jetty classpath, how can I do it? Is there a better solution to make that file external to the application? It was just a matter of configuration of the maven plugin <configuration> <scanIntervalSeconds>10</scanIntervalSeconds>

Compiling .java files from the command line - external libraries, classpath

六月ゝ 毕业季﹏ 提交于 2019-12-01 20:59:19
I made a project in Eclipse and am now trying to ensure that the .java files compile from the command line. I've been trying to compile using javac *.java in the folder with all my .java files. However, this results in errors due to a reference to a class from an external library, Joda-time. I have the following .classpath file that Eclipse made for the project but don't know what to do with it. <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui