1

I'm using Windows 7 (64-bit). I installed 64-bit versions of Eclipse and JRE, but when I tried to read from Access I got problems.

The only way to use ODBC seems to be by using a 32-bit variant, but it doesn't match. It looks like Java needs to run in 32-bit mode to be able to use it.

Can I just change Java (select in runtime properties of the project ?), or should I re-install Eclipse to a 32-bit version as well?

I think I only installed a JRE (?)

I tried with "UCanAccess" JDBC driver but I think I probably also need 32-bit runtime environment.

I run my program inside Eclipse, it's just for reading data and create different xml's. Are there alternative drivers ? for Access or Excel (or any free other database) ?

2 Answers 2

1

To put it simply: 64-bit Windows supports both 32-bit and 64-bit components -- so you can choose either a 32-bit stack, or a 64-bit stack for your application -- but everything that loads into memory together (Eclipse, JRE, JDBC Driver for ODBC Data Sources, ODBC driver) must be the same bitness.

I'm betting that your ODBC Driver for Access, and/or Access itself, is 32-bit, even though your Windows environment is 64-bit.

Based on that, I think you'll need to add the 32-bit Eclipse and/or Java to your environment (whether or not you keep the 64-bit components), or install a 64-bit ODBC driver for Access and/or 64-bit Access.

This article on my employer's site, about using 32-bit ODBC on 64-bit Windows, may help you out...

Also note -- the JDBC-to-ODBC Bridge built into the JVM is NOT recommended for production use, and is not included in Java 8 nor any later version of the JVM. You may wish to consider the ODBC-to-JDBC Bridge from my employer as a substitute.

0

I tried with "UCanAccess" JDBC driver but I think I probably also need 32 bit runtime environment.

No. UCanAccess is a pure-Java implementation that does not use Access ODBC so it will run under whatever JVM you are using: 64-bit or 32-bit, Windows/Linux/Mac, Java 7 or Java 8. (Earlier versions of Java may be supported too; check the UCanAccess site for details.)

See the following Stack Overflow article for more information on how to set it up:

Manipulating an Access database from Java without ODBC

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .