Using Access Converter
Java Edition




Access Converter is an Add-in to Microsoft Access. It converts Access Forms, Code Modules, and Classes completely to Java. Access Reports can also be converted to Crystal Reports. The Java code can be run on any Java platform without any need for the MS Jet engine. It can be deployed on a Unix platform and any database for which you have a JDBC driver installed.

To start Access Converter, click on the Tools menu, then Add-Ins->Access Converter menu item. The Access Converter Dialog will open which will allow you to start the conversion process.

Access Converter Dialog

Figure 3: Access Converter Dialog

Convert to Java
The Convert to Java button performs the actual conversion from Access to Java. Access Converter will first convert all of the Access Forms and modules to a Visual Basic project. Next the reports will be converted. Then the VB project will be converted to Java. During the compilation, a report window displays the progress and the final status of the conversion process including the number of files successfully compiled. During the conversion, an Access window will open up for each module it is converting. Do not click a mouse button while these windows are opening and closing.

After the conversion is completed, the Java code will be located in the same directory as the database. The Java code can be compiled using Sun's Java 2 SDK or any Java 2 compliant compiler or development environment such as JBuilder, Visual Cafe, NetBeans, etc. JBuilder is preferred because it has a visual screen builder that can parse the Java source code. See the documentation for those tools to learn how to compile and run the Java code.

Using Java 2 SDK from Sun you would compile the Java code by opening a command prompt window and entering the following command (assumes your Access database was called MyDB.mdb):


The javac will compile all of the .java files used in the project and create a .class file for each .java file. Note: there is a .java file for every Form and Module plus one extra for the application such as

If you converted the reports you need to make sure you have added Crystal Report Java library to your classpath. On NT, you set it from the System control panel on the environment tab. From Win9x you need to set it in the autoexec.bat file. You will need to add a ; followed by the complete path of the ReportViewerBean.jar file to the end of the string. Usually the path name is:

C:\Program Files\Seagate Software\Viewers\JavaViewerBean\JavaViewerBean.jar

For example, if you installed Access Converter in the default directory you might see a line like:

set CLASSPATH=.;c:\Program Files\Access Converter\ac.jar

After adding the ReportViewerBean.jar file to the end you might have the following:

set CLASSPATH=.;c:\Program Files\Access Converter\ac.jar;C:\Program Files\Seagate Software\Viewers\JavaViewerBean\JavaViewerBean.jar

On Win95 you need to reboot if you modified the autoexec.bat file and on NT you need to close the command prompt and start a new one if you modified the variable in the control panel. If you just set the variable in the DOS command prompt window with the dos command above then you can just use that window to compile your code.

Access application of significant size may have used features that are not supported. These lines are usually commented out in the Java code. The comment starts with //unsup. These lines of code will need to be converted by hand.

The on-line help system (this file) is a useful tool which provides instant access to information designed to assist you in the use of Access Converter. It also contains all of the supported Access and VBA features.

Options Tab

Several options can be modified through this tab. See the Options Tab help. You can also open the AccessConverter.ini file located in the windows directory in a text editor to modify the conversion options.



About Tab

The About Tab provides version information and the serial number.