classpath

Mac Indexing and CLASSPATH problems - java.lang.NoClassDefFoundError

拜拜、爱过 提交于 2019-12-25 04:33:37
问题 System properties: Java 1.6 Mac OSX version 10 Ant 1.8 Scenario: I am working on my final year project which is to create a website which uses Lucene to search my website and my database. I am working through lucene demos here http://lucene.apache.org/java/2_3_2/demo.html which talks about classpath http://lucene.apache.org/java/2_3_2/demo3.html and a web example I have created a .bash_profile file in my home directory /Users/philhunter/ which sets my classpaths: CLASSPATH=${CLASSPATH}:/Users

Adding jar library to project Intellij IDEA

时间秒杀一切 提交于 2019-12-25 04:09:47
问题 I've tried to link a jar-library to my project, but it doesn't seem to "completely" work.. I've used Project structure (shift+ctrl+alt+S) to add stdlib.jar, and the library seems to be linked to the program module on the Modules - Dependencies tab of the Project structure window (Sorry, I can't add images, need 10 rep) When I create a class in the src folder of the project, I can use the classes/methods from stdlib.jar, but when I create a package inside src and then create new classes inside

Adding jars to the classpath of the code that launches map reduce job

微笑、不失礼 提交于 2019-12-25 04:07:15
问题 I am trying to launch a map reduce job from an application that implements the Tool interface. The application does few other things which are like preconditions for the map reduce job. This class use some third party libs, How do I add those jars to the classpath while running the jar using the command: hadoop jar < myjar > [args] From this Cloudera's post I tried to set the HADOOP_CLASSPATH env var to the third party jar, but it did not work out. The third party jars mentioned above are

Tomcat 6 “losing” classes in production

做~自己de王妃 提交于 2019-12-25 03:59:06
问题 I'm having an intermittent error with a legacy production app. On some boxes, certain features will break somewhat randomly. In the logs, i get a ClassNotFound exception. However, the class is there, in WEB-INF/classes and the rest of the app is loading properly (this is not loaded with reflection/forName/etc, its just a standard java class). The boxes are configured identially, but this does not happen on every box. Restarting the app will work, but its a large cluster, and pretty irritating

Could not find javax.xml.xquery:xqj-api:1.0

拥有回忆 提交于 2019-12-25 03:42:57
问题 The maven repo is added correctly, and is required? If so, what's the syntax to add xqj ? exception: thufir@dur:~/NetBeansProjects/helloWorldBaseX$ thufir@dur:~/NetBeansProjects/helloWorldBaseX$ gradle clean run > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Could not resolve all files for configuration ':compileClasspath'. > Could not find javax.xml.xquery:xqj-api:1.0. Searched in the following locations: -

Cann't get file from classpath (using NIO2)

走远了吗. 提交于 2019-12-25 02:53:57
问题 I want to create a String from the content of the file. According this answer I do it in this way: private static String buildStringFromTemplate(String stringTemplatePath) throws IOException { byte[] encoded = Files.readAllBytes(Paths.get(stringTemplatePath)); return new String(encoded, "UTF-8"); } (As I understand this is a path of new NIO2 API, that is a part of Java 7.) stringTemplatePath parameter is a name of the file ( "template.html" ). I check location of this file. It is in the

Where is the ojdbc jar file

こ雲淡風輕ζ 提交于 2019-12-25 02:08:59
问题 I am using oci driver to connect to oracle 11.2.0 on Linux, I found that under LD_LIBRARY_PATH, there is only libocijdbc11.so but any ojdbc jar files, is that right? For database connection, am I supposed to add this *.so file to java CP? I can't test it right away because it is on customer production environment, so just want to get what's the gist first, thanks for any guide! 回答1: you can find the ojdbc*.jar files under $ORACLE_HOME/jdbc/lib and the *.so files must not be included in your

Eclipse class version bug

那年仲夏 提交于 2019-12-25 01:49:49
问题 In eclipse 3.4 I'm trying to do some performance tests on a large product, one of the included libraries is the vecmath.jar (javax.vecmath package) from the Java3D project. Everything was working fine and then when trying to run it yesterday I get this exception/error not long after starting it up: java.lang.UnsupportedClassVersionError: javax/vecmath/Point2f (Unsupported major.minor version 49.0) Which I believe means that I'm trying to load a java 1.5 class file into a 1.4 jvm which is

The property file is not found when it's in a jar

你离开我真会死。 提交于 2019-12-25 00:33:48
问题 I've got a problem with my property file since I deploy my application within jars. When it was just in the WEB-INF/classes directory, there was no problem. My problems occur only with properties files inside jars. Let me explain. I will simplify my code. My application deals with buisiness objects called IPX (it's not useful to know what it is) There's a DAO class called IpxDaoImpl with string attributes, that are SQL queries public class IpxDaoImpl implements IpxDao extends

how to correct red “import” error messages from Eclipse?

家住魔仙堡 提交于 2019-12-24 19:05:39
问题 I created a project using gradle init --type java-application --test-framework testng --dsl kotlin but Eclipse shows: For what it's worth, this runs fine: thufir@dur:~/eclipse-workspace/baseX$ thufir@dur:~/eclipse-workspace/baseX$ gradle clean run > Task :run Oct. 06, 2019 6:35:33 P.M. org.basex.examples.local.LoadXML <init> INFO: {databaseName=books, dataResource=books.xml} Oct. 06, 2019 6:35:34 P.M. org.basex.examples.local.LoadXML createDrop INFO: Name Resources Size Input Path -----------