- Download Oracle JDK
- Upload .gz file to /usr/local/java and change to that directory
- Type "sudo tar xvzf jdk-8u65-linux-x64.gz"
- sudo vi /etc/profile
- Update the following, replacing jdk1.8.0_65 with the version you downloaded:
JAVA_HOME=/usr/local/java/jdk1.8.0_65
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH - Type “. /etc/profile”
- Type the following, replacing jdk1.8.0_65 with the version you downloaded:
sudo update-alternatives --install "/usr/bin/java" "java"
"/usr/local/java/jdk1.8.0_65/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac"
"/usr/local/java/jdk1.8.0_65/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws"
"/usr/local/java/jdk1.8.0_65/bin/javaws" 1
sudo update-alternatives --set java /usr/local/java/jdk1.8.0_65/bin/java
sudo update-alternatives --set javac /usr/local/java/jdk1.8.0_65/bin/javac
sudo update-alternatives --set javaws /usr/local/java/jdk1.8.0_65/bin/javaws - Type “sudo apt-get install tomcat7”
- Type “sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples”
- Ensure that your server configuration has open ports for SSH, HTTP, and custom 8080 port for TomCat
- Open project in eclipse
- Export in the Web option as .WAR file
- Use SCP to upload as root.
- Move .WAR file to /var/lib/tomcat7/webapps
Access http://yourdomain.com:8080/chess/MyServlet from inside your web browser.
For example, http://chessxpert.com:8080/chess/MyServlet