Whoa. I spent almost 2 hours just preparing development environment for JSP. :0
I first downloaded latest version JDK 8.0.21, which was fairly simple. You can download it in here:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
You also have to download JRE!
JDK is development tool and JRE is runtime environment. If you only install JRE, you can run the java application but you can’t actually develop a java application. For example, if JDK is not installed, then you can’t compile the java source code. Also it is very rare to install just JRE. Usually people install JDK & JRE together! 🙂
After that, I downloaded web container, Tomcat (version 8). — This was the part that took me the longest time 😦
I looked at the website carefully, remembering JDK and Tomcat go as a pair. So it is important to pick a right version to download! It turns out Tomcat 8 is suitable to JDK 8.0.21. So I downloaded tomcat 8.
You can download Tomcat in here: http://tomcat.apache.org/
If you are mac user, download tar.gz file! 🙂
Next is the hardest part!
After downloading, you will see the file “apache-tomcat-8.0.21.tar.gz”
unzip it. Then, tomcat is installed.
I renamed it to tomcat to make it more convenient to run! 🙂
Go to the terminal.
go to the directory where tomcat is installed. For me, it was Downloads.
Do $pwd — this shows your location.
if you want to move to different folder, you can do so by first going to home directory.
Do $~ . Then move to the folder by doing $cd _____. e.g $cd Desktop, $cd NewFolder.
If you are at the folder tomcat is installed, Do $tomcat or $apache-tomcat-8.0.21 if you didn’t rename the folder.
Then go to bin folder by typing cd bin.
Then executes startup.sh by ./startup.sh — Downloads tomcat.
After that, you can check if tomcat is installed successfully by going to this website:
http://localhost:8080
If this screen shows, it means you successfully installed tomcat! 😀
3. Install code editor
You can download any code editor, but I chose eclipse.
You can download eclipse here:http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html
i struggled finding right one to download, which also took me forever.
But you can trust me. This one will work! 🙂
This will take long time to download. When you are done, go to the eclipse folder. and run !