Hello everybody
I'm trying to execute an helloworld java program in linux, but it seams i have an heavy classpath problem
Could you help me please ?
To build and execute my program, I am using ANT. You can see below the build.xml file. I guess, something in it is wrong but i can not fnd the error.
I'm trying to execute an helloworld java program in linux, but it seams i have an heavy classpath problem
Could you help me please ?
To build and execute my program, I am using ANT. You can see below the build.xml file. I guess, something in it is wrong but i can not fnd the error.
Code:
<?xml version="1.0"?>
<project default="build" basedir=".">
<property file="build.properties" />
<property name="name" value="LCBBourseLib" />
<property name="src.dir" location="${basedir}/src" />
<property name="build" location="${basedir}" />
<property name="build.classes" location="${build}/classes" />
<target name="checkos">
<condition property="bin.dir" value="${basedir}/lib">
<os family="unix" />
</condition>
</target>
<!-- App build -->
<target name="build" depends="checkos" description="Builds the ${name} application">
<!-- Creating directory -->
<mkdir dir="${build.classes}" />
<!-- Compiling sources -->
<javac srcdir="${src.dir}/"
destdir="${build.classes}"
includeAntRuntime="false"
debug="${build.debug}"
deprecation="true"
verbose="false"
optimize="true"
classpath="${basedir}/lib/java/fxcore2.jar;${basedir}/lib/joda-time-2.3.jar;${basedir}/lib/javax.mail.jar;${basedir}/lib/mysql-connector-java-5.1.23-bin.jar" >
<compilerarg value="-Xlint"/>
</javac>
<!-- Creating JAR-file -->
<jar jarfile="${build}/${name}.jar">
<fileset dir="${build.classes}" />
<manifest>
<attribute name="Main-Class" value="net.lcb.MAJ_Indicielle" />
<attribute name="Class-Path" value="fxcore2.jar joda-time-2.3.jar mysql-connector-java-5.1.23-bin.jar javax.mail.jar" />
</manifest>
</jar>
</target>
<target name="rebuild" depends="clean, build" description="Rebuilds project" />
<!-- Clean -->
<target name="clean" description="Removes all temporary files">
<!-- Deleting files -->
<delete dir="${build}" />
</target>
<target name="run" depends="checkos" description="Rebuilds and run ${name}">
<copy file="${bin.dir}/java/fxcore2.jar" tofile="${build}/fxcore2.jar" overwrite="true" />
<java jar="${build}/${name}.jar" fork="true" failonerror='true' dir="${bin.dir}">
<jvmarg value="-Djava.library.path=${bin.dir}${path.separator}${bin.dir}/java" />
</java>
</target>
</project>
Aucun commentaire:
Enregistrer un commentaire