ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: jar that uses an sqlite database - how do I add the database to the jar
Date Tue, 01 Mar 2011 14:39:10 GMT
This is more a question for the user list.

Would you mind reposting this on the user list ?

Explain also where the database is before you run your script, and 
whether the "resources" target copies something or not.



On 3/1/2011 5:05 AM, ericbee wrote:
> Hi,
>      I'm developing a java application in eclipse. It connects to an sqlite
> database. When running
> in the eclipse ide, all is well. I can connect to the database and  delete,
> update, insert rows.
> I am trying to jar the application. However, I can not add the sqlite
> database correctly to the jar.
> The eclipse supplied jar using the wizard supplies the following code:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <project default="create_run_jar" name="Create Runnable Jar for Project
> PLog">
> <!--this file was created by Eclipse Runnable JAR Export Wizard-->
> <!--ANT 1.7 is required -->
> <target name="create_run_jar">
> <jar destfile="C:/eclipse/workspace/PLog/PLog.jar"
> filesetmanifest="mergewithoutmain">
> <manifest>
> <attribute name="Main-Class" value="com.ericbee.gui.MainWindow"/>
> <attribute name="Class-Path" value="."/>
> </manifest>
> <fileset dir="C:/eclipse/workspace/PLog/bin"/>
> <zipfileset excludes="META-INF/*.SF" src="C:/Sqlite/sqlitejdbc-v056.jar"/>
> </jar>
> </target>
> </project>
> The above runs, the jar for the sqlite jdbc is added, but does not "find"
> the database (C:\eclipse\workspace\PLog \resources\PLog.db ). I have created
> a resources folder that contains the database and I'am trying to add the
> resourcess folder to the jar with  the following code as a first step.
> <target name="resources">
> <copy todir="C:/eclipse/workspace/PLog/bin">
> <fileset dir="resources" />
> </copy>
> </target>
> Any help as to how I add the database to the jar would be really
> appreciated, eric

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message