Set up Java in CentOS 7

I have long been interested in Android application development, but I have not studied Java before. I was told that I can run Java on Windows using NetBeans, but now I would like to get this done on Linux, as in Linux world I can use my favorite VI, and not bothered with bulky IDE.

By default CentOS 7 has some version of Jave installed. I tried it, and while I was able to use javac to create class file, I was not lucky in running java. So I decided to switch to Sun Java. Continue reading