Java classes must be installed into a database before they can be used. You can install classes from Sybase Central or Interactive SQL.
Start Sybase Central and connect to the sample database.
Open the Java Objects folder and then choose File > New > Java Class.
The Create Java Class wizard appears.
Use the Browse button to locate Invoice.class.
Click Finish to close the wizard.
Start Interactive SQL and connect to the sample database.
In the SQL Statements pane of Interactive SQL, type the following command:
INSTALL JAVA NEW FROM FILE 'path\\Invoice.class';
Here path is the location of your compiled class file. The class is now installed into the sample database.
Press F5 to execute the statement.
At this point, no Java in the database operations have taken place. The class has been installed into the database and is ready for use.
Changes made to the class file from now on are not automatically reflected in the copy of the class in the database. You must update the classes in the database if you want the changes reflected.
For more information on installing classes, and for information on updating an installed class, see Installing Java classes into a database.