ubuntu install jdk.rpm.bin
JDKRPMInstallationforLinux(32-bit)
InstallationInstructions
ThisprocedureinstallstheJavaSERuntimeEnvironmentfor32-bitLinux,usinganRPMbinarybundle.SomeLinuxdistributions,suchasUbuntu,arenotRPM-based.Inthatevent,pleaseseetheselfextractinginstallationpage.
Thenameofthedownloadedfilehasthefollowingformat:
jdk-6u
<version>-linux-i586-rpm.bin
<version>
jdk-6u18-linux-i586-rpm.bin
Toinstall,downloadthisfileandusethefollowinginstructions:
1.Downloadandcheckthefilesize.
http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html
Youcandownloadtoanydirectorythatyoucanwriteto.
2.Becomerootbyrunningthesucommandandenteringtherootpassword.
3.Extractandinstallthecontentsofthedownloadedfile.
ChangedirectorytowherethedownloadedfileislocatedandrunthesecommandstofirstsettheexecutablepermissionsandthenrunthebinarytoextractandruntheRPMfile:
% chmod a+x jdk-6u
<version>-linux-i586-rpm.bin
% ./jdk-6u
<version>-linux-i586-rpm.bin
Notethattheinitial"./"isrequiredifyoudonothave"."inyourPATHenvironmentvariable.
Thescriptdisplaysabinarylicenseagreement,whichyouareaskedtoagreetobeforeinstallationcanproceed.Onceyouhaveagreedtothelicense,theinstallscriptcreatesandrunsthefilejdk-6u<version>-linux-i586.rpminthecurrentdirectory.
NOTE:IfyouwanttoonlyextracttheRPMfilebutnotinstallit,youcanrunthe.binfilewiththe-xargument.Youdonotneedtoberoottodothis.
4.Deletetherpmfileifyouwanttosavediskspace.
5.Exittherootshell.
6.IfyouwanttouseJavawithinthebrowser,setupthepluginusingtheinstructionsinManualPluginInstallationforLinux.
TheRPMpackagecreatestwolinks:/usr/java/latestand/usr/java/default.
The/usr/java/latestlinkwillalwayspointtotheversionofJavathatisconsideredthelatestversion.Subsequentupgradesofthepackagewilloverwritethisvalueifitisnotthelatestversion.
Bydefault,/usr/java/defaultpointsto/usr/java/latest.However,ifadministratorschange/usr/java/defaulttopointtoanotherversionofJava,subsequentpackageupgradeswillbeprovidedbytheadministratorsandcannotbeoverwritten.
WhentheJDKisinstalled,linkstojavac,jar,andjavadocarealsocreatedapartfromtheJRElinks.Theselinkspointtotheappropriatetoolreferencedby/usr/java/default.ThisallowstheusertoeasilyrunthedefaultversionoftheseJavatools.
Anewservicescript,namedjexec,isaddedto/etc/init.d.ThisscriptallowsuserstodirectlyexecuteanystandaloneJARfilethathasanexecutionpermissionset.ThiscanbedemonstratedusinganexamplefromtheJDK:
cd /usr/java/jdk1.6.0/demo/jfc/SwingSet2 chmod +x SwingSet2.jar ./SwingSet2.jar
http://www.oracle.com/technetwork/java/javase/install-linux-rpm-137089.html