Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Java In the Undergraduate Lab Java In the Undergraduate Lab Questions about using Java in the Ugrad Lab What machines should I be using in the undergrad lab? If you are running a Java applet (with the appletviewer or netscape), then do NOT use any of the machines with the NCD monitors (the letters NCD are in the lower left corner). These machines have X set up incorrectly and will cause a crash if you try to run an applet. The instructions below should set things up so that you can use any of the inon-NCD machines in 1B54 and adjoining rooms. Try to avoid using nag. If you must do a remote login, use the slogin commmand to one of the machines listed below. HP-UX SOLARIS LINUX nagtje nago m or em tigger squish n or en chandom perciatelli o or oh taussky fedelini p or pee nagina american q or queue nagik fontina r or are nagita mimolette s or ess nagschen colby t or tee nagy ricotta u or you napier mozzarella v or vee swiss w or doubleu cheddar x or ecks edam y or why gouda z or zee muenster provolone brie bird-1 to bird-17 csel-ultra-1 to csel-ultra-20 What do I need to change in my .cshrc file to use Java in the ugrad lab? In your set path command, you should add these directories: /tools/cs/top/java/bin /tools/edu/java/bin /tools/cs/netscape-4.07/bin The first directory is the Java Development Kit for the HP machines and PC Linux boxes. The second directory is the JDK for the Solaris machines. The third directory has the latest Netscape 4.07 (with support for the AWT Version 1.1.5). Put the two Java directories before the Netscape directory in your path, and put the Netscape directory before the X11 directory. For example, my entire set path now looks like this (in .cshrc): set path= ( /usr/local/bin /usr/bin /usr/ucb /bin /tools/cs/top/java/bin /tools/edu/java/bin /tools/cs/netscape-4.07/bin \ /usr/local/gnu/bin ~/bin \ /tools/edu/BinProlog /tools/cs/scheme/bin \ /usr/local/X11/bin . ) Once you've made this change, you can run these commands from the command line: javac foo.java     (Compiles foo.java, resulting in foo.class.) java foo     (Runs the Java applications foo.class.) appletviewer foo.html     (Runs any applets in foo.html.) netscape     (Runs Netscape 4.07 with Java AWT 1.1 support.)     NOTE: If you have a CLASSPATH set, then that     must be unset before running netscape, with     the command: unsetenv CLASSPATH. Do I need anything special to run the appletviewer command? Just set your path as shown in the previous answer. Then you can run a command such as appletviewer foo.html The appletviewer will run any applets that are embedded in the foo.html file. Where's the documentation for the Java Class Libraries? I use the API Specification link in http://java.sun.com/products/jdk/1.2/docs/index.html. For example, here you will find the hashtable (java.util.Hashtable) and the Graphics class (java.awt.Graphics). You might also want to browse all the Java code I've written in the directories: http://www.cs.colorado.edu/~main/applets/ http://www.cs.colorado.edu/~main/applications/ http://www.cs.colorado.edu/~main/docs/Index.html Can I use emacs and the Java Development Environment in the ugrad lab? Not yet. Our emacs installation is too old. I'll send you email if that situation improves. For now, go ahead and use your favorite editor to edit your java programs; then compile and run the programs from the unix command line. On the other hand, if you're using emacs at home (on a Windows or Linux machine), then you might want to install the Java Development Environment.   Michael Main (main@colorado.edu)