分类: Java
2006-05-14 18:43:46
Sun Microsystems created the Java language and ships a free JDK for its Solaris operating system and also for Linux and Microsoft Windows platforms.
get the JDK and not the Java Runtime Environment. The JRE enables you to run existing Java programs, but not to write and compile your own.
You need a Java compiler to use JavaServer Pages.
The Sun JDK is not the only Java programming environment you can use. gcj, for example, is a Java compiler released under the GNU general public license. A number of companies sell Java IDEs (integrated development environments), and high-quality open-source IDEs are also available. 比如说IBM等鼎力支持的eclipse
A simple test to see whether you've setup java environment is to write yourself a "hello world" program:
public class hw
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}
Save it with the same name as the public class and the .java extension: hw.java. Compile it with:
javac hw.java
Once you have compiled a Java program, you must still run it. Java programs are not compiled into native machine language, so they cannot be executed directly by the system. Instead, they are run by another program known as the Java interpreter.
java hw
If Hello World appears on the screen, it's OK.
另外关于一些软件、书籍的下载地址,请看左边的“我的链接”!