classpath

Classpath problem: configLocation in Spring

两盒软妹~` 提交于 2019-12-11 13:19:34
问题 I am having some kind of classpath problem: I've put my context.xml files in META-INF/spring/conf/ They can be perfectly found by Spring using classpath:WEB-META/spring/conf/root-context.xml ( root-context.xml references other xml's). My Hibernate.cfg.xml is on src/main/resources , so it 'should' be on the classpath, however Spring doesn't seem to find it when it tries to Autowire a Hibernate template in one of my DAO classes. I tried using a simple query with Spring in a main class, here it

Run jar with classpath parameters

那年仲夏 提交于 2019-12-11 12:58:36
问题 I'm probably missing something stupid but still. I created a jar file with the following inner structure: folder1 folder2 META-INF resources where folder1 and folder2 hold .class files and resources has txt and png files. In my code i have the following line BufferedReader reader = new BufferedReader(new InputStreamReader( ClassLoader.getSystemResourceAsStream(txtFile))); where txtFile is a string holding a file name that is located within the resource folder. (directly in the folder). The

How to allow user to change the version of the library which is used by a plugin in Gradle?

余生长醉 提交于 2019-12-11 12:57:06
问题 In my plugin I call static bootstrapping method MutationCoverageReport.main(arg) from a library which is a compile dependency of my plugin. I would like to allow a plugin user to change the version of the library which should be used (assuming the selected version has compatible API). I could advice user to exclude a transitive dependency from my plugin and add a dependency to the library in the requested version manually to buildscript.dependencies.classpath in his build.gradle, but this is

Confusion in understanding classpath

筅森魡賤 提交于 2019-12-11 12:24:27
问题 I'm confused in understanding, how java interpretor and java compiler searches for all the necessary jar files it requires from environment variables. As I have only set the set path variable for JDK directory, but I've not set any variable to search for any class libraries, which jvm requires. How can it search those important jar files? 回答1: Which jar files are you talking about? Java already knows about the jar files it "owns" (such as rt.jar) - you don't have to tell it about them

How to specify “pig-0.13.0-h2.jar” dependency in build.gradle?

我的梦境 提交于 2019-12-11 11:04:06
问题 To specify a Maven dependency in my project, I provide a name , a group id , and a version . This has been enough for every dependency in my project, save one. Pig has multiple jars in the same artifact (not sure if I have the proper nomenclature; I'm still rather new to Maven), but I only need one. Specifically, I need pig-0.13.0-h2.jar . However, when I provide the dependency compile "org.apache.pig:pig:0.13.0" in my build.gradle , only pig-0.13.0.jar , pig-0.13.0-sources.jar , and pig-0.13

How to write a batch file to set classpath and execute java programs

时间秒杀一切 提交于 2019-12-11 09:38:53
问题 Some of my java programs need so many jar files to execute. For executing this, I may have to add all of those jar files in classpath variable of environment variables or else have to set classpath manually at command prompt each and every time when I open a new cmd prompt. I do not want to add all jar files at classpath variable in environment variables and also set manually each and every time when I open new cmd prompt. I would like to write a script in batch file to set classpath and

including Qclasses in the classpath

牧云@^-^@ 提交于 2019-12-11 09:37:34
问题 I generate My Qclasses in target/generated-sources/java and the Qclasses are generating good but when i want to use them in my src code /YY/src/controller/XXX.java for example like that QLot lot = QLot.lot; I get QLot cannot be resolved to a variable . It seems that the generated Qclasses are not in the classpath !! <plugin> <groupId>com.mysema.maven</groupId> <artifactId>apt-maven-plugin</artifactId> <version>1.0.6</version> <executions> <execution> <goals> <goal>process</goal> </goals>

Error trying to adding arbitrary classpath in Manifest.mf

对着背影说爱祢 提交于 2019-12-11 09:21:27
问题 I have this code to add my classpath: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <archive> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> <addClasspath>true</addClasspath> <mainClass>ApuestaYa</mainClass> </manifest> <manifestEntries> <Class-path>../lib/jcalendar.jar ../lib/eclipselink.jar ../lib/libforms-1.3.0.jar ../lib/Imagenes.jar ../lib/DriverPersistencia.jar ..

Is the order of the value inside the CLASSPATH matter?

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:57:09
问题 I have 2 java program located seperately One in c:\test and the other in c:\test\new I can compile both of it without any error \javac But when i try to execute the file \java it shows the error like this Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at ButtonFrame.makeButton(ButtonTest3.java:42) at ButtonFrame.<init>(ButtonTest3.java:29) at ButtonTest$1.run(ButtonTest.java:17) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue

What's (by default) on the classpath when you run a Jenkins job?

若如初见. 提交于 2019-12-11 08:42:25
问题 When you kick off a maven test in Jenkins, what is Jenkins putting onto the Java classpath by default? 回答1: it would be system's classpath (jdk you specified) and maven dependencies available to test phase You can verify it by adding System.out.println(System.getProperty("java.class.path")); 来源: https://stackoverflow.com/questions/24412637/whats-by-default-on-the-classpath-when-you-run-a-jenkins-job