classpath

How to parse and interpret ant's build.xml

风格不统一 提交于 2019-12-21 17:58:09
问题 Is there an Ant API for reading and ant build.xml and retrieving elements from it? Specifically I want to be able to retrieve the values in a path element and be able to walk all of the elements in the path. My purpose is to retrieve a given path and ensure that it is referenced correctly in a manifest, so that the build and the manifest match when the product goes out to production. EDIT: Regarding the responses (and thank you for them) to use an XML API, the problem is that the build file

Adding referenced jars to android build.xml

妖精的绣舞 提交于 2019-12-21 12:49:18
问题 I have an android eclipse project and have generated the corresponding build.xml ant file by doing: android update test-project -p . -m ..\main_project This compiles fine. However, in eclipse I have then added three referenced external jars (easymock, objenesis and cglib). In eclipse everything builds fine but then when I run the above command again it doesn't add these jars to the classpath. So my question is how to tell the build.xml to include these jars? I have done some research first

Running a java program at the command line, what am I doing wrong?

你离开我真会死。 提交于 2019-12-21 11:30:19
问题 Note I'm running windows, the path just looks like it's linus because I typed it manually and thats how I think of paths. I'm trying to run a java class That I have built to diagnose my connection to a databse, it references the oracle jdbc adaptor. When I just run it without a class path: %> java DBDiagnostics <connectionString> I get an exception when it reaches the following line of code: Class.forName("oracle.jdbc.pool.OracleDataSource").newInstance(); with the following exception: java

invalid file (bad magic number): Exec format error

主宰稳场 提交于 2019-12-21 10:49:39
问题 I am getting below error when i am trying to set classpath. I am using CentyOS. I am trying to complie a java file in command prompt for that i am setting the classpath. On executing the same java program in Intellij , it runs fine. On executing the same from command prompt it shows error for missing jars so for that i added the classpath to that lib on which the error is seen. [root@a admin]# export CLASSPATH=/home/admin/TagAPI/lib/org.json-20120521.jar ;/home/admin/TagAPI/lib/testng-6.8.21

invalid file (bad magic number): Exec format error

自作多情 提交于 2019-12-21 10:48:35
问题 I am getting below error when i am trying to set classpath. I am using CentyOS. I am trying to complie a java file in command prompt for that i am setting the classpath. On executing the same java program in Intellij , it runs fine. On executing the same from command prompt it shows error for missing jars so for that i added the classpath to that lib on which the error is seen. [root@a admin]# export CLASSPATH=/home/admin/TagAPI/lib/org.json-20120521.jar ;/home/admin/TagAPI/lib/testng-6.8.21

Autowiring classes from external jar with Spring

﹥>﹥吖頭↗ 提交于 2019-12-21 09:27:12
问题 I'm trying to build a standalone application (not running inside an application server) with Spring and I'm facing the following problem : My standalone application (spring enabled) is depending on another project (bundled as a jar) which contains a lot of services in com.application.service (Annotated with @Service ). There is no spring related configuration in the external project and the standalone application context is very simple, it only contains : <context:component-scan base-package=

How to run clojure from matlab

荒凉一梦 提交于 2019-12-21 05:40:40
问题 How can I run a clojure script from matlab? I tried following: run matlab with jdk 1.7 and then call java MATLAB_JAVA=/usr/lib/jvm/java-7-oracle/jre matlab in the matlab, set classpath and use clojure compiler javaaddpath([pwd '/lib/clojure-1.5.1.jar']) import clojure.lang.RT Here I got error: Error using import Import argument 'clojure.lang.RT' cannot be found or cannot be imported. When I writing java class that runs clojure, everything working from console, but whould not run from matlab.

How to pick CXF over Metro on Glassfish

佐手、 提交于 2019-12-21 04:42:35
问题 I'm having the following problem (reported there by someone else) when running my enterprise application under Glassfish. Under Jetty it works fine. javax/xml/ws/spi/Provider mentions creating a META-INF/services/javax.xml.ws.spi.Provider resource, but this is already supplied with CXF and creating an additional resource file does not solve this problem under Glassfish. Does anyone know how to ensure that CXF is picked up under GlassFish? (I'm using a Maven Multi-modules project with CXF

Setting the a Property to what maven.compile.classpath Contains WITHOUT Ant

我们两清 提交于 2019-12-21 03:58:11
问题 I'd like to set a property in my pom to a classpath containing all the project's dependencies. The ant plugin does something like this, so I know it's definitely possible. I basically want to use ${maven.compile.classpath} wherever I like in my pom and have it 'just work'. I don't mind using plugins or anything else to achieve this. Many thanks, Nick 回答1: I don't think that there's a way of doing this without writing your own maven plugin. That said, you can get at the classpath using

javah Help - “No classes were specified on the command line”

僤鯓⒐⒋嵵緔 提交于 2019-12-21 03:12:17
问题 I'm running Ubuntu Linux with Eclipse installed, and I'm trying to work with JNI to do so I need to use javah, but it doesn't seem to be working I have just recently installed Ubuntu and am unfamiliar with Linux/bash shells for my eclipse project called myJNI, I have class DoJNI containing the native method. in Terminal: javah -classpath .;\home\thomas\Documents\LinuxProgramming\EclipseWorkspace\myJNI\bin\org\me\jni DoJNI errors I get are: No classes were specified on the command line 回答1: