LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2014, 07:50 AM   #1
manalisharmabe
Member
 
Registered: Dec 2010
Posts: 242

Rep: Reputation: 1
How to install java (jdk 1.7) package to different directory on Linux ?


Hi Guys,

I need to install new java version
on Linux system 64 bit in different directory.

I need to install this version:-
Code:
 rpm -qip jdk-7u51-linux-x64.rpm
Name        : jdk                          Relocations: /usr/java
Version     : 1.7.0_51                          Vendor: Oracle Corporation
Release     : fcs                           Build Date: Thu 19 Dec 2013 04:30:24 AM CET
Install Date: (not installed)               Build Host: jdk7-lin-amd64
Group       : Development/Tools             Source RPM: jdk-1.7.0_51-fcs.src.rpm
Size        : 201995347                        License: http://java.com/license
Signature   : (none)
Packager    : Java Software <jre-comments@java.sun.com>
URL         : URL_REF
Summary     : Java Platform Standard Edition Development Kit
Description :
The Java Platform Standard Edition Development Kit (JDK) includes both
the runtime environment (Java virtual machine, the Java platform classes
and supporting files) and development tools (compilers, debuggers,
tool libraries and other tools).

The JDK is a development environment for building applications, applets
and components that can be deployed with the Java Platform Standard
Edition Runtime Environment.
[mahadis@amsledi301 ~]$ rpm --prefix=/usr/newjava/ jdk-7u51-linux-x64.rpm
rpm: --prefix may only be used when installing new packages
I have created separate folder for its installation:

/usr/newjava

but when I try to install it says:

Code:
 rpm --prefix=/usr/newjava/ jdk-7u51-linux-x64.rpm
rpm: --prefix may only be used when installing new packages
current version of java is:-
Code:
> java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
Please advise me as how to installed already installed package into diffrent folder.

Thanks a lot.
 
Old 04-10-2014, 11:29 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
Blog Entries: 1

Rep: Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075
You can download jdk-7u51-linux-x64.tar.gz and extract it to a directory of your liking
 
1 members found this post helpful.
Old 04-10-2014, 11:42 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,681

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
What Operating system is this ?
from the "rpm" it is one of the redhat based systems

you can install 1.7 side by side with OLD and unsupported 1.6
BUT
you will need to set " alternatives" to use the one you want

CentOS 6.5 has BOTH the old 1.6 and the newer 1.7 in the repos

Code:
yum search java

Last edited by John VV; 04-10-2014 at 11:44 AM.
 
1 members found this post helpful.
Old 04-11-2014, 06:13 AM   #4
manalisharmabe
Member
 
Registered: Dec 2010
Posts: 242

Original Poster
Rep: Reputation: 1
Thanks a lot Guys.

I did this.

Code:
 tar -xvf ~user1/try/jdk-7u51-linux-x64.tar.gz -C jdk1.7.0_51
and this is relocatable package.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Building Java JDK package ethereal1m Slackware 10 07-29-2011 07:07 AM
How to install Java jdk and jre in linux BuhRock Linux - Newbie 2 03-27-2011 04:28 PM
how do I install java jdk on slackware rob.rice Slackware 4 12-18-2010 05:00 PM
JDK package in Slackware 13.0 /extras directory not working. c0mpm5tr Slackware 3 09-11-2009 08:59 PM
JPackage Java compatibility package for Sun's JDK satimis Programming 2 04-28-2005 09:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration