如何在就 jBuilder6.0 下编写和运行阿???(新手问题;使用过 jbuilder工具的请进)
本机已经安装的软件 j2sdk1.4.0_03 ;jbuilder6.0 ;jCreator (这只是一个java编辑工具)
在jbuilder6.0下的 class 向导 下编写的程序
/*************************************************************************
源程序
package constructmethoddemo;
public class ConstructMethodDemo {
int x,y;
public ConstructMethodDemo() {
}
public ConstructMethodDemo(int x, int y)
{
this.x = x;
this.y = y;
}
public void init(int x, int y)
{
this.x = x;
this.y = y;
}
public int getSum()
{
return x+y;
}
public static void main(String args[])
{
//实例化过程中没有设置成员变量
ConstructMethodDemo instance = new ConstructMethodDemo();
//设置成员变量
instance.init(1,2);
//调用类实例中定义的方法
int nResult = instance.getSum();
System.out.println("调用instance实例的成员方法获取结果" + nResult);
//实例化过程中设置成员变量
ConstructMethodDemo otherInstance = new ConstructMethodDemo(1,2);
//调用类实例中定义的方法
nResult = otherInstance.getSum();
System.out.println("调用otherInstance实例的成员方法获取结果" + nResult);
}
}
/*************************************************************************
一点击 RUN
就会弹出一个 对话框叫 RunTime Properties
好像要求填写 vm parameters
和 application parameters
到这里我就不知道要怎么办了???哪位知道请指点一下,
但我在 jCreator 下面运行
就一点提示关系也没有 还有一个 结果显示, 也符合程序的结果