ME 135 - Spring 2005 - Lab 1
Lab 1 - Air Hockey 1 (Updated at 1500 on 02-03-2005)

NOTES:
For the computers in 2170 Etcheverry, you can log in with:
Username: me230
Password: realtime
(Be sure to log in to "this computer", not any other domain.)

GET A CARDKEY AS SOON AS POSSIBLE FROM BONNIE KORPI (5102 Etcheverry) because it takes for darn ever for it to be activated.

JOIN THE CLASS MAILING LIST NOW. IF YOU DON'T, YOU'LL SPEND MANY FRUSTRATING HOURS TRYING TO FIGURE OUT SOMETHING THAT SOMEONE ELSE ALREADY ASKED ABOUT.

INSTRUCTIONS:


Download
javasamples.zip from the course web page (under "Laboratory Assignments") This zip file contains a directory called AirHockey1, which contains all the code for this lab. Extract the zip file.

Start Netbeans 3.6 from the Start menu >> Programs >> Netbeans IDE

If necessary, create a new project: Projects >> Project Manager >> New

Mount the following directory:
AirHockey1 (from javasamples.zip)
(Don't try to mount the java files within that directory -- just mount the directory. Also, don't mount the parent directory javasamples. It has to be the AirHockey1 directory or else it won't compile.)

If using your home computer, you may have to do the following:
Mount the following JAR files (right-click on Filesystems, choose Mount >> Archive Files)
(all from c:\j2sdk1.4.2_04\jre\lib\ext\)
j3daudio.jar
j3dcore.jar
j3dutils.jar
vecmath.jar

If using your home computer, you may have to do the following:
Set working directory (Tools >> Options >> Debugging and Executing >> Execution Types >> External Execution >> Expert >> Working Directory) to:
c:\ProgramFiles\j2sdk1.4.2_04\bin
(or whichever directory contains the files: J3Dutils.dll, J3daudio.dll, J3d.dll)

Add these files to the project (right click on files, choose "Add to Project"):
AirHockey1.java
puckSim.java

Set the project main class to be AirHockey1.java (right click on file, choose "Set as project main class").

Execute project (Project >> Execute Project). This will save and rebuild/recompile all the files in your project (i.e., the ones for which you did "Add to project") and will run the
main(...) method of your main class file (i.e., the file for which you did "Set as project main class").

When you want a program to stop running, right-click on the process name (in the Execution window) and choose "Terminate Process". This seems to be more stable than closing the window itself.
HOWEVER: If you close the airhockey window the usual way (by clicking the X in the upper right corner), it will give you the puck statistics in the Console (lower left cornet of the Netbeans window), so you may want to do it this way when answering some questions on the lab.
Hosted by www.Geocities.ws

1