Chinaunix首页 | 论坛 | 博客
  • 博客访问: 572976
  • 博文数量: 155
  • 博客积分: 7055
  • 博客等级: 少将
  • 技术积分: 1700
  • 用 户 组: 普通用户
  • 注册时间: 2004-11-22 11:40
文章分类

全部博文(155)

文章存档

2016年(1)

2011年(2)

2010年(1)

2009年(2)

2008年(9)

2007年(39)

2006年(58)

2005年(38)

2004年(5)

我的朋友

分类: 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.

另外关于一些软件、书籍的下载地址,请看左边的“我的链接”!

阅读(1135) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~