老大,我连editplus怎么编译都不知道,能告诉怎么配置环境让editplus 可以编译java 文件吗?万分感谢!!

解决方案 »

  1.   

    晕~俺只用editplus编辑,还不知道有编译的功能,知道的说说呗!!
      

  2.   

    把你的helloworld.java文件贴出来看一下
      

  3.   

    To make the compilation and application execution easy, do the following steps:   1) Click Tools menu
       2) Select Configure user tools
       3) Click Add Tools>>
       4) Select Program
       5) Enter the following fields:
            Menu text: Compile JavaFile
            Command: c:\jdk141\bin\javac.exe -d .
            Argument: $(FileName)
            Initial directory: $(FileDir)
            Check Capture output
       6) Click Add Tools>>
       7) Select Program
       8) Enter the following fields:
            Menu text: Run Javafile
            Command: c:\jdk141\bin\java.exe
            Argument: $(FileNameNoExt)
            Initial directory: $(FileDir)
            Check Capture output
       9) Click Add Tools>>
      10) Select Program
      11) Enter the following fields:
            Menu text: appletviewer
            Command: c:\jdk141\bin\appletviewer.exe
            Argument: $(FileName)
            Initial directory: $(FileDir)
            Check Capture output
      12) Click OK
      13) Edit your Java code ans save it
      14) Press Ctrl-1 to compile your code (or select from Tools menu)
      15) Press Ctrl-2 to run your compiled application code (or select from Tools menu)
      16) Press Ctrl-3 to appletviewer on your html file (or select from Tools menu)
      

  4.   

    谢谢 yjs_lh!又长见识了!!
      

  5.   

    我的源码(太简单了):
    public class helloworld 
    {
    public static void main(String[] args) 
    {
    System.out.println("Hello World!");
    }
    }
    直接用命令行的方式没错的,我试了,但在这怎么不行,太郁闷了
      

  6.   

    tool.ini[Tools\0]
    Count=4
    Text=j2sdk1.4.2_02
    [Tools\0\0]
    Text=Running Java File
    Command=C:\j2sdk1.4.2_02\bin\java.exe
    Argument=-classpath $(FileDir) $(FileNameNoExt)
    InitDir=$(FileDir)
    RedirOut=1
    Prompt=0
    Plugin=0
    Pattern=131328
    Pattern Regex=^([^(]+):([0-9]+):
    Close=0
    Help=0
    [Tools\0\1]
    Text=Running Java File with Parameter
    Command=C:\j2sdk1.4.2_02\bin\java.exe
    Argument=-classpath $(FileDir) $(FileNameNoExt)
    InitDir=$(FileDir)
    RedirOut=1
    Prompt=1
    Plugin=0
    Pattern=0
    Pattern Regex=
    Close=0
    Help=0
    [Tools\0\2]
    Text=Compile Java File
    Command=C:\j2sdk1.4.2_02\bin\javac.exe
    Argument=$(FilePath)
    InitDir=$(FileDir)
    RedirOut=1
    Prompt=0
    Plugin=0
    Pattern=0
    Pattern Regex=
    Close=0
    Help=0
    [Tools\0\3]
    Text=JavaH
    Command=C:\j2sdk1.4.2_02\bin\javah.exe
    Argument=-classpath $(FileDir) $(FileNameNoExt)
    InitDir=$(FileDir)
    RedirOut=1
    Prompt=0
    Plugin=0
    Pattern=0
    Pattern Regex=
    Close=0
    Help=0
      

  7.   

    editplus要用到系统设置的环境变量的
    你看看你的classpath是什么
      

  8.   

    用yjs_lh 的方法配置后,编译没有问题,但是不能运行,报错信息:
    Exception in thread "main" java.lang.NoClassDefFoundError: Helloword/java代码:
    public class Helloword 
    {
    public static void main(String[] args) 
    {
    System.out.println("Hello World!");
    }
    }
      

  9.   

    你在dos下试一下,看能不能编译,环境设置了么?
      

  10.   

    editplus配置运行java那一步的时候
    参数那里是选择$(FileNameNoExt)
    也就是文件名不带扩展名
    不要选成文件名的全名了
      

  11.   

    多谢各位:
    我已经试出来了,配置如下:
    菜单名称:编译类
    命令:C:\JBuilder9\jdk1.4\bin\javac.exe
    参数:文件目录(或为空)
    初始目录:文件目录菜单名称:运行类
    命令:C:\JBuilder9\jdk1.4\bin\java.exe
    参数:-classpath $(FileDir) $(FileNameNoExt)
    初始目录:文件目录