Setting up your own computer

From CompSciWiki
Jump to: navigation, search

COMP 1010 Home > Getting Started


Introduction

To start programming in Java, you will first need to set up your computer. You will need to install the Java Development Kit (JDK) first and then install a development environment. It is important that these two things are installed in this order. The development environment will be where you will write, debug, and run your Java code. Here's a guide on Installing JDK and DrJava.

Using DrJava

DrJava is available for Windows PCs as well as for Mac (or Linux).

In COMP 1010: Introduction to Computer Science, the main development environment we will be using is DrJava. DrJava is a fully-featured Java editor that is simple and very easy to use.

  • For more information on DrJava, as well as download links, tutorials, and technical support, visit their website at http://www.drjava.org.

DrJava FAQs

DrJava on Mac OSX Lion

Q: I just downloaded DrJava, where did it go? I can't find it.

  • Depending on which operating system your computer is running, the file you have to download differs. There are three different files that are available: .exe, .tar.gz, and .jar for Windows, Mac, and Linux, respectively. Once downloaded, the file will be located wherever you specified your browser to download files.

Q: Does DrJava work on my operating system?

  • One of the main reasons that we use DrJava for this course, rather than Textpad, is its compatibility with a variety of operating systems. DrJava is compatible with Windows, Mac OS, and Linux systems.

Q: Can DrJava compile and run my programs?

  • Yes, as long as you have installed the Java JDK (as above) DrJava can compile and run your programs, so you do not need to use a command line. To compile and run your programs, you can use the buttons on the right-hand side of the top toolbar.

Q: What is the file extension for my java programs?

  • Your Java programs are saved into Class_Name.java files. In addition, when compiling and running java programs there will be other file extensions generated. Those extensions are created as a by-product of running your code. When submitting your files submit only .java files.

Some guides to using DrJava:


Alternate Development Environment: TextPad

DrJava is one example of an Integrated Development Environment (IDE). There are others. (See http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments.) An IDE provides a set of tools to make programming easier. For developing simple Java programs, an IDE needs at least a text editor and tools to control compiling and running code. A simple alternative for Windows users is TextPad, which provides these basic functions, and very few others. TextPad has the advantage that it is available on computers in the university's computer labs. However, even though you can download it to try it out, it is not free. If you are going to use it consistently, you should buy it. If you are interested, see Installing and Using TextPad.

Previous Page: Claiming IDs Next Page: Getting Started