classpath

Interpreting eclipse .classpath file. What does 'kind=“con”' and 'exported=“true”' mean?

感情迁移 提交于 2019-11-27 19:21:10
This is the eclipse .classpath file of the eclipse plugin program that I downloaded. I think that kind="src" and kind="output" is pretty straight forward, as they means the where the source java files and compiled class files are located. The kind="lib" seems to indicate the jar files the plugin is referencing, but I have something that I'm not sure about. What does the kind="con" mean? What is it for the exported="true" ? I think in order to use this plugin, all the jar files that the plugin refers to should be exported, but only some of them are exported. 1) In kind="con" , the con stands

“Could not find or load main class” Error while running java program using cmd prompt

天大地大妈咪最大 提交于 2019-11-27 18:22:05
I am running a simple "HelloWorld" Program. I get this error in the command prompt: Could not find or load main class HelloWorld . I have set the CLASSPATH and PATH variable in the system. In the cmd prompt, I am running from the directory where I have saved HelloWorld program. I can see the class name and the file name are same and also .class file created in the same directory. What else could be the problem? My sample program looks like this: package org.tij.exercises; public class HelloWorld { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(

How to add a jar to the boot classpath in java 9

耗尽温柔 提交于 2019-11-27 18:14:31
问题 In my application that runs on java 8, I am using -bootclasspath:p to add a jar to the boot classpath. In java 9, the option is removed. What is the alternative to do the same in java 9? 回答1: You may use -Xbootclasspath/a . Please refer to the release notes which states:- The boot class path has been mostly removed in this release. The java -Xbootclasspath and -Xbootclasspath/p options have been removed. The javac -bootclaspath option can only be used when compiling to JDK 8 or older. The

how to add a jar to my lib/ directory in intelliJ and have the classes available for my web.xml?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 17:41:45
问题 I have tried many combinations and every time I try to add the jars from the lib directory, intelliJ puts the path down as the src directory. I don't know why. When I move the jars to the src/ directory, intelliJ then switches the path to the lib/ directory. I am not sure how to get this to work correctly. 回答1: I'm using Intellij IDEA 11.1, trying to add the Selenium Standalone Server 2 JAR to my new Java project, which already has a module. I could not add the .jar to the Project settings

Test-resources of dependencies not in classpath?

谁说胖子不能爱 提交于 2019-11-27 17:39:36
问题 I have a multi module Spring project that I set up using Maven: my-root (pom) - my-logic - my-webapp (depending on my-logic) - my-consoleapp (depending on my-logic) My Test classes inherit from AbstractTransactionalJUnit4SpringContextTests and use @ContextCofiguration for setting up the ApplicationContext . E.g. the test class for a Spring Controller: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:applicationContext-logic-test.xml", "classpath

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

别来无恙 提交于 2019-11-27 17:30:46
问题 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

Intellij Cannot resolve symbol on import

末鹿安然 提交于 2019-11-27 17:16:30
This problem happens intermittently for different libraries and different projects. When trying to import a library, the package will be recognized, but the class name can't be resolved. If on the import statement, I right-click -> Goto -> the package's declaration , I see all the decompiled classes displayed in the side pane -- Including the ones I need -- If I try to auto-complete the import statement, I notice the class I need is not featured in the dropdown. I tried invalidating caches already, doesn't work. I cannot find any class conflicts -- there is no other jar file in my classpath

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

你。 提交于 2019-11-27 15:26:55
问题 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

How do I add a directory to the eclipse classpath?

匆匆过客 提交于 2019-11-27 15:08:11
I'm attempting to run an already existing eclipse project created by another person. After importing it to eclipse, and attempting to Run As->Java Application, it fails because it cannot find a .properties file in bin/resources I printed out the classpath eclipse was using logger.info(System.getProperty("java.class.path")); and sure enough, it includes bin, and all the lib/*.jars, but not bin/resources. Copying the .properties file into bin makes the program work, but I wanted to understand how to add a directory to the eclipse classpath. I tried several things, none of which worked export

Mac User - How do i set CLASSPATHS in Mac (I'm working on a Lucene Demo)

我只是一个虾纸丫 提交于 2019-11-27 14:51:31
I'm trying to get my Apache Lucene demo to work and I'm down to setting the classpath in this tutorial http://lucene.apache.org/java/2_3_2/demo.html I've hunted the web and these wer the 2 solutions I found to set CLASSPATH: CLASSPATH=${CLASSPATH}:/Users/philhunter/Desktop/COM562\ Project/lucene-3.0.3/lucene-core-3.0.3.jar and setenv CLASSPATH ${CLASSPATH}:/Users/philhunter/Desktop/COM562\ Project/lucene-3.0.3/lucene-core-3.0.3.jar The second one brings up a error -bash: setenv: command not found The first one seemed to accept ok but wen i tried the next step in the tutorial i got an error.