classpath

How to resolve this JNI error when trying to run LWJGL “Hello World”?

馋奶兔 提交于 2019-11-29 03:19:14
I'm trying to run the sample "Hello World" from the LWJGL website From this link: LWJGL "Getting Started" I'm trying to do this via the command line, just so I understand the "behind the scenes" a bit better. I've managed to compile without any errors, but when I try to run the program I'm getting this error: C:\JavaProjects\LearningLWJGL>java -classpath .;./lib/*.jar -Djava.library.path=C:\Windows\System32 HelloWorld Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/glfw/GLFWKeyCallback at java

JBoss: WAR file in EAR can't find JAR library on classpath

早过忘川 提交于 2019-11-29 03:07:15
问题 I am having a problem deploying an ear with bundled wars, jars, and configuration files (.properties files) on JBoss 4.3-eap. Here is my ear structure: +app.ear +lib *.jar libraries that the war's use +classes *.properties and other configuration files +META-INF application.xml jbos-app.xml app.war app2.war appn.war I have the following in my jboss-app.xml : <jboss-app> <jmx-name>app.startup.JbossStartUpServer:service=JbossStartUpService</jmx-name> </jboss-app> My application.xml looks like

Two classes with same name in classpath

感情迁移 提交于 2019-11-29 02:55:06
问题 If I have two classes with same name say Matcher.java in two different jar in my classpath which one will be picked up by JVM , is there anyway I can suggest JVM to pick a specific one ? 回答1: Quoting Oracle: Specification order The order in which you specify multiple class path entries is important. The Java interpreter will look for classes in the directories in the order they appear in the class path variable. In the example above, the Java interpreter will first look for a needed class in

application.properties outside jar file how to [duplicate]

China☆狼群 提交于 2019-11-29 02:35:04
问题 This question already has answers here : Read properties file outside JAR file (6 answers) Closed 3 years ago . As stated in spring-boot-reference: On your application classpath (e.g. inside your jar) you can have an application.properties that provides a sensible default property value for name. When running in a new environment, an application.properties can be provided outside of your jar that overrides the name I place a duplicated application.properties with overridden name on the same

Re-compile a Java Class from Jar

Deadly 提交于 2019-11-29 02:21:19
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... I get the same errors as if just doing C:/> javac file.java Is there a way to compile this

scala.tools.nsc.IMain within Play 2.1

醉酒当歌 提交于 2019-11-29 02:04:23
I googled a lot and am totally stuck now. I know, that there are similar questions but please read to the end. I have tried all proposed solutions and none did work. I am trying to use the IMain class from scala.tools.nsc within a Play 2.1 project (Using Scala 2.10.0). Controller Code This is the code, where I try to use the IMain in a Websocket. This is only for testing. object Scala extends Controller { def session = WebSocket.using[String] { request => val interpreter = new IMain() val (out,channel) = Concurrent.broadcast[String] val in = Iteratee.foreach[String]{ code => interpreter

Java/Eclipse: How to configure Run Configuration's Classpath for JUnit test?

ⅰ亾dé卋堺 提交于 2019-11-29 00:46:24
I have an Eclipse project with the following directory structure: MyProj/ src/main/java/ com.me.myproject.widgets Widget.java src/main/config widget-config.xml src/test/java com.me.myproject.widgets WidgetTest.java src/test/config widget-test-config.xml The Widget class reads its config (XML) file in from anywhere on the classpath and uses it to configure its properties. I am trying to just get WidgetTest 's test cases (all written with JUnit) to run inside Eclipse when I right-click the file and go to Run As >> JUnit Test . I assume I'll have to actually run it as a customized Run

How to read several resource files with the same name from different JARs?

夙愿已清 提交于 2019-11-29 00:25:07
问题 If there are two JAR files in the classpath, both containing a resource named "config.properties" in its root. Is there a way to retrieve both files similar to getClass().getResourceAsStream() ? The order is not relevant. An alternative would be to load every property file in the class path that match certain criterias, if this is possible at all. 回答1: You need ClassLoader.getResources(name) (or the static version ClassLoader.getSystemResources(name)). But unfortunately there's a known issue

Whitespaces in CLASSPATH

谁说胖子不能爱 提交于 2019-11-28 23:39:32
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 somepackage.someclass , it throws an error stating that the class and is not found, because the CLASSPATH

IntelliJ Python plugin & Run classpath

我只是一个虾纸丫 提交于 2019-11-28 21:15:43
I have a project located at /home/myself/workspace/Project1, for which I created an SDK from a Python 2.7.3 Virtualenv I have setup. This project uses some external code that I have in an accessible directory, e.g. /home/myself/LIBRARY; this directory contains several directories with code, docs etc.... For example, there is a module "important_util" located at /home/myself/LIBRARY/mymodule/important_util.py. Now, I added the whole dir /home/myself/LIBRARY in the SDK Classpath, and in the Editor window it appears just fine. The imports and calls are recognized and I can also navigate through