Sunday, June 28, 2009

Linux :: Installing & Configuring JDK on Linux

You have to install JDK, or you already have one set-up, but you want a newer version ??

Follow some simple steps below, no need to uninstall older one.

Download the package from SUN website, package name would be something like jdk-6u14-linux-x64-rpm.bin

Now change the permissions to make it executable :

chmod 755 jdk-6u14-linux-x64-rpm.bin

Then run it:
./jdk-6u14-linux-x64-rpm.bin

You will need to type yes to indicate your acceptance to their agreement and the installation will complete on its own. Unfortunately you are not yet done. Type java -version on the command line and you will see that it still points to the crappy old JVM from gcj.

You may locate the installation folder by following steps below:

Step 1:
updatedb;locate javac |grep bin

You will see an entry like this:
/usr/java/jdk1.6.0_14/bin/javac

Here /usr/java/jdk1.6.0_14 is the actual JAVA_HOME for your machine. Note this as you will need it to run the future commands.

Now run the alternatives command to instruct OS to recognize Sun's JVM.
alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_14/bin/java 100
alternatives --install /usr/bin/jar jar /usr/java/jdk1.6.0_14/bin/jar 100
alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_14/bin/javac 100

Finally you should configure alternative to use Sun's JVM as the default JVM. To do this type:
/usr/sbin/alternatives --config java

This will present you with at least 2 options. Choose the one for Sun's JVM. Similarly repeat the process for other commands.

Type java -version and you should see something like this:

java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_14, mixed mode, sharing)


Bingo, now you are using the latest JDK version.

Cheers
@$H

My Favs :: R.I.P MJ, The world will miss you...

Most of you, who know me and reading this, i know you will not believe but.. I still remember my school days i used to perform on MJ songs, there were 2 guys in my town who used to do it all da time, one was me and the other was my senior, who obviously was better than me in it :-(, it was the time of audio cartridges and those oversized walkmans.. which was a part of my stuff, when i used listen to MJ numbers alot....

With time, MJ slowly went of business and so as from my preferred artists list, but it was a shock to hear the news that MJ is no more...

Nothing more to say, but yes MJ, You would always be the King Of Pop !! You will always Rule and The World Will Miss You ...



R.I.P MJ.

Cheerz
@$H

Creating Files of a desired Size Linux

Greetings,

Suppose you doing some testing on the filesystem, say about quota etc, and you need to create files of a desired size, the golden command to be used is "dd".

Check out the usage as below:

$ dd if=/dev/zero of=bigfile bs=1024 count=1048576
This will create a file of size 1024 * 1048576 bytes (or 1 GB). In this command

if - input file
of - output file or the file to be created
bs - block size in bytes
count - # of blocks of size bs

Thats all for this day.

Cheerz.
Ash

The Azure Synapse Resource Provider Error

  If you are get the error " The Azure Synapse resource provider (Microsoft.Synapse) needs to be registered with the selected subscript...