简体   繁体   English

编译Java小程序(Mac OSX)

[英]Compiling a Java applet (Mac OSX)

I'm currently working on an applet that works with Fourier's series. 我目前正在研究可与Fourier系列配合使用的applet。 It doesn't really matter because my question is about Java Applet compilers. 没关系,因为我的问题是关于Java Applet编译器的。

Is there a way to compile .java files on Mac OSX. 有没有一种方法可以在Mac OSX上编译.java文件。 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/ http://www.falstad.com/fourier/

If you, Java devs could take a look at this, I would be so thankful ! 如果您是Java开发人员可以看一下,我将非常感激!

Perhaps worth a read, is Apple's Java Development Documentation . 也许值得一读的是Apple的Java开发文档 Essentially, all the basics you need to be creating applets (compiler, API, docs) is already present on your Mac. 本质上,Mac上已经存在创建小程序所需的所有基础知识(编译器,API,文档)。

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. 但是,与其尝试通过终端运行,不如考虑安装IDE来使事情变得更简单。 Popular choices on Mac OSX include (in no particular order) Xcode , NetBeans , Eclipse , and IntelliJ . 在Mac OSX上,流行的选择包括(不分先后) XcodeNetBeansEclipseIntelliJ I personally prefer NetBeans, but I haven't tried IntelliJ so I can't comment as to its ease of use. 我个人更喜欢NetBeans,但是我没有尝试过IntelliJ,因此我无法评论其易用性。

It should be just fine. 应该没问题。 I've used Java under linux, mac and windows and Mac is really no different to linux. 我在Linux,Mac和Windows下使用过Java,而Mac与Linux确实没有什么不同。 It's just a bash shell after all at the command line level. 毕竟,这只是命令行级别的bash shell。 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. 首先,您有两个选择-安装Mac开发人员工具(下载大量代码只是为了获得Java)或下载JDK并安装它。 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. 我不记得基本的Mac OS X是否安装了JDK,因此我假设默认情况下它只是安装了JRE。 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. 我的面前没有Mac,因此无法提供确切的详细信息,但是我可以告诉您Mac OS X的目录位置与Linux机器上的位置略有不同。 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. 因此,如果您需要安装JDK,建议您花一些时间探索Mac OS X的目录结构,并了解它的设置方式。

Yes, IDEs are a great way to go and can save a lot of time. 是的,IDE是一种不错的选择,可以节省很多时间。 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. 但是,始终值得了解它们在命令行级别是如何工作的,因为您无疑会在某个阶段最终使用它。

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

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