比较好的办法是前端开发applet,嵌入到html中发布,这样客户端只需要有ie浏览器就可以了,
不需要jdk,设置path等运行application所需要的步骤。
然后通过applet和服务器的servlet等进行通讯和交互。
至于.class-》.exe,听说也离不开jvm的支持,具体我不大清楚了。
要运行java application一定要有jvm的支持,这也是java能实现其跨平台的原因所在。
再听听其他各位的高见吧!

解决方案 »

  1.   

    同意lmy2000(pluto) 的看法;
    运行class一定要java环境
      

  2.   

    转载一位朋友的回贴:
    cause the class code should be excuted by a java virtual machine. 
    so, you should have some jvm installed in ur system. 
    in M$, there is a jview.exe in the /winXX/system ..(maybe other place) 
    jview is a jvm carried with Windows system. 
    so you may just use jview HelloWorld to run it. 
    ofcourse , you should tell jview where the HelloWorld.class is. 
    BTW, if *.class are in the current directory, no CLASSPATH setting need. 
      
    otherwise,you should have a jvm installed by yourself, 
    for example, jre.. java runtime environment.. only a jvm and tools, 
    no develop toolkits.. very small, you can install it in ur windows or linux 
    and there are lots of others jvm.. such as jike,etc. 安置上面的提示,我在一台win98和一台win2000上进行了测试:
    将HelloWorld.class放到C:\下面
    C:>jview HelloWorld  运行成功!
    C:windows>jview /cp C:\ HelloWorld 运行成功!
    我想开发好的java应用在windows下的运行是不是直接拷贝应用程序到指定目录下,
    然后编辑一个run.bat文件,包含"jview ClassName.class",注意一下classpath setting
    就行了,是这样吗?或许我想的太简单了一些。
    大伙多提提看法吧!
      

  3.   

    又想到一个问题:
    由于使用jview时要出现ms-dos,
    怎么才能运行java程序的同时将ms-dos窗口关闭呢?