中国Java开发网 中国Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» 中国Java开发网 » Java GUI 设计 » Swing  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 关于java生成exe文件后的问题
wz19881220





发贴: 5
积分: 0
于 2008-05-28 18:28 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请问下各位大大。
java生成的exe文件只能在有JDK的电脑下运行。
纯java写的任何东西转成EXE文件都得这样做?装个JDK才能放到别人电脑?
有无办法没JDK环境也可以运行?

--------刚学J2SE没多久。问题可能弱智点=。=,不好意思哈。


wz19881220 edited on 2008-05-28 18:31

作者 Re:关于java生成exe文件后的问题 [Re:wz19881220]
loveapple





发贴: 26
积分: 1
于 2008-05-29 09:33 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
没JDK环境能运行的就不是Java了。
但是捆绑JDK的方法有很多。
如果你觉得麻烦或者不感兴趣,可以学J#。
J#写的程序可以直接在windows上运行。



loveapple
作者 Re:关于java生成exe文件后的问题 [Re:loveapple]
JiafanZhou



版主


发贴: 736
积分: 61
于 2008-05-30 17:17 user profilesend a private message to usersend email to JiafanZhousearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
wz19881220 wrote:
请问下各位大大。
java生成的exe文件只能在有JDK的电脑下运行。
纯java写的任何东西转成EXE文件都得这样做?装个JDK才能放到别人电脑?
有无办法没JDK环境也可以运行?

--------刚学J2SE没多久。问题可能弱智点=。=,不好意思哈。

Java is the language intendedly to be designed as *platform independence*. It uses the JRE (aka Java Runtime Environment) to run the compiled (.class) files. The same class file can be loaded my other JVM on a totally different operating system.

Now if you convert your Java program into a exe file, as well as you need the JRE (not JDK, JDK is actually a wrong term here) to run the exe program, it will make no sense and completely overkilled the developing. Normally people will use a different programming language like C to compile and link exe file.

loveapple wrote:
没JDK环境能运行的就不是Java了。
但是捆绑JDK的方法有很多。
如果你觉得麻烦或者不感兴趣,可以学J#。
J#写的程序可以直接在windows上运行。

wow.... there are still people remembering J# and learning that, amazing. It seems Microsoft might need to pay more money to Sun microsystems.



When I was a kid I used to pray every night for a new bike. Then I realized that The Lord doesn't work that way, so I stole one and asked him to forgive me.
作者 Re:关于java生成exe文件后的问题 [Re:wz19881220]
loveapple





发贴: 26
积分: 1
于 2008-06-02 12:15 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不知道要交都少钱,但是J#好像要翘辫子了。

想让自己写的Java程序跑在其他系统上的方法很多。
如果有兴趣,不妨参考一下LumaQQ、JEdit等比较成熟的Java桌面软件是如何发放的。

这里有很多值得参考的:http://java-source.net/



loveapple
作者 Re:关于java生成exe文件后的问题 [Re:loveapple]
JiafanZhou



版主


发贴: 736
积分: 61
于 2008-06-03 17:03 user profilesend a private message to usersend email to JiafanZhousearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
loveapple wrote:
想让自己写的Java程序跑在其他系统上的方法很多。

Now, I think it is a fair game to blame the market department of Sun Microsystems to confuse our loveapple here.

By nature, Java program is designed as Compile once, run everywhere. To more be technical, once you compile the Java source code into .class files, or you archive the code into jar files, the JVM on other Operating System can seamlessly run the classes or jar files without any developers' further work.

This is exactly how LumaQQ and JEdit deployed their project. (by the way, I love LumaQQ, the team who wrote LumaQQ are genius. They have a very good understanding of the oicq protocol.)

Hope this helps.

Regards,
Jiafan



When I was a kid I used to pray every night for a new bike. Then I realized that The Lord doesn't work that way, so I stole one and asked him to forgive me.

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2018 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026    客服信箱 714923@qq.com    客服QQ 714923