Java

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. Java is the programming language RuneScape's game engine is written in. Java should not be confused with RuneScript, the scripting language that Jagex uses to create new content for Runescape.



Java can run on almost all operating systems because it is platform independent. Java can work this way because it includes a virtual machine called the Java Virtual Machine which translates code into machine code so the operating system can read it. There are some limitations however. Apple releases its own version of Java for the Mac OS X users, so the Java that Mac OS X users get might not be the latest version.



History
The Java platform and language began as an internal project at Sun Microsystems in December 1990, providing an alternative to the C++/C programming languages. Engineer Patrick Naughton had become increasingly frustrated with the state of Sun's C++ and C APIs (application programming interfaces) and tools. Java wasn't always called Java. Its first name started as Oak, then it turned to Green, and then on a list of random words, it was named Java.

Types of Java
There are many types of Java programs which run differently to each other:
 * Applet - can be put online (in web browsers).
 * Application - can only be run on the computer, cannot be put online but, can run online.
 * Servlet - runs on a server and helps to display web pages.
 * Swing application - like an application, but can have a more graphical look.

Basic Java
//This is an example of a single line comment using two forward slashes /* This is an example of a multiple line comment using the forward slash and asterisk. This type of comment can be used to hold a lot of information or deactivate code but it is very important to remember to close the comment. */ /** This is an example of a multiple line Javadoc comment which allows compilation from Javadoc of this comment. */

Example: Hello world program
// Outputs "Hello, world!" and then exits public class HelloWorld { public static void main(String args[]) { System.out.println("Hello, world!"); } }

Bots in RuneScape
RuneScape is coded entirely in Java and the "language" is Runescape's best friend, and also worst enemy. Java is the main language that most RuneScape bots are scripted in. They usually come in .Jar files (which are essentially Java-based applications), and inject themselves into the main RuneScape code which processes the bot.