Search code examples
antjava-mecdc

how to build java me CDC app with ant? can i build using javaSE


Hi im trying to build our java me app that works on CDC base, I have seen antenna, but cant get it to work, it seems to be geared towards CLDC, but i cant make it work, and am wondering if i need to do anything specific to make it compile a CDC app? or if there is another way to build CDC apps with ant?


Solution

  • You don't really need antenna feature, cdc app is like to JavaSe app.You could use plain ant for building cdc apps. JavaSE javac + cdc libraries is enought. F.e.

       <target name="app" >
            <mkdir dir="${dir.build.compiled}" />
            <javac  classpathref="app.cp"
                    fork="true" debug="on"
                    srcdir="<sources>"
                    source="1.3"
                    target="1.3"
                    destdir="${dir.compiled}"/>
            <jar destfile="${app.jar}" basedir="${dir.compiled}" />
        </target>