Using Java Program for Implementation HW 6

Steps for loading the given program into Eclipse

  1. Download Eclipse Java environment from here. Make sure you have Java installed on your machine. If not, install it first. You can download Java from here.
  2. Run Eclipse. It might ask you for a workspace folder where it will store your program code etc. Specify a folder and proceed. Remember to use the same folder whenever you use Eclipse for this homework.
  3. Once Eclipse loads, create a new project. You will see a 'New Project' dialog box. Choose 'Java Project' under 'Java'. Click 'Next'. Assign a project name on the next screen, and click 'Finish'. You should now see your project in the left panel called Package Explorer.
  4. Expand your project name in Package Explorer. Drag and drop 'Loader.java' file into the 'src' folder. The file will show up under 'default package'.
  5. Drag and drop 'ojdbc14.jar' file on the project. It will show up directly under the project (not inside src folder).
  6. Right click your project and choose 'Properties'. On the properties screen, select 'Java Build Path'. Click on 'Libraries' tab. Click 'Add JARs...' button. Expand your project in the 'JAR Selection' dialog box and choose 'ojdbc14.jar'. (If you have already selected that file, it won't show up in the dialog again). Once you close that dialog, you should see 'ojdbc14.jar' in the list of 'JARs and class folder on the build path'. Press 'OK' to close properties box.
  7. Now you are ready to run your program. A round green 'play' button on the toolbar will let you run your program. A button with 'bug' icon next to the 'Run' button can be used for debugging programs.

Steps before running the program

  1. Lines 6-7 in the program specify your user name and password. The values assigned to the variables are currently dummy values. You need to change that to your actual Oracle user name and password.
  2. Line 12 in the program specifies the number of rows to be inserted into the database. It is currently set to 1000 for testing. Remember, you need to provide experiment results on a million rows. Obviously you will need to change that value.
  3. Line 15 in the program is for setting loading variation. The default value is set to 1, which means sorted data. For unsorted data, you should change this value to 2, and then run the program.

How to?