classpath

Java NoClassDefFoundError when running jar containing library jar

北战南征 提交于 2019-12-23 15:35:30
问题 After several hours, I'm at my wit's end, even after reading reams of documentation and SO questions. I'm certain that I'm missing something obvious, but I just can't figure it out. I've created a number of java files, including a single entry point with a main method. That class also makes use of one "library" class, located in com.test.lib.MyLibraryClass.class, within a jar file, mylib.jar. I'm building my jar file successfully using the following ant XML. <target name="jar" depends=

Why does the classpath default to the WEB-INF/classes/ instead of WEB-INF/ in JBoss 5.1?

可紊 提交于 2019-12-23 13:25:06
问题 I have a piece of code that get's the spring context using context = new ClassPathXmlApplicationContext("application-context.xml"); The file is located inside the WAR's "WEB-INF/application-context.xml" In JBoss 4.2.3, the above code works fine. In JBoss 5.1, after experimenting, it seems to expect the file to be in "WEB-INF/classes/application-context.xml". And after shifting the file there it works. I also googled around saw lots of references to how the VFS messes with Spring's classpath

Groovy, embedded in Java, calling back to Java

大憨熊 提交于 2019-12-23 12:43:49
问题 I know I have to be doing something just brain-dead stupid for this not to work, but I'm in a situation where I want to dynamically load behavior into a running server. I chose groovy as my tool to do this. The behavior will need to reference classes on the server's classpath, such as my model objects as well as third party libraries like Freemarker. I threw together this silly POC to show feasibility. I can't get the groovy script to resolve the Java classes "ThingyDoodle" and "Fooable", in

Can't use JFace and SWT in eclipse without creating plugin

落爺英雄遲暮 提交于 2019-12-23 12:26:39
问题 DISCLAIMER : this is the classic case of .NET GUI trying to work his way around JAVA stuff. PROBLEM DESCRIPTION: I am trying to build a very simple GUI with JFace and SWT - the code is straightforward (there's plenty tutorials), what it's not so straightforward is that I can't seem to get JFace and SWT to work outside a plugin project. I would expect to be able to use JFace and SWT in my project no hassle, since I put "C:/eclipse 3.5/plugins" in my CLASSPATH (from my computer --> properties -

Java classpath and config file

放肆的年华 提交于 2019-12-23 12:04:19
问题 I'm having some trouble finding a config file with classpath. I use : InputStream stream = myclass.class.getResourceAsStream("properties.file"); The properties.file is located under config directory. When running the program with eclipse, it works. I just added config folder in the classpath in the launch configuration. But If I want to run the exported jar like this : java -jar -cp C:\project\lib;C:\project\config myclass.jar I get the oh wonderful java.lang.NullPointerException because it

The executable generated by install4j doesnt start

ⅰ亾dé卋堺 提交于 2019-12-23 10:59:36
问题 I'm evaluating install4j since I want to generate an executable for our Windows-users. Normally we run our app directly in Eclipse, or using bash scripts. We have one big jar with the whole framework as well as our applications, and some dependency jars. On deployment we set the class path with one shellscript and start the individual applications using other shellscripts. This procedure work on both Linux, Mac and Windows. Now I tried installing the demo version of install4j, and have been

testng fails to load test classes from ant

孤人 提交于 2019-12-23 10:14:13
问题 I'm trying to run TestNG tests from Ant. After reading the manual, I came up with: <taskdef name="testng" classname="org.testng.TestNGAntTask" classpath="../../lib/testng-6.8.1.jar"/> <target name="testng" depends="compile-tests" description="Run testng test suite"> <fileset id="mixed.tests" dir="${bin.main}"> <include name="**/*Test.*"/> </fileset> <testng mode="mixed" classfilesetref="mixed.tests" verbose="5" failureProperty="tests.failed" outputdir="/tmp/report"> <classpath> <fileset dir="

Tomcat 6 not loading jars from WEB-INF/lib

喜欢而已 提交于 2019-12-23 08:46:44
问题 I'm trying to track down a configuration issue in my tomcat environment. Our production servers are running a tomcat installation and reading the war from a shared NFS mount. However, when I try the same war with a stand-alone box (with their configuration), I get the error posted below. Whats interesting, is that if I unzip all the jars in WEB-INF/lib into WEB-INF/classes, this error goes away. So, it seems like something is preventing the app from loading the WEB-INF/lib path, but I can't

How to run following command to test kafka server is installed properly or not?

喜夏-厌秋 提交于 2019-12-23 08:05:59
问题 I have installed Kafka as well zookeeper. Zookeeper is working fine. However, when I try to run Kafka server, I get the below error. Please help me with a solution for this problem. Thank you in advance!!! Command run from C:\kafka-0.9.0.1 : .\bin\windows\kafka-server-start.bat .\config\server.properties Error message: Classpath is empty. Please build the project first e.g. by running 'gradlew jarAll' 回答1: When you installed Kafka, did you download from a source download or a binary download?

How to run following command to test kafka server is installed properly or not?

拈花ヽ惹草 提交于 2019-12-23 08:05:02
问题 I have installed Kafka as well zookeeper. Zookeeper is working fine. However, when I try to run Kafka server, I get the below error. Please help me with a solution for this problem. Thank you in advance!!! Command run from C:\kafka-0.9.0.1 : .\bin\windows\kafka-server-start.bat .\config\server.properties Error message: Classpath is empty. Please build the project first e.g. by running 'gradlew jarAll' 回答1: When you installed Kafka, did you download from a source download or a binary download?