Using SQLJ at the Engineering Network Services

  1. Make sure your Oracle environment is set correctly, i.e. you can connect to Oracle database via SQL*Plus.

  2. Setup your environment: Run user-setup and select
  3. Copy the file connect.properties: Copy the connection file /opt/oracle8/product/8.1.5/sqlj/demo/connect.properties into the directory where your SQLJ program is, and change the userid and password to yours.
        # Users should uncomment one of the following URLs or add their own. 
        #sqlj.url=jdbc:oracle:thin:@localhost:1521:orcl
        #sqlj.url=jdbc:oracle:oci8:@
        #sqlj.url=jdbc:oracle:oci7:@
           
        sqlj.url=jdbc:oracle:oci8:@
          
        # User name and password here 
        sqlj.user=ops$wenchen
        sqlj.password=password
        
  4. Create a SQLJ program: mysqlj.sqlj

  5. Compile and run the program:
      >sqlj mysqlj.sqlj
      >java mysqlj