怎么用EditPlus来运行java程序?

goodyyq02 2003-09-29 04:50:58
我用EditPlus编了一下一个程序
class
{
public static void main(String a[])
{
System.out.println("Hello World!");
}
}
但我不知道如何EditPlus来显示结果,你可以帮助我吗?
...全文
507 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
zcjl 2003-09-30
  • 打赏
  • 举报
回复
比如我的设置:
菜单文字:Run Java Program
命令:D:\jdk1.4\bin\java.exe
参数:
初始目录:$(FileDir)
然后选中“捕获输出”及“参数提示”

运行的时候在弹出的输入参数对话框里输入参数(包名.类名 arg1 arg2...)
就ok了
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
怎么没有人理我呢?

回答我的问题好不好啊?
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
怎么没有人理我说的话?回答我的问题啊。
ssht968 2003-09-30
  • 打赏
  • 举报
回复
还真是功能强大呢。
zcjl 2003-09-30
  • 打赏
  • 举报
回复
同意楼上
ant编译真叫那个舒服啊
呵呵
phantomhu 2003-09-30
  • 打赏
  • 举报
回复
editplus + ant 还是很清爽底
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
而且,怎么在EditPlus里面加入参数啊,有很多程序是需要加参数的。
gtao2003 2003-09-30
  • 打赏
  • 举报
回复
还是用jbuilder方便
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
我调出jdb,显示Initializing jdb...
敲入命令:
stop at debugtest.hehe:18
显示
Deferring breakpoint debugtest.hehe:18
It will be set after the class is loaded
敲入命令
stop in debugtest.test.add
显示
Deferring breakpoint debugtest.test.add
It will be set after the class is loaded
敲入其他命令,如
print bf.abc
print i
dump kk
list
locals
next
step
methods test
fields test
cont
怎么都是显示
Command '命令' is not valid until the VM is started with the 'run' command
呀,这是为什么啊?
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
我本来也想说的,哎!佩服楼上的。
zcjl 2003-09-30
  • 打赏
  • 举报
回复
因为我没有用过jdb
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
我这个问题怎么没有人回答呢?



我调出jdb,显示Initializing jdb...
敲入命令:
stop at debugtest.hehe:18
显示
Deferring breakpoint debugtest.hehe:18
It will be set after the class is loaded
敲入命令
stop in debugtest.test.add
显示
Deferring breakpoint debugtest.test.add
It will be set after the class is loaded
敲入其他命令,如
print bf.abc
print i
dump kk
list
locals
next
step
methods test
fields test
cont
怎么都是显示
Command '命令' is not valid until the VM is started with the 'run' command
呀,这是为什么啊?
zcjl 2003-09-30
  • 打赏
  • 举报
回复
那我岂不是很惨?

^_^
qlampskyface 2003-09-30
  • 打赏
  • 举报
回复
谢谢你,问题解决了,以后有问题就找你了,好兄弟!!
zcjl 2003-09-30
  • 打赏
  • 举报
回复
这样看来,你运行时的参数应该是Client chendong才对
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
程序好像没什么问题,因为我在jdk环境下是可以和server端通信的。
-----------------------------------------------------------------
import java.io.*;
import java.net.*;

public class Client {
public static void main(String args[]) {
try{

System.out.println(args.length);
if (args.length != 1){
System.out.println("USAGE: java Client servername");
//System.exit(0);
return;
//System.exit(1);
}
/*public Client(String[] args){
String servername;
servername=args[0];


}*/
String connectto= args[0];
Socket connection;
// connect to server
if(connectto.equals("localhost")){
connection=new Socket(InetAddress.getLocalHost(),5000);

}
else{
connection=new Socket(InetAddress.getByName(connectto),5000);
}
DataInputStream input=new DataInputStream(connection.getInputStream());

// read information from server
String info;
info = input.readUTF();
System.out.println(info);
connection.close();
}
catch(SecurityException e){
System.out.println("SecurityException when connecting Server!");
}
catch(IOException e){
System.out.println("IOException when connecting Server!");
}
}

}
zcjl 2003-09-30
  • 打赏
  • 举报
回复
给我看看你的程序
xiaozuidazhi 2003-09-30
  • 打赏
  • 举报
回复
为什么我在弹出的参数对话框里输入参数的时候,试了不同的方式,结果每次都说是:
---------- 运行 ----------
java.lang.NoClassDefFoundError: Client/chendong
Exception in thread "main"
输出完成 (耗时 0 秒) - 正常终止
--------------------------------------
这是为什么呢?
swinging 2003-09-29
  • 打赏
  • 举报
回复
要是能把JAVA语法提示集成到EDITPLUS里就好了,
不知道有没有人知道怎么做,以前听说过有人弄过。
derek1981 2003-09-29
  • 打赏
  • 举报
回复
呵呵,楼上的都说完了
加载更多回复(5)
Java程序设计》课程实验指导书程序代码(答案)(实验一),个人原创,仅供参考与交流。 实验一 Java开发环境的安装与配置,熟悉Java程序结构 一、实验目的: 1. 掌握JDK的安装步骤。 2. 理解环境变量PATH, CLASSPATH的作用,以及它们的设置方法。 3. 熟悉Editplus(或TextPad,JCreator)编辑环境,编写简单的Application程序和Applet程序,并编译和执行。 二、实验内容: 熟悉JDK的安装和配置,学习如何编写并运行简单的Application程序和Applet程序(能输出一条简单的问候信息); 三、实验要求: 1. 能正确地安装JDK 2. 熟悉环境变量PATH, CLASSPATH设置方法,熟悉编辑环境 3. 调试程序、编译,运行后得到正确的结果 4. 写出实验报告,要求记录编译和执行Java程序当中的系统错误信息提示,并给出解决办法。 四、实验步骤: 1.从http://java.sun.com 上下载最新版本的JDK,并安装。 2.设置环境变量PATH, CLASSPATH, 使得Java程序能正确编译和执行。 3.在Editplus(或JCreator ,Textpad)环境下编写一个HelloWorld.java程序, (1)在主方法static public void main(String[ ] args)中调用System.out.println()方法,使程序输出一条问候信息; (2) 编译运行程序,观察运行情况和输出结果。(使用JDK环境,调用javac.exe和java.exe编译和执行程序) 4.在Editplus(或JCreator ,Textpad)环境下编写一个HelloWorldApplet.java程序。 (1)在public void paint(Graphics g)方法中调用g.drawString()方法,使程序输出一条问候信息; (2) 编译运行程序,观察运行情况和输出结果。(使用JDK环境,调用javac.exe编译和浏览器解释执行Applet程序

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧