- sudo mkdir -p /usr/local/java
For 32-bit users:
For 64-bit users:
- wget -O jdk-64bit.tar.gz http://goo.gl/MSzBj
- wget -O jre-64bit.tar.gz http://goo.gl/yZgjI
- sudo -s cp -r jre-64bit.tar.gz /usr/local/java
- sudo -s cp -r jdk-64bit.tar.gz /usr/local/java
- cd /usr/local/java
- sudo -s chmod a+x jre-64bit.tar.gz
- sudo -s chmod a+x jdk-64bit.tar.gz
- sudo -s tar xvzf jre-64bit.tar.gz
- sudo -s tar xvzf jdk-64bit.tar.gz
Now you need to enter these command (both 32-bit and 64-bit users):
- sudo nano /etc/profile
Add the following lines at the end of file:
JAVA_HOME=/usr/local/java/jdk* PATH=$PATH:$HOME/bin:$JAVA_HOME/bin JRE_HOME=/usr/local/java/jre* PATH=$PATH:$HOME/bin:$JRE_HOME/bin export JAVA_HOME export JRE_HOME export PATH
Copy above lines and to paste in terminal (Press Ctrl+Shift+V) and to save file using nano (Press Ctrl+O) then (Press Ctrl+X) to exit from file.
Now enter following commands one by one in terminal:
- sudo update-alternatives –install “/usr/bin/java” “java” “/usr/local/java/jre1.7.0_12/bin/java” 1
- sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/local/java/jdk1.7.0_12/bin/javac” 1
- sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/local/java/jre1.7.0_12/bin/javaws” 1
- sudo update-alternatives –set java /usr/local/java/jre1.7.0_12/bin/java
- sudo update-alternatives –set javac /usr/local/java/jdk1.7.0_12/bin/javac
- sudo update-alternatives –set javaws /usr/local/java/jre1.7.0_12/bin/javaws
- . /etc/profile
Check installed java version:
- java -version
That’s it, Enjoy!!!
- What are the various types of indexes?Is there any advantage of using views?
- On what kind of tables and columns, a view be created?
- What are the various kinds of constraints which can be applied on a column?
- What is the disadvantage of using indexes?
- What are the various techniques you have used for optimizing your tables? What about De-normalization?
- What is the purpose of DUAL table?
- How will you convert a date to String in SQL?
- How will you copy only the table structure from one table to another compatible table?
- How will you copy the table structure and data from one table to another compatible table?
- Which is the faster method of retrieving data using a SQL query? WHERE, ROWID, CURSOR
- What is better to use? A subquery or a Join?
- What is the purpose of NOCACHE and NOLOGGING keywords?
- What does DELETE CASCADE do in a constraint?
- When should one use Auto Increment of a column than using a sequence?
- How will you take the backup of the data present in your tables?
- What is the difference between a Data Warehouse and Data Mining?
- What is the disadvantage of having constraints and integrity checks in triggers or procedures than to have them in the application using the database?
- How will you delete duplicate rows from a table based on a particular column?
- Can a view be created on another view?
- Can a SQL query have an alias and be used as a column name for the enclosing parent SQL query? Give example?
- Is AVG a function or procedure?
- What is the advantage of using packages for storing PL/SQL objects?
- How will you raise an exception and an error in PL/SQL procedure?
- How will you call a PL/SQL procedure from a SQL statement?
- What is the default value being assigned to variables in a PL/SQL variables?
- What is the difference between NVL and NVL2 functions?
- What is the difference between Count and Count(*)?
- What is the difference between Procedure and Function?
- What is overloading of procedures?
- What is a ROW and STATEMENT triggers?