Hi
I just completed my database hospital application and now i'm ready to export it into a JAR file. I palced the DB in the classes subfolder and played with ClassLoader but got nothing!
I used the following code

String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String url="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=f:hospitalDb.mdb;}";

any idea how to make a JAR file for a database application?

i would be grateful

P.S:i'm using MS Access

Edited 4 Years Ago by ringo_tech

may be i wasn't clear. i want to convert the jar into an .exe application so i can install any where.
so what i want exactly is to access my DB from any path<and how could i read that path?

Edited 4 Years Ago by ringo_tech

convert the jar into an .exe application so i can install any where

Do .exe files run on linux and macs?

Edited 4 Years Ago by NormR1

well, yes, but turning it into an .exe will prevent you from running it 'anywhere', not make it possible to do so. a .jar is a platform independent executable, so just keep that.
also: why putting the db in the .jar?

Put the DB file in a standard location on all PCs that use your code.
The user.dir folder for example.

i wanted to access it from any path accorrding to where the user installs the application but i give up.
i will put the DB is a standard location as you said

Edited 4 Years Ago by ringo_tech

This question has already been answered. Start a new discussion instead.