Javin007
asked on
Java load msjet40.dll library?
I'm sure this is a simple thing to do, but for the life of me I can't figure it out.
All I'm trying to do is load the msjet40.dll library into Java.
I do not have access to JNA (it's a closed network).
I only need to use a small handful of functions/methods/objects from the library.
Can someone give me an actual code example? With a start, I could run from there.
All I'm trying to do is load the msjet40.dll library into Java.
I do not have access to JNA (it's a closed network).
I only need to use a small handful of functions/methods/objects from the library.
Can someone give me an actual code example? With a start, I could run from there.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As i'm afraid you'll discover, Java isn't really the tool for the job. Why, e.g. do you not use C#?
ASKER
Basically, due to the customer. Had I had it my way, we would be using .NET and SQLite at the very least, but they insist on Java and Access 2000.
For some development environments, we use Java extensively with Access db's and it works fine. However, we don't change the TableDef links -- I see a lot of questions from you around that. Microsoft never really published easy ways to do that with Access, so it can be a problem. This is a problem whether you use the C# and .Net world, or use Java as your programming environment. Calling COM objects in C# and .Net has more support in Visual Studio than Eclipse offers to Java programmers, but they're all just programs running in an operating system -- no need to switch the entire architecture.
However, there are people who write programs which dive into the internals of the Jet engine -- which is what you say you want to do. It is a lot of work -- not because of Java but because MS doesn't make it an easy thing to do.
You realize that if you require the dao library in your Java code, you're back to requiring that Access be installed on the user's system in order to run your program?
However, there are people who write programs which dive into the internals of the Jet engine -- which is what you say you want to do. It is a lot of work -- not because of Java but because MS doesn't make it an easy thing to do.
You realize that if you require the dao library in your Java code, you're back to requiring that Access be installed on the user's system in order to run your program?
ASKER
Indeed, I ultimately found a way around it all together. I push small chunks of data from the "external" databases to the "core" database, run my report, then nuke the changes. A bit sloppy, but in the end, turns out it actually runs FAR faster than running the queries across the links anyway, and now I don't need the links at all (or the DAO library). Still, I gave you the points since, according to my question, yours would have been the "correct" answer.
ASKER
I think I've drilled down that I actually need to use DAO360.dll rather than msjet40, but that's just details.
Unfortunately, this is on a closed network, and they do not have JNA installed. Thus, everything will have to be done manually. (I assume I'm still attempting to use JNI here?)
I'm fairly new to Java, and kind of muddling my way through this.
I currently have:
Open in new window
Annnnnd, that's about as far as I've managed to get without throwing an error. I assume there's a good number of requisite "native" objects and methods I'd need to create? Still stumbling through how external DLLs and Java play together...