java游戏为什么_【Java】Minecraft这款游戏为何是用Java语言写的?

Okay, you seem a bit misguided about these technologies, let's see if I can bring you up-to-speed in a clear and concise manner.

Javais aninterpreted(meaning it's converted to machine language as it's being used, not prior, like other languages such as C/C++) programming language that runs off of a virtual machine. This makes Java inherently slower than the other languages, for reasons you'll come to understand later on in this reply. The Java Virtual Machine (JVM) is (simply put) a piece of software that converts Java code to native machine code, and executes it. This allows Java to run on all the platforms that support the machine's architecture (currently 6+ BILLION devices are compatible with the JVM.) This means that if I write an Java application on my Windows computer, I can run it on my Linux computer, and even my Macintosh, whenever I wish, without editing the code base. If i used C/C++ or any othernativelanguage (must be compiled for each device architecture that I wish to run it on), then I'd have to write a Windows version that supports Windows GUIAPi's(Application Programming Interface), then I'd have to write a version for Macintosh that supports its GUI API, (The Cocoa framework) and then I'd have to write another version for Linux/Unix systems that support THEIR GUI APi's (Qt and GTK). All this could take weeks, and if Notch had written Minecraft this way, it could takes weeks or months just to get the Mac version of 1.6.2 after it was released for Windows.

Next up, Java and JavaScript areNOTthe same language.

Java is a byte-code interpreted language running on a virtual machine

JavaSCRIPT is a client-side scripting language for the World Wide Web (and more recently, Windows 8 Apps, and some other platforms, as well.)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值