but i want to use it through URL because as like images if we use them directly in jar they are worthless but if we use them through URL than it will work
same is here i am using the database directly and it is establishing connection work perfectly but when i make the jar there is exception
so taht i want to use it through URL
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
It may be that that's what you want, but as I said, it's not going to happen. If you want to ship a DB file as part of your application's jar file, check out HSQLDB which can access a read-only DB in a jar file through JDBC.
Vivek Moyal
Ranch Hand
Joined: Nov 02, 2009
Posts: 57
posted
0
Tell me if its working through first code than why it is not working from second code
ohk than tell me the way so that i can establish the connection to the ODBC services through the code
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Tell me if its working through first code than why it is not working from second code
Logically, there's no reason why something that works through files should also work through the resource loading mechanism. And in this case, there is a very good reason why it would NOT work, namely that DBs are generally read/write resources, and write access is not possible for resources in jar files. That's rather different from images which are most often read, but not written.
ohk than tell me the way so that i can establish the connection to the ODBC services through the code
You need to ship the MDB file along with the jar file.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.