classpath

How do I edit the (runtime) classpath in Eclipse?

廉价感情. 提交于 2019-12-06 17:25:33
问题 In Eclipse, while trying to start Tomcat, I am getting this error: The project: xxxxxxs which is referenced by the classpath, does not exist. The reason is, I renamed my project from xxxxxxs to xxxxxx (note no "s"). It is still referencing the old one. Where is the (runtime) classpath and how do I edit it? I know this is simple, and I've looked. ( Similar to Java Eclipse - How do I change the classpath? but I just want to know how to edit it, not how to solve my particular problem. ) 回答1:

How do I run JUnit tests from a Windows CMD window when the JUnit class(es) have multiple imports?

人盡茶涼 提交于 2019-12-06 16:15:15
问题 Here is my JUnit test class: package com.bynarystudio.tests.storefront; import java.util.List; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import com.bynarystudio.tests.BaseWebTest; public class SmokeTests extends BaseWebTest { @Test public void StoreFrontMegaNavTest(){ webDriver.get(default_homepage); String source = webDriver.getPageSource(); Assert.assertTrue(source.contains("some text")); } } How do I run this test

java classpath in unix

雨燕双飞 提交于 2019-12-06 16:10:46
问题 I can run java in cygwin+windows using the following settings (the sw/jar directory has several jar files, and I pick the relevant one from the java command line): CLASSPATH=.;C:\sw\java_6u35\lib\\*;C:\sw\jar\\* java org.antlr.Tool Calc.g But I am having the following problems when running in linux: (1) I can't set a directory name in a classpath, the following line reports an error: setenv CLASSPATH .:/sw/jdk1.6.0_35/lib/\*:/sw/jar/* (2) when I run explictly with -jar option, I still get an

How does JRE installation work?

那年仲夏 提交于 2019-12-06 15:35:52
I was working on packaging my software and wondering how does the installation of JRE work. Does it simply copy the binaries on the local system and set the classpath accordingly or any other steps are done by the installer? For windows the JRE binaries are stored in C:\Program Files\Java\jre7 can I copy this folder into some other machine(with same processor 32bit or 64bit) to make JRE work. If that is so then what are the environment variables that are needed to be set? can I copy this folder into some other machine(with same processor 32bit or 64bit) to make JRE work Yes, no problem. Unless

Java NoClassDefFoundError with Ant

二次信任 提交于 2019-12-06 15:08:46
I have a third-party .jar file in a res/lib folder. The ANT build.xml looks like this: <?xml version="1.0"?> <project name="my.project" basedir="." default="build"> <property name="src.dir" value="src"/> <property name="build.dir" value="build/classes"/> <path id="master-classpath"> <fileset dir="res/lib"> <include name="*.jar"/> </fileset> <pathelement path="${build.dir}"/> </path> <target name="build"> <mkdir dir="${build.dir}"/> <javac destdir="${build.dir}" optimize="true"> <src path="${src.dir}"/> <classpath refid="master-classpath"/> </javac> </target> </project> The .java file is the

META-INF/persistence.xml cannot be opened because it does not exist

爷,独闯天下 提交于 2019-12-06 14:44:53
I'm creating a basic spring-maven project that should run as a java application (in process, not over a web server). My application context resides under the resources folder which is in my classpath: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:ox="http://www

Problems with Ant optional tasks SSHExec and SCP. Classpath issue?

。_饼干妹妹 提交于 2019-12-06 13:30:59
问题 I'm in the process of modifying an Ant script (currently in use from within MyEclipse) to work from the command line. I'm doing this so anyone can check out the project and build it without MyEclipse. The problem I'm running into is that MyEclipse includes the dependencies behind the scenes. It does this by looking at the workspace's Ant configuration and compiling the classpath based on the selected libraries in the preferences dialog. Long story short, I need to take those dependencies and

Xtext Project: Add Jar Libraries with the Project Wizard Manager into the Classpath/Referenced Libaries of the clients Project

你离开我真会死。 提交于 2019-12-06 13:09:38
I have been searching quite a lot for this problem, however I can't really find a proper solution or a how-to manage this one. I have written a simple DSL for generating some code via Xtext and Xtend. I optionally use the project wizard in the UI project of Xtext to be able to create an individual project for my grammar and plugin. I am able to create the project with ease, however I still need to add some important dependencies into my class path of the clients project. It seems to be a bit more tricky especially if the path of the .jar is not absolute. This is probably pretty obvious to

Java SPI - ServiceLoader - adding multiple JAR's to APP classpath

末鹿安然 提交于 2019-12-06 13:09:24
问题 I have a problem implementing this logic in my project. Im using ServiceLoader and I don't know or if it's even possible, but I want to dynamically add JARs to some known directory for app, so the app can load them when it starts. The only thing I achieved was that I know how to create extensible ONE JAR (with META-INF/services), so I can add more and more providers and classes (implementations) to this JAR. The JAR is included to classpath like ordinary library, so app knows about it. What I

Can I pre-empt the class path? [duplicate]

烈酒焚心 提交于 2019-12-06 11:50:06
This question already has answers here : Is it possible to replace the version of the JAXB implementation in Java JRE 1.6 SE? (3 answers) Closed 6 years ago . I have a library that is a drop-in extension of a commercial product. That product is several years old and uses Sun's JAXB-2.0 libraries. My library uses JAXB and I'm having a very bizarre error. What might cause "JAXBElement Does not have a no-arg default constructor"? I've discovered that this is caused by a bug in the older library. Can I pre-empt the loaded classes to force my extension to use the "right" version of the class? Edit: