A casual walk trough the Java world
Have you ever gotten confused about all the different terms coming up with Java?
Java-JDK, JavaScript, OpenJDK, Oracle, Java-Applets, Java-WebStart, Spring…
I also heard that Java has security problems what about that?
When I started out in software development got confused in this jungle of terms. I want to give you a quick overview of the field in this post. So probably you are a developer just starting out and want to learn Java. There are a lot of tutorial how to start programming in Java, but I want you to give a bit of information to eco-system and background of this technologies.
Java the language
public class HelloWorld {
public static void main (String[] args) {
System.out.println("Hello World!");
}
}
Java is an object oriented programming language, but it is a special one because it not compiled to machine code like for example C it is translated into byte-code that is executed by the JRE (Java Runtime Enviroment) that we will discuss next.
Java the program
In order to execute a compiled Java program, you need another program called Java Runtime Environment. If you wrote a Java Program and want to run it on a friends computer, they need to install an JRE first.
There are different vendors that have programmed a JRE that you can install. The most prominent ones for the desktop are OpenJDK and Oracle. The cool thing is there is a JRE for your OS available then you can run any compiled Java program without recompiling it, this is called platform independent.
To transform such a Java program into byte code you need a compiler, the compiler is included if you are install a JDK (Java Development Kit).
Different technologies
Next we will cover some more specialized areas where Java is used and what there names are.
We start out with something easy Javascript. Well it easy because it has nothing to do with Java at all. It is another programming language where the developers choose to include Java in the name because it was very popular these days.
Java-Applets, is a legacy technology that is not used anymore today.
In the earlier days of web-browsers (before the year 2000),
many people thought it would be cool to run Java in the browser that is downloaded from some website.
This feature came with a lot of security problems, when the browser failed to sandbox (prevent the program from accessing all files on the PC) the applets.
This is why to this some people say “Java has security issues”, even though this was a problem over 20 years ago.
So Java is no longer included in web browsers, what is Java Web Start then?
Java Web Start is a product of Oracle to hat is not supported anymore.
The Idea to run a normal Java Application, but the user starts it from the browser.
Basically Java Web Start was just an application that looked out for new version of the jar file and downloaded them only if necessary.
Fortunately now there is an alternative to Java Web Start that is still supported, ist called Open Web Start.
The last we going to cover is Java spring as representative for all Java frameworks an libraries out there.
A framework is a set of already existing tools that help you solve certain “standard” problems.
For example writing a web application, or doing matrix multiplication.
Spring has a lot of features but it’s mainly used for web development.
My point is there are a lot of Frameworks out there containing Java in there name and it is fine to not know them all.
Conclusion (Confusion?!)
This should serve as an introduction for all upcoming Java-Devs.
I hope you found it useful and happy hacking :)