classpath

You need to run build with JDK or have tools.jar on the classpath

最后都变了- 提交于 2019-12-18 04:38:15
问题 I'm using Eclipse Luna to develop java maven applications. I am, or was, but am again now, using jdk1.7 as my default installed JRE. After an update from SVN that I made, I started getting this error on my pom.xml files: You need to run build with JDK or have tools.jar on the classpath. If this occures during eclipse build make sure you run eclipse under JDK as well (com.mysema.maven:apt-maven-plugin:1.0.6:process:default:generate-sources) I noticed that my jdk1.7 installation was GONE from

Loading a configuration file from the classpath

拜拜、爱过 提交于 2019-12-18 04:21:57
问题 I'm working on making my Java app easy to deploy to other computers and am writing an ant script to do so, that is going fine. I'm having trouble loading resources that are listed in the classpath named in the manifest file of the jar. Folder structure looks like this: /MyProgram.jar /lib/<dependencies> /config/configuration.xml I can not for the life of me access the configuration.xml file using the ClassLoader. It, along with all the dependencies are listed explicitly in the Class-Path

How to configure .dll file in Java?

回眸只為那壹抹淺笑 提交于 2019-12-18 04:12:38
问题 I am using Jacob jar file in my java application. This Jacob jar file comes with a .dll file. I have added Jacob jar file to my classpath. But when I execute my application a runtime error occurs as "couldn't load jacob-1.15-M3-x86.dll file" How can I load this .dll file? Edited:================================================================================= I had set the "path" environment varaible to the dir that contains my .dll file and loading that .dll file as follows static { System

Re-compile a Java Class from Jar

半腔热情 提交于 2019-12-18 03:40:46
问题 I have an executable jar that has one class file with a wrong value. I requested that file from the author and corrected the value. Now I want to compile it and add the compiled class file into the jar and run it. Not surprisingly I get multiple "cannot find symbol" errors for references of custom object that were in the jar file. I tried to compile the file by referencing the jar file in the classpath like so C:/> javac file.java -classpath C:/folder/where/jar/is but this doesnt seem to work

Java -jar : access external configuration file

霸气de小男生 提交于 2019-12-18 03:36:06
问题 I'm looking to do something which I thought was not going to be difficult. I have an application that I'd like to package up as a jar because I've got ~30 dependencies and I would like to be able to deploy a single file. I have some configuration files - a properties file and a spring configuration file, and my log4 props file - that I would like to have external to the jar. I guess I expected that if I put them in the same directory as the jar it would find them when it ran, but it doesn't.

Java -jar : access external configuration file

我是研究僧i 提交于 2019-12-18 03:36:02
问题 I'm looking to do something which I thought was not going to be difficult. I have an application that I'd like to package up as a jar because I've got ~30 dependencies and I would like to be able to deploy a single file. I have some configuration files - a properties file and a spring configuration file, and my log4 props file - that I would like to have external to the jar. I guess I expected that if I put them in the same directory as the jar it would find them when it ran, but it doesn't.

Broken wildcard expansion for Java7 commandline on Windows(7?)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 03:12:31
问题 I observe a strange behavior of wildcard expansion behavior for Java7 on Windows. For centuries there was a clean difference between "*" versus *. Seems this it not longer true for Java7 (at least on Windows7). I noticed the problem when using a wildcard classpath. In despite of quoting the wildcard-classpath it gets expanded. Thus it seems not possible any more to pass a wildcard to the java application. So using java -cp "somewhere/*" will fail (as does "somewhere\*" ). A workaround seems

Broken wildcard expansion for Java7 commandline on Windows(7?)

谁说我不能喝 提交于 2019-12-18 03:11:06
问题 I observe a strange behavior of wildcard expansion behavior for Java7 on Windows. For centuries there was a clean difference between "*" versus *. Seems this it not longer true for Java7 (at least on Windows7). I noticed the problem when using a wildcard classpath. In despite of quoting the wildcard-classpath it gets expanded. Thus it seems not possible any more to pass a wildcard to the java application. So using java -cp "somewhere/*" will fail (as does "somewhere\*" ). A workaround seems

Whitespaces in CLASSPATH

拟墨画扇 提交于 2019-12-18 02:44:46
问题 I am working on a Windows PC and have cygwin on it! I have organized all my jars under a directory within a few directories! I am writing a bash script to set the CLASSPATH by iterating through the directory that is passed as a parameter as follows: for JAR_FILE in `ls *.jar` do CLASSPATH="$DIRECTORY_TO_LOOK_FOR_JARS"/$JAR_FILE:$CLASSPATH done Whenever there are spaces in the directory that is passed like /cygdrive/c/Documents and Settings/user/My Jars and I run java -cp $CLASSPATH

Whitespaces in CLASSPATH

て烟熏妆下的殇ゞ 提交于 2019-12-18 02:44:17
问题 I am working on a Windows PC and have cygwin on it! I have organized all my jars under a directory within a few directories! I am writing a bash script to set the CLASSPATH by iterating through the directory that is passed as a parameter as follows: for JAR_FILE in `ls *.jar` do CLASSPATH="$DIRECTORY_TO_LOOK_FOR_JARS"/$JAR_FILE:$CLASSPATH done Whenever there are spaces in the directory that is passed like /cygdrive/c/Documents and Settings/user/My Jars and I run java -cp $CLASSPATH