"Write once, run everywhere."
|Sun Microsystems, Oracle Corporation|
|Sun Microsystems, Oracle Corporation|
|Awards | Changelog | Compatibility | Covers |
Credits | DLC | Gallery | Help | Patches | Ratings
Reviews | Screenshots | Videos
"Write once, run everywhere." is the motto of the Java platform. Java Edition includes the Java programming language and the Java core library. Users who want to play Java games must install a Java Runtime Environment onto their computer, though some operating systems include one.
Java applets[edit | edit source]
Java 1.0 introduced the concept of a Java applet, a rectangular zone on a web page that could display a Java program. If you wanted to play Slime Volleyball, for example, then you would open a web browser like Netscape Navigator 2.0 or Microsoft Internet Explorer 3.0, and visit a web page with the game.
A security manager applied itself to Java applets, to prevent applets from accessing your files or doing any other unsafe activity. Java programs are compiled into bytecode, not native machine code, so Java applets worked on different types of machines. You could play Slime Volleyball on Mac OS, Solaris, or Microsoft Windows.
Why there were few Java applets[edit | edit source]
Java 1.0 had some interesting programming features; string objects were in Unicode, and allowed Java to handle international languages. URL objects also provided an abstract way to connect to a network; the garbage collector prevented memory problems that would otherwise cause crashes. Java was simpler than C++ and became popular in educational fields.
But the Abstract Window Toolkit, the part of the Java core library for accessing native Mac OS, X11, or Microsoft Windows widgets, lacked features, and had an inefficient event model. Sound had to be a ".au" file at 8000 Hz quality, and images were not easy to load. Such a poor set of features did not attract many game programmers.
Newer versions of Java made improvements, but Apple, Microsoft and Netscape forced their users to use Java 1.1, even though programmers wanted to use Java 1.2 or later. Just installing the current version of Java onto an operating system became an obstacle.
Java application[edit | edit source]
Other than Java applets, there are Java applications that run outside the web browser. Java applications originally were not easy to install and launch until Java 1.4 introduced Java Web Start. With Java 1.4 installed, a link can be embedded within web pages to install Java applications. An example of a Java Web Start game is Legerdemain.
Currently, there are not many large scale games using 3D graphics in Java. The largest and most complex games to use Java are arguably RuneScape and Minecraft. Initial developer installations of Java did not provide a programming interface for 3D graphics. Note, however, that since Java is interpreted bytecode, Java may be too slow for CPU-intensive games that would normally require a faster computer with a lot of computational ability.
Java on the server[edit | edit source]
Some web server administrators were able to install Java and use it to script their web servers. Java is a lower-level language than Perl, PHP or Python, but some CGI programmers prefer Java.
Installing Java[edit | edit source]
Microsoft Windows and Solaris[edit | edit source]
- Visit Oracle Corporation
- Follow the instructions
Linux x86 and x86-64[edit | edit source]
- Follow the above instructions. Note that Oracle Corporation does not provide Java for other architectures of Linux, like SPARC, Alpha or PowerPC! (Blackdown has some old versions of Java for some architectures, although it is worth noting that these versions may contain security vulnerabilities.)
macOS[edit | edit source]
- Upgrade to the latest version of macOS.
- Run "Software Update".
Apple does not port current versions of Java to older versions of macOS. Running new Java programs may require you to upgrade to a superior macOS version.
Commercial server operating systems
- Some vendors of UNIX or VMS have licenses from Oracle Corporation and provide ports of Java to their platforms. Check your operating systems' website.
Other Unix distributions
- If you run BSD-based x86 or x86-64 distributions, you might be able to use a Linux version of Java under emulation. If you run Linux PowerPC, you may be able to register with IBM and obtain their IBM Developer Kit containing Java.
Free alternatives to Java[edit | edit source]
There are free alternatives to Java that have been ported to more platforms. They implement most of Java 1.4, but also have other features. Most of them use GNU Classpath for their core library. Look at JVMs that use Classpath or try GCJ or Kaffe. You may be able to use them to play Java games on Linux or BSD.
The OpenJDK project has HotSpot, a Java bytecode interpreter, and Javac, the Java language compiler.