编译 Java 小程序 (Mac OSX)
我目前正在开发一个适用于傅立叶级数的小程序。 这并不重要,因为我的问题是关于 Java Applet 编译器的。
有没有办法在 Mac OSX 上编译 .java 文件。我尝试使用终端,但找不到代码不能很好编译的原因。
我正在尝试使用这个开源代码
http://www.falstad.com/fourier/
如果 Java 开发人员能看一下这个,我将非常感激!
I'm currently working on an applet that works with Fourier's series.
It doesn't really matter because my question is about Java Applet compilers.
Is there a way to compile .java files on Mac OSX. I tried with the terminal but can't find why the code doesn't compile well.
I'm trying with this open-source code
http://www.falstad.com/fourier/
If you, Java devs could take a look at this, I would be so thankful !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许值得一读的是 Apple 的 Java开发文档。本质上,创建小程序所需的所有基础知识(编译器、API、文档)都已存在于您的 Mac 上。
不过,您应该考虑安装一个 IDE 来让事情变得更简单,而不是尝试通过终端运行。 Mac OSX 上的热门选择包括(排名不分先后)Xcode、NetBeans、Eclipse和 IntelliJ。我个人更喜欢 NetBeans,但我还没有尝试过 IntelliJ,所以我无法评论它的易用性。
Perhaps worth a read, is Apple's Java Development Documentation. Essentially, all the basics you need to be creating applets (compiler, API, docs) is already present on your Mac.
Rather than trying to run things through the terminal though, you should consider perhaps installing an IDE to make things a bit simpler for you. Popular choices on Mac OSX include (in no particular order) Xcode, NetBeans, Eclipse, and IntelliJ. I personally prefer NetBeans, but I haven't tried IntelliJ so I can't comment as to its ease of use.
应该没问题。我在linux、mac和windows下使用过Java,Mac与linux确实没有什么不同。毕竟它只是命令行级别的 bash shell。首先,您有两个选择 - 安装 Mac 开发人员工具(大量下载只是为了获取 Java)或下载 JDK 并安装它。我不记得基础 Mac OS X 是否安装了 JDK,所以我假设它只是默认安装的 JRE。我面前没有 Mac,所以我无法向您提供确切的详细信息,但我可以告诉您 Mac OS X 目录位置与 Linux 机器上的目录位置略有不同。但原理是一样的。因此,如果您需要安装 JDK,我建议您花一点时间探索 Mac OS X 的目录结构并了解它的设置方式。
是的,IDE 是一个很好的方法,可以节省大量时间。但了解命令行级别的工作原理总是值得的,因为毫无疑问您最终会在某个阶段使用它。
It should be just fine. I've used Java under linux, mac and windows and Mac is really no different to linux. It's just a bash shell after all at the command line level. To get started you have two options - install the Mac developer tools (Big download just to get Java) or download a JDK and install it. I can't remember if a base Mac OS X has a JDK installed or not so I'm assuming it's just a JRE installed by default. I don't have my Mac in front of me so I cannot give you the exact details, but I can tell you that the Mac OS X directory locations are slightly different to those on a linux box. But the principal is the same. So if you need to install a JDK I'd recommend spending a little time exploring the directory structures of Mac OS X and getting an understanding of how it is setup.
Yes, IDEs are a great way to go and can save a lot of time. But it's always worth understanding how things work at the command line level, because it's something that you will undoubtedly end up using at some stage.