I found the way to do it.
I ended up using JACOB (from here <= upd 2021-10-25: now here).
- Downloaded and installed Visual FoxPro OLE DB driver from http://msdn.microsoft.com/en-US/vfoxpro/bb190232 (upd 2021-10-25: links there do not work anymore). the direct link is: Microsoft OLE DB Provider for Visual FoxPro 9.0 SP2 (upd 2021-10-25: does not work anymore)
- Downloaded JACOB version 1.17 binary and source code.
- Added
jacob.jar
as a Java Build Path library - Copied
jacob-1.17-x86.dll
to the project directory (same place as eclipse's .project file) - Copied
jacob-1.17_src\jacob-1.17\samples\com\jacob\samples\ado
contents to my src directory and: - Removed the
ms
directory - renamed
test.java
toMain.java
- Changed the connection string to:
String connectStr = "Provider=vfpoledb;Data Source=C:\\path\\to\\Data\\;Collating Sequence=general;";
- Changed the queryStr to match one of the dbf's name
Hope this helps someone else.