[brailleblaster] Making the JAR run on any JVM Java5 and above

  • From: "Michael Whapples" <mwhapples@xxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Tue, 13 Mar 2012 14:27:35 -0000

Hello,
I have attached a modified build.xml which should mean that the BrailleBlaster 
jar will run on any JVM which is Java5 or higher regardless of the JDK used to 
build it and not requiring the person building to specify any options. OK, 
saying regardless of JDK is probably wrong, I mean regardless of JDK so long as 
the JDK is Java5 or higher.

This will simplify the system requirements, the user will only need Java5 or 
higher and builders will only need JDK5 or higher.

Michael Whapples
<?xml version="1.0"?>

<project name="BrailleBlaster" default="dist"
basedir=".">

<property name="srcdir" location="src/main"/>
<property name="builddir" location="classes"/>
<property name="classpath" location="dist/lib"/>
<property name="distdir" location ="dist"/>

<target name="init">
<mkdir dir="${builddir}"/>
</target>

<target name="compile" depends="init">
<javac srcdir="${srcdir}" destdir="${builddir}"
includeantruntime="false" target="1.5">
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="${classpath}/swt.jar"/>
<pathelement location="${classpath}/commons-exec-1.1.jar"/>
<pathelement location="${classpath}/jliblouisutdml.jar"/>
<pathelement location="${classpath}/commons-cli-1.2.jar"/>
<pathelement location="${classpath}/xom-1.2.6.jar"/>
</classpath>
</javac>
</target>

<target name="dist" depends="compile">
<jar jarfile="${distdir}/brailleblaster.jar" 
basedir="${builddir}">
<manifest>
<attribute name="Main-Class" value="org.brailleblaster.Main"/>
<attribute name="Class-Path" value="lib/commons-exec-1.1.jar 
lib/jliblouisutdml.jar
lib/swt.jar
lib/xom-1.2.6.jar
lib/commons-cli-1.2.jar"/>
</manifest>
</jar>
</target>

</project>

Other related posts:

  • » [brailleblaster] Making the JAR run on any JVM Java5 and above - Michael Whapples