ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ericbee <>
Subject jar that uses an sqlite database - how do I add the database to the jar
Date Tue, 01 Mar 2011 10:05:34 GMT
    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
<!--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"
<attribute name="Main-Class" value="com.ericbee.gui.MainWindow"/>
<attribute name="Class-Path" value="."/>
<fileset dir="C:/eclipse/workspace/PLog/bin"/>
<zipfileset excludes="META-INF/*.SF" src="C:/Sqlite/sqlitejdbc-v056.jar"/>

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" /> 

Any help as to how I add the database to the jar would be really
appreciated, eric

View this message in context:
Sent from the Ant - Dev mailing list archive at

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

View raw message