LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Installing Java SDK and Eclipse (https://www.linuxquestions.org/questions/fedora-35/installing-java-sdk-and-eclipse-565103/)

techdawg270 06-28-2007 08:30 AM

Installing Java SDK and Eclipse
 
I have a tar.gz file for the install of Eclipse and rpm.bin for both Java JRE and Java SDK. This will be my first command line install, so I was wondering if somebody might be willing to walk me through it.

Lenard 06-28-2007 08:50 AM

For the jre and jdk rpm.bin files;

chmod +x <the name of the rpm.bin file here>
./<the name of the rpm.bin file here>

FYI: if this is the 32-bit version (i586) of the jdk then the jre is included no reason to install both.

If you are not root when running both commands the second command will create the binary rpm for installation later but the rpm file will not be installed.

techdawg270 06-28-2007 09:53 AM

How do I change directories to my Downloads folder? I figured I could just run the command cd /home/Downloads, but it does not work. The folder is in Dane's Home on my desktop. Another thing, if I did a full install that included the developer's applications, does that mean I already have the necessary development kits to run and compile Java and C++ code?

Lenard 06-28-2007 11:40 AM

Your home directory is /home/username not /home, so try: cd /home/Dane/Downloads

If that fails then do a search for the file(s);

locate <the full downloaded file name here>

Quote:

Another thing, if I did a full install that included the developer's applications, does that mean I already have the necessary development kits to run and compile Java and C++ code?
For the most part yes...

techdawg270 06-28-2007 03:37 PM

Ok I figured out the tar.gz files. That was rather easy, but I am still struggling with these rpm.bin files. I think I am typing the commands right and this is what I get.
[root@localhost Downloads]# chmod +x j2sdk-rpm.bin ./j2sdk-rpm.bin
[root@localhost Downloads]# chmod a+x j2sdk-rpm.bin ./j2sdk-rpm.bin
[root@localhost Downloads]# exit
exit
I tried it the other way too because thats what it said to do on the Java site. It doesn't give me any error messages but nothing happens.

Lenard 06-29-2007 05:00 AM

What???? j2sdk-rpm.bin???? The latest from Sun is; jdk-6u1-linux-i586.rpm.bin
Where are you getting java from???

http://java.sun.com/javase/downloads/index.jsp

http://java.sun.com/javase/6/webnote...ml#install-rpm

techdawg270 06-29-2007 10:00 AM

Ok now I am trying to install jdk-6u1-linux-i586.rpm.bin and although I do not get any error messages, nothing seems to happen.

Lenard 06-29-2007 10:35 AM

After typing: ./jdk-6u1-linux-i586-rpm.bin you should see the License Agreement and you have to press the spacebar a number of time to get to the end then accept the agreement. Here is a step by step after downloading;

Quote:

$ ls -al jdk-6u1-linux-i586-rpm.bin
-rw-rw-r-- 1 lenard lenard 60680996 Jun 29 11:25 jdk-6u1-linux-i586-rpm.bin

$ chmod +x jdk-6u1-linux-i586-rpm.bin
$ ls -al jdk-6u1-linux-i586-rpm.bin
-rwxrwxr-x 1 lenard lenard 60680996 Jun 29 11:25 jdk-6u1-linux-i586-rpm.bin

Since I do not need to install the package I added the switch (-x) to the command;
$ jdk-6u1-linux-i586-rpm.bin -x
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT

<snipping>

For inquiries please contact: Sun Microsystems, Inc., 4150
Network Circle, Santa Clara, California 95054, U.S.A.

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u1-linux-i586.rpm
Extraction of RPM Done.

Done.

$ ls -al jdk-6u1*
-rw-r--r-- 1 lenard lenard 61134405 Mar 14 06:58 jdk-6u1-linux-i586.rpm
-rwxrwxr-x 1 lenard lenard 60680996 Jun 29 11:25 jdk-6u1-linux-i586-rpm.bin
Why I do not need to install the rpm package;

$ rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}.rpm\n" jdk
jdk-1.7.0-ea.x86_64.rpm
$ java -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b14)
Java HotSpot(TM) 64-Bit Server VM (build 1.7.0-ea-b14, mixed mode)

techdawg270 07-03-2007 09:02 AM

Now I have run into another problem. This is the error I am getting.
Do you agree to the above license terms? [yes or no]
y
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u1-linux-i586.rpm
error: can't create transaction lock on /var/lib/rpm/__db.000

Any suggestions on why this is?

Lenard 07-03-2007 04:33 PM

Means you were not root (or equivalent) when you typed the command is all, not a big deal. You should have the rpm package available for installation, as root type;

rpm -Uvh jdk-6u1-linux-i586.rpm

techdawg270 07-03-2007 05:41 PM

thanks Lenard..you helped me out a lot


All times are GMT -5. The time now is 09:30 PM.