简体   繁体   English

如何使 Java 程序 ide 免费

[英]how to make a java program ide free

So I made this Java code project in NetBeans for a very un-computer savvy friend, and It runs fool proof, I even took the time to GUI it, but I want this to be as simplistic as possible where she can simply load the project off of a flash drive and just double click the file and it will run independently of Netbeans or any other IDE's.所以我在 NetBeans 中为一个非常不熟悉计算机的朋友制作了这个 Java 代码项目,它运行得很简单,我什至花时间使用 GUI,但我希望这尽可能简单,她可以简单地加载项目关闭闪存驱动器,只需双击该文件,它就会独立于 Netbeans 或任何其他 IDE 运行。 Is there a way to do this, I think a better way of explaining what I am looking for is how can I make my code compile and run through the program alone.有没有办法做到这一点,我认为解释我正在寻找的更好的方法是如何让我的代码编译并单独运行程序。 Kind of like Chrome would when you double click it, it would just open up and start going to work.有点像 Chrome 当你双击它时,它会打开并开始工作。 Hopefully there is some kind of setting in NetBeans that will do this automatically.希望 NetBeans 中有某种设置可以自动执行此操作。

Thank you for any and all help/comments感谢您的任何和所有帮助/评论

Package the program in an executable JAR file.将程序打包到一个可执行的 JAR 文件中。

See: Lesson: Packaging Programs in JAR Files in Oracle's Java Tutorials for information on how to do this.有关如何执行此操作的信息,请参阅:Oracle 的 Java 教程中的课程:在 JAR 文件打包程序

For how to do this from NetBeans, see: Packaging and Deploying Desktop Java Applications on the NetBeans website.有关如何从 NetBeans 执行此操作,请参阅:NetBeans 网站上的打包和部署桌面 Java 应用程序

Your friend will have to have Java installed, then (s)he can just double-click the JAR file to run your program.您的朋友必须安装 Java,然后他只需双击 JAR 文件即可运行您的程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM