October 03, 2015 by Sandeep Bhardwaj | Tags: Ubuntu Java
Setting the environment variable in Ubuntu in really easy, just need to edit the /etc/profile. Just add your java installation directory as below. Open the /etc/profile file in your favorite editor. sudo gedit /etc/profile Add following lines in end JAVA_HOME=/usr/local/java/jdk1.8.0_60 PATH...
Read moreOctober 03, 2015 by Sandeep Bhardwaj | Tags: Ubuntu Java
1) Download the jdk-8u60-linux-x64.tar.gz from the Oracle site (Download 64bit or 32bit based on your linux environment). 2) If you have root access then install java system-wide inside /usr/local directory. First create a directory named java inside /usr/local sandeep@vivan:~$ sudo mkdir /usr/...
Read moreOctober 03, 2015 by Sandeep Bhardwaj | Tags: Elementary OS
Yesterday, i installed fresh copy of Elementary OS Freya on my Samsung laptop. But after installing i faced a weired problem that my touch-pad of laptop not working but every thing just working fine with external mouse. So, i search on Google and find out so many solution but only the below one ...
Read moreJuly 20, 2015 by Sandeep Bhardwaj | Tags: Java Concurrency
This is a famous interview question how to execute 3 or n threads one after another and performing a job like :- Thread T1 prints then Threads T2 print and then …. Thread Tn then again Thread T1 prints then Threads T2 print and then …. Thread Tn and so on…. T1 -> T2 -> … -> Tn; and the...
Read moreJuly 09, 2015 by Sandeep Bhardwaj | Tags: Java Concurrency
ExecutorInvokeAllExample.java import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurr...
Read more