Set Java Home on Ubuntu

October 03, 2015 by Sandeep Bhardwaj | Tags:

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 more

Install Oracle JDK on Ubuntu

October 03, 2015 by Sandeep Bhardwaj | Tags:

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 more

Enable laptop touch-pad on Elementary OS Freya

October 03, 2015 by Sandeep Bhardwaj | Tags:

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 more

Execute N number of threads one after another in cyclic way

July 20, 2015 by Sandeep Bhardwaj | Tags:

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 more

ExecutorService InvokeAll Example

July 09, 2015 by Sandeep Bhardwaj | Tags:

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