Setting up the Java Environment in UNIX.
UNIX:
javac HelloWorldApp.java
DOS shell (Windows 95/NT):
javac HelloWorldApp.java
UNIX:
java HelloWorldApp
DOS shell (Windows 95/NT):
java HelloWorldApp
Note: The argument to the Java interpreter is the
name of the class, not the name of a file.
Printing directly from
UNIX:
Into your .cshrc files, please place the following commands:
alias spps 'lpr -P$PRINTER -s' alias printer 'echo $PRINTER' alias printer1 'setenv PRINTER hpps;echo hpps' alias printer2 'setenv PRINTER lyon_gray; echo lyon_gray' alias printer3 'setenv PRINTER dupascii; echo dupascii' alias printer4 'setenv PRINTER dupps; echo dupps' alias printers echo printers I know: hpps, lyon_gray, dupascii dupps
alias cancel 'lprm -P$PRINTER job '
alias q 'lpq -P$PRINTER'
Into your bin directory place and executible shell script into a file called sp:
#! /bin/csh -f # # by doug lyon 10/6/93 # # Usage: sp <files> if ($#argv == 0) then # arguments? echo "Usage: $0 files" exit 1 endif foreach file ($argv[*]) # expand argument word list echo spooling $file to $PRINTER xa2ps $file | lpr -P$PRINTER -s end
Chmod to +x on sp, then rehash....
This should enable you to print ascii files to any printer... For printing postscript files, use the command: spps 'lpr -P$PRINTER -s '
To print sun snapshots from the sun
, use openwindows to save a screen shot as sun raster or any format file. Then use:
anytopnm - to convert a Sun raster file into a portable pixmap format...then use:
pnmtops - to convert a portable pixmap into color Encapsulated file to PostScript....then use:
spps (see above) to print the postscript to the printer of your choice.
For example, you may set a pipe alias in your .cshrc file so that a single command will print snap-shot...like this:
put the following into sp_shot:
#! /bin/csh -f
#
# by doug lyon 4/8/97
#
# Usage: sp <files>
if ($#argv == 0) then # arguments?
echo "Usage: $0 raster_files_in_any_format"
exit 1
endif
foreach file ($argv[*]) # expand argument word list
echo spooling $file to $PRINTER
anytopnm $file | pnmtops >$file.ps
lpr -P$PRINTER -s $file.ps
echo " please remember to delete $file.ps later"
end
Then type:
chmod +x sp_shot rehash
A sample sp_shot is located in
/home/bunny/lyon/bin/sp_shot
What is Java?
· Java is Strongly type.
About Java
Understanding Java
Java Objects
Java Basic
1. Applets are: a. little apples b. little applications c. often run from a web page d. stand-alone applications