|
|
|
|
|
|
|
|
|
Using Access Converter |
|
|
|
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 DialogFigure 3: Access Converter Dialog Convert to Java 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 MyDB.java. 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:
For example, if you installed Access Converter in the default directory you might see a line like:
After adding the ReportViewerBean.jar file to the end you might have the following:
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
Options TabSeveral 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 TabThe About Tab provides version information and the serial number. |
|
|
|
|
|
|