Java is a very flexible language because a Java program can be run on many different platforms, but still produce the same result. Because of that flexibility, there are several different ways you can work on Java programs. The best way to work on code for this class is to run on your own computer - either a laptop or a desktop computer. (Note that a tablet is probably not sufficient.)
The following table defines the alternatives I am aware of.
| Hardware | Your Computer | Computer Science Department Hardware | harveyv | PODS or LNG-103 | |
|---|---|---|---|---|---|
| Strategy | Develop on your own computer. | Use computers in a Computer Science Lab in the Engineering Building | Remotely connect to Computer Science hardware from your laptop or desktop. | Remotely connect to a Binghamton University Server from your laptop or desktop. | Use Binghamton University PODs Computer in the library or at your dormitory. |
| Advantages | Best performance, most control, no network dependencies, available wherever your computer can be. | No installation, no hardware required. | Smaller installation - X2Go. Full Linux command and GUI support. Compete only with Computer Science students for access. | Smaller installation - MobaXterm. Full Linux command line environment. | No installation, no hardware required. |
| Disadvantages | Need your own computer with enough memory and disk space to support environment. Most setup required. Need to install JDK, GitBash, possibly a text editor, and Eclipse. Need to physically carry your computer to lab. | Only available from Computer Science department labs when other students are not working. Limited number of students allowed access due to COVID-19. | Need your own computer to connect. Requires network, which can make things slow, or sometimes completely unavailable. Performance concern if too many students use graphics intensive applications simultaneously. | Need your own computer or a PODs machine on campus to connect. Requires network, which can make things slow, or sometimes completely unavailable. Impractical for full-screen interaction like Eclipse (required 2nd half) | Must be on campus to use BU hardware directly. Access only when buildings (e.g. library) are open. |
| Connecting | Log on to your computer | Log on to the lab computers using your bmail ID and LDAP password. | See Using X2Go to connect to remote.cs.binghamton.edu. Once connected log on to the remote.cs computers using your LDAP password. | See Using SSH to connect to harveyv.binghamton.edu. Once connected log on to the terminal using your bmail ID and PODS password. | Log on to a PODs machine using your bmail ID and PODS password. |
| Disk Space | Your hard drive. | Computer Science Disk Space mounted as home. | Network U Drive mounted as home. | Network U Drive mounted as U: | |
| Text Editor | Several options: Notepad++, TextPad, Windows Notepad, Mac TextEdit, your favorite text editor. | gedit, xemacs | gedit, xemacs, Atom w/ Remote-FTP installed, or SFTP and your favorite local editor | Atom w/ Remote-FTP installed or SFTP and your favorite local editor. (X works, but is slow.) | Notepad++, Windows Notepad, Mac Textedit |
| JDK | Installing Azul Zulu JDK Web Page | Installed | Installed but not guaranteed to be the correct level. | ||
| GIT | For Windows, see Installing GitBash For Mac, you don't need the full GitBash, but you still need Git. See Download Git on Mac for suggestions. |
Installed. | |||
| Eclipse | Using Eclipse | Installed. See Using Eclipse | Installed but not guaranteed to be the correct level. See Using Eclipse | ||
It is possible to switch between some of the environments if you plan carefully. There are several factors to be aware of when switching between environemnts.
If you follow directions, most of the environments described above should have the latest level of Java JDK, Eclipse, and Git - the three main software components we depend on for this class. However, there are a couple of cases where you may fall into the trap of having down-level software in some of the environments. For instance:
Check the version of all the software using the following command line commands:
| Software | Version Command | Expected Results |
|---|---|---|
| Java Compiler | javac --version | javac 16.0.2 |
| Java Interpretter | java --version | openjdk 16.0.2 2021-07-20
OpenJDK Runtime Environment Zulu16.32+15-CA (build 16.0.2+7) OpenJDK 64-Bit Server VM Zulu16.32+15-CA (build 16.0.2+7, mixed mode, sharing) |
| git | git --version | git version 2.32.0 |
| Eclipse | No command line... version displayed on splash screen | 2021-06 |
If the versions are not completely correct, you may still be able to work, but be ready to solve incompatability problems.
When you switch from environment to environment, and the different environments use different disk space, you need to make sure your code is at the correct version and up to date. Luckily, we are using Git, and that allows you to have multiple clones of the code you are working on for a lab or homework assignment on different hardware. Make sure that if you make changes on one machine that you want to keep, that you commit and push the changes from that machine. Then, if you go to a different clone on a different machine, make sure you do a git pull to get all those changes replicated on the different clone.
One alternative is to use the Network U drive to store a clone of your code. You can keep your clones on the network U drive, which can be mounted on your own computer, or is mounted on the PODs machines. (The network U drive can also be mounted on the computer science machines, but that doesn't happen automatically, and needs some setup.) The advantage of using the network U drive is that you can be working on a partial fix, save your files, move to a different environment, and pick up from where you left off without having to do git pushes and pulls. However, the network U drive is not as fast as a local disk drive, so may slow you down some.