Important Information on Account Access, Printing and Java Version
- In order to access your computer account outside of lab time, you may use the lab in EN-2036 (in the Computer Science Dept. in the Engineering building), the computers in CP-2004 (in the Chemistry-Physics building) or in the Commons area of the Library. Generally, CS-1019 (in the Computing Services building) will also have a few hours of general access time, outside of regular lab times.
- In order to add money to your printing account from your student ID card, you can use the print accounting machine in the CS-1019 lab, the lab in EN-2036, the lab in CP-2004 or the Commons area of the Library. In order to check to see how much money is on your account, type acinfo in a Shell window.
- In order to print a lab or assignment from Mozilla Firefox, go to the File menu and select the Print... option. If you wish to print to a printer other than the default printer you can click on the Properties... button and change the print command to lpr -Pprintername where printername is the name of the printer to which you wish to print. For the printers in the CS-1019 lab you would use
lpr -Plabljet1 or
lpr -Plabljet2. (See below for a list of other printers.) Click the the OK button and then the Print button in the Print window to send your print job to the printer. If you wish to print from a different web browser rather than from Mozilla Firefox, other web browsers can be found under the Internet menu. (The resulting printout from Firefox sometimes seems to have bolder text than printouts from other web browsers, depending on the underlying html document.)
In order to print a regular text file (e.g., .java files and typescript files) from the Linux Shell prompt (e.g., ace $ ), you may use the a2ps command. This command formats the page with borders and includes some pertinent information about the file and user. The a2ps command has a number of options as follows:
-M letter converts the paper size to letter rather than the default A4.
-1 indicates to put one page of information to one sheet of paper, displayed in portrait mode.
-2 indicates to put two pages of information to one sheet of paper, displayed in landscape mode with a smaller font.
-E indicates to highlight the syntax of java programs, etc.
-Plabljet1 indicates to print to one of the printers in CS-1019; other printer names may be substituted for labljet1.
So a complete command to print a file to the printer called labljet1 in CS-1019 (see below for a list of other printer names) using a2ps, with syntax highlighting on letter paper, could be:
a2ps -M letter -1 -E -Plabljet1 filename (for one page per sheet)
a2ps -M letter -2 -E -Plabljet1 filename (for two pages per sheet)
Note: You must be in the directory which contains the file in order to print this way; otherwise you must specify the pathname for the file. Also if you are printing a typescript file, you may need to make sure that you type all commands/input in the script session perfectly so that there are no backspace characters in the file. If you use the backspace key during a script session, the typescript file may not print and you may have to run the script session again.
You can get more help on the a2ps command with
When printing in a different lab (e.g., EN-2036, Commons, etc.), you may replace the name of the printer in the printing command (after the -P option) with one of the following printer names:
|Room No.||Printer Names
|CP-2004 / CP-2003||cp2004prt1, cp2004prt2 / cp2003prt1
|Commons (in the Library)||icomprt1, icomprt2
- Note: Version 1.6 of Java is to be used in this course. In order to check to see which version you are currently using, give the following command at the shell window prompt: java -version. If you are not currently using version 1.6, then to change versions, first run the command java-config -L to see a list of available versions. Identify the line containing version 1.6 and run the command: java-config -s version_specification where version_specification is the specification listed in square brackets  on the same line, next to the listed 1.6 version.
For example, if java-config -L gives the following list:
The following VMs are available for generation-2:
you would issue the following command to switch to version 1.6:
*) Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
2) Sun JDK 1.6.0.03 [sun-jdk-1.6]
java-config -s sun-jdk-1.6
Check your version of Java again after running the java-config command. If the version has not changed, you may also need to logout and log back in for the change to take effect. If you are using a machine in a different lab (e.g., CP-2004, EN-2036, etc.) you may need to go through this process again if your Java version is incorrect for that lab.