Setting up JCreator with the Java Development Kit (JDK)
设置JCreator
1、Make sure you have the Java Development Kit suite installed from Sun, instead of the Java Runtime Environment.
1、首先从java.sun.com下载JDK(Java Development Kit suite,java开发工具包)并安装,注意不是JRE(Java Runtime Environment,运行时环境)。当然也可以使用 J2SE 5或是J2SE 6.
Version 1.4: http://www.javasoft.com/j2se/1.4.2/download.html In the right column, select SDK.
2、After the installation, start JCreator.
2、安装JCreator(如果是非正版,不要忘了打补丁.^o^),然后启动JCreator。
3、Click Configure > Options.
3、点击Configure > Options.(这一步以及下面几步是为了配置JCreator,如果在安装JCreator之前正确安装了JDK,则在安装JCreator时,JCreator能自己进行正确的配置。)
4、In the tree, select JDK Profiles.
4、在左面的树状列表(tree)中,择择"JDK Profiles"
5、Click the New button.
5、单击New按钮。
6、Browse to the root directory of the JDK installation. For example, c:\jdk1.4.
6、浏览JDK安装的根目录。例如:C:\JDK1.4(这一步要根据机器上JDK安装的实际情况进行选择)。
7、On the Profile Settings dialog box, check to see if the Name field contains the version of the selected JDK directory.
7、在"JDK Profile"设置对话框中,仔细检查是否"Name"域包含了选择的JDK目录的版本。
8、Click File > New Project.
8、单击File > New Project。
9、Create a test project from the Basic Java Application template.
9、从基本java 应用程序模板(the Basic Java Application template)中,创建工一个test project (test工程)
10、Compile and run the project by pressing F7 and F5 on the keyboard. The MS-DOS window now runs your Java application.
10、用键盘上的F7或是F5键可以编译、运行工程(project)。现在你可以在MS-DOS 窗口中看到你的java工程的运行情况了
编写单个文件的Java控制台应用程序方法:[做前几章实验,建议用此方法]
1、单击File -> New ->File,注意文件的命名,参阅书上的P21 上的3.1.3节。起文件名后,单击finish按钮。
2、编写java程序。注意类的命名,参阅书上的P21 上的3.1.3节。
3、编译程序。Build->compile file。如果有错误,下面的“Build output”窗口会有提示。编译成功,会显示“Process completed”
4、运行程序。Build->Execute file