- Java Links
- The latest version of the Java language is Java 8, but any version above Java 5 should be OK for Java Programming Homework.
Unfortunately, the latest version of Eclipse needs at least Java 7.
* My collection of Java FAQs : it is tuned to what my students need!
* Java tutorials : an accessible online reference that should cover most of what we need.
* Java Supplements: downloadable supplements from Liang's book.
* Java 8 API's : it is official and comprehensive, but overwhelming and unwieldy!
- Eclipse Links
- Eclipse is an integrated development environment (IDE) that we will use for developing Java programs:
It has many features and can be overwhelming, so there are many tutorials available on the web.
* Video for your first eclipse project, or a downloadable supplement: both from Liang's book
* Eclipse help and Eclipse FAQs: courtesy of the Eclipse organization
* [30 Eclipse shortcuts] or [93 Eclipse shortcuts] : learn a few tricks!
Note: "control+" in Windows is "command+" in Mac !!
* My collection of Eclipse FAQs : informal collection of tips
- MAKE program
- Besides Java, you will learn a basic software tool to organize and test your programs.
This tool is called make (or variants such as gmake).
By default, this tool runs a program which you create with default name Makefile. I have a simple introduction here:
* Tutorial and Notes on Make Program
In my classes, when you submit a program, I normally require you to include a README file plus a Makefile.
Here is a sample Makefile which you can use and modify:
* sample Makefile
When you save this file, your browser may add the ".txt" extension to this file. Just rename it as "Makefile" without any extension. If you use an editor to edit this file some editors may also save it as "Makefile.txt". Again, rename it to plain "Makefile".
Some operating systems (Windows) may hide file extensions from your view -- I suggest you remove that feature to see all extensions.
Here is another more sophisticated Makefile to use and to modify:
* sample Makefile based on src/bin directory structure
Q: How to get the make program? In the Mac world, you need to download Xcode (you will be asked to register as Apple Developer)and also download the command line tools. In the Windows world, I suggest downloading Cygwin which opens up all kinds of unix tools for your use as well.
Q: How to pass multiple command line arguments (including string arguments) to a program from the terminal? E.g., suppose you have a target called run defined as follows:
java myProg $(args)
Suppose myProg takes 3 command line arguments: the first is an int, the second a string, the third an int.
Then you can call this target at the terminal as follows:
> make run args="111 "\"string\" 222
- Cygwin for Windows World
- If you are in the Windows World, we strongly recommend installing cygwin, a free unix-like operating system.
Through cygwin, you can obtain make and all the standard unix tools. I provide a basic introduction here:
* Cygwin FAQs
* Cygwin Links and Introduction
It is easy to install (or uninstall), and does not require dual boot (so you can have both cygwin and Windows running at the same time).
- MacOS -- getting make program, etc
- Apple has a bad habit of not supporting non-Mac software. So if you have special problems on this score, we will try to help.
To get the "make" program, you used to have to register as a developer with Apple to download their IDE called Xcode. You should do that anyway, as it is free. But if you do not wish to register, since OS X 10.9 (Mavericks) you can get "make" and other useful unix tools without installing all of Xcode.
What you need to install is a section of Xcode called Command Line Tools.
For more information, see http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/.
What you get includes: make, GCC, clang, perl, svn, git, size, strip, strings,
libtool, cpp, what, and many other useful commands that are usually
found in default linux installations.