Ant script fails to detect the javafx classes when compiling .
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mjawath
Posted On:   Tuesday, December 3, 2013 09:21 PM

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 <![endif]--> I am using the Ant script to compile my source code. previously it was compiling perfectly . recently i added classes   which uses javafx specific classes .after this ant is not compiling and it fails to find the javafx classes . i am using jdk 7 update 23   as javafx is inculded in the jdk, i cannot figure out     why compilation fails ?.   below   is my ant script.     <project name="client" basedir="." default="compile" >   <description>Client</description>    More>>
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

I am using the Ant script to compile my source code. previously it was compiling perfectly . recently i added classes   which uses javafx specific classes .after this ant is not compiling and it fails to find the javafx classes . i am using jdk 7 update 23   as javafx is inculded in the jdk, i cannot figure out     why compilation fails ?.

 

below   is my ant script.

 

  <project name="client" basedir="." default="compile" >

  <description>Client</description>

 

  <property file="build.properties" />

 

  <path id="classpath">

 

    <fileset dir="${lib.dir}" includes="*.*"/>

  </path>

 

  <!-- Initialization -->

  <target name="init" description="Prepare needed directories.">

    <mkdir dir="${build.dir}" />

    <mkdir dir="${classes.dir}" />

    <mkdir dir="${jar.dir}" />

    <mkdir dir="${dist.dir}" />

  </target>

 

  <!-- Cleanup -->

  <target name="clean" description="Remove all files created by the build/test process.">

    <delete dir="${classes.dir}" />

    <delete dir="${dist.dir}" />

    <delete dir="${build.dir}" />

  </target>

 

  <!-- Compile application -->

  <target name="compile" depends="init" >

    <mkdir dir="${classes.dir}"/>

    <javac source="1.7" target="1.7" srcdir="${src.dir}" destdir="${classes.dir}" debug="yes" includeantruntime="false"   fork="true" memorymaximumsize="1200m" >

      <classpath refid="classpath" />

    </javac>

  </target>

 

  <path id="lib.lib">

     <fileset dir="../lib">

         <include name="**/*"/>

     </fileset>

  </path>

 

  <pathconvert property="mf.classpath" pathsep=" lib/">

      <path refid="lib.lib"/>

      <flattenmapper/>

  </pathconvert>  

 

  <!-- Java Archive -->

  <target name="jar"   depends="compile">

    <mkdir dir="${jar.dir}"/>

    <jar destfile="${jar.dir}/Client.jar" basedir="${classes.dir}">

      <manifest>

        <attribute name="Class-Path" value="lib/${mf.classpath}"/>

        <attribute name="Main-Class" value="${main.class}"/>

 

      </manifest>

    </jar>

  </target>

</project>

 

ragards.

Jawath.

   <<Less
About | Sitemap | Contact