Choosing a Development Environment Core Java

  1. Make sure the JDK is installed and the jdk/bin directory is on the execution path.
  2. Make a directory CoreJavaBook.
  3. Download the file to that directory.
  4. Open a shell window.
  5. Change to the CoreJavaBook directory.
  6. Execute the command
    jar xvf

Navigating the Java Directories

In your explorations of Java, you will occasionally want to peek inside the Java sourcefiles. And, of course, you will need to work extensively with the library documentation.

Java Directory Tree

Java Directory Tree

The two most useful subdirectories for learning Java are docs and src. The docs directory contains the Java library documentation in HTML format. You can view it with any web browser, such as Netscape.

The src directory contains the source code for the public part of the Java libraries. As you become more comfortable with Java, you may find your self in situations for which thisbook and the on-line information do not provide what you need to know. At this point,the source code for Java is a good place to begin digging. It is reassuring to know that you can always dig into the source to find out what a library function really does. For example, if you are curious about the inner workings of the System class, you can look inside src /java /lang /System .java.

Choosing a Development Environment

If your programming experience comes from using Microsoft Visual Studio, you are accustomed to a development environment with a built-in text editor and menus tocompile and launch a program along with an integrated debugger. The basic JDK containsnothing even remotely similar. You do everything by typing in commands in a shellwindow. This sounds cumbersome, but it is nevertheless an essential skill. When youfirst install Java, you will want to troubleshoot your installation before you install adevelopment environment. Moreover, by executing the basic steps yourself, you gain abetter understanding of what the development environment does behind your back.

However, after you have mastered the basic steps of compiling and running Java programs,you will want to use a professional development environment. In the last decade, these environments have become so powerful and convenient that it simply doesn’t make much sense to labor on with out them. Two excellent choices are the freely available Eclipse and Net Beans programs. In this section, we show you how to get started with Eclipse since it is still a bit slicker than Net Beans, although Net Beans is catching up fast.

In the past, we recommended the use of a text editor such as Emacs, JEdit, or Text Padfor simple programs. We no longer make this recommendation because the integrated devlopment environments are now so fast and convenient.

In sum, we think that you should know how to use the basic JDK tools, and then you should become comfortable with an integrated development environment.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Core Java Topics