LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-14-2014, 11:06 AM   #1
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Rep: Reputation: Disabled
How to install Java in Slackware 14.1. on a 32bit machine


Hi guys,I"m newbie in Slackware 14.1.and if anyone can please help me how to install java.I am trying to install jdk accordingly to the instructions on howtos but I don"t know how.I downloaded from oracle website jdk 7u51 and from extra directory from Slackware mirror where the folder java is located but I can"t run it.If anyone can show me step by step how to install java and make a path.Thanks in advance.
 
Old 04-14-2014, 11:10 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
If you can click on a link in my signature (Slackware Documentation Project) and serch for java, you will get a step by step instructions.

Edit: hi and welcome to LQ

Last edited by sycamorex; 04-14-2014 at 11:11 AM.
 
Old 04-14-2014, 01:00 PM   #3
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Original Poster
Rep: Reputation: Disabled
I was following that tutorial and when I put al the files from extra/source/java folder and jdk from Oracle into my Downloads folder then i try to run ./java.SlackBuild /path/to/jdk-7u51-linux-i586.tar.gz and I got -su: ./java.Slackbuild: Is a directory. How do I make it executable?
 
Old 04-14-2014, 01:11 PM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Quote:
Originally Posted by Sasha12 View Post
I was following that tutorial and when I put al the files from extra/source/java folder and jdk from Oracle into my Downloads folder then i try to run ./java.SlackBuild /path/to/jdk-7u51-linux-i586.tar.gz and I got -su: ./java.Slackbuild: Is a directory. How do I make it executable?
Can you paste the exact output of the commands into a post here (wrap it in the 'code' tags)? In other words, try installing it again (run also ls to see what's the contents of the directory) and paste it all here so that we can see where the problem lies.
 
Old 04-14-2014, 04:41 PM   #5
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Original Poster
Rep: Reputation: Disabled
I try again I downloaded jdk Linux x86 for a 32-bit version of Slackware and everything from the extra directory folder java.Then i enter su-,password for root and then
./java.SlackBuild /home/sasa/Downloads/jdk-7u51-linux-i586.tar.gz And i now got this: -su: .java/Slackbuild: No such file or directory.

This is my ls on rootesktop/ Downloads/ Pictures/ Templates/ java.Slackbuild/ readme.txt
Documents/ Music/ Public/ Videos/ libflashplayer.so usr/

And this is on useresktop Downloads Pictures Templates build
Documents Music Public Videos pdf
 
Old 04-14-2014, 05:16 PM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Again, can you copy and paste the terminal output of the following (Exactly as it is - copy and paste, no describing what you did)?

1. su -
2. go to the directory where java.SlackBuild is
3. ls -l
4. ls /path/to/jdk/
5. ./java.SlackBuild /path/to/jdk/jdk-7u7-linux-x64.tar.gz

Follow the steps above in the exact order, select the whole thing in a terminal and paste it here (use the code tags for proper formatting).
 
Old 04-14-2014, 05:36 PM   #7
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,098
Blog Entries: 3

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
Sasha12 I have had very good luck with the Slackware developer Alien Bob's Openjdk it works great for me. And he does a great job keeping it up to date.
http://www.slackware.com/~alien/slackbuilds/openjdk/
 
Old 04-14-2014, 05:47 PM   #8
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Original Poster
Rep: Reputation: Disabled
bash-4.2$ su -
Password:
root@host:~# /home/sasa/Downloads/java.SlackBuild
-su: /home/sasa/Downloads/java.SlackBuild: Permission denied
root@host:~# /home/sasa/Download/
-su: /home/sasa/Download/: No such file or directory
root@host:~# /home/sasa/Downloads/
-su: /home/sasa/Downloads/: Is a directory
root@host:~# ls -l
total 17060
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Desktop/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Documents/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Downloads/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Music/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Pictures/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Public/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Templates/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Videos/
drwxr-xr-x 2 root root 4096 Apr 14 19:29 java.Slackbuild/
-rw-rw-r-- 1 501 501 17422820 Feb 27 00:38 libflashplayer.so
-rw-rw-r-- 1 501 501 4009 Feb 27 00:38 readme.txt
drwxrwxr-x 5 501 501 4096 Feb 27 00:38 usr/
root@host:~# ls /home/sasa/Downloads/jdk-7u51-linux-i586.tar.gz
/home/sasa/Downloads/jdk-7u51-linux-i586.tar.gz
root@host:~# ./java.SlackBuild /home/sasa/Downloads/jdk-7u51-linux-i586.tar.gz
-su: ./java.SlackBuild: No such file or directory
root@host:~# ./java.SlackBuild /home/sasa/Downloads/jdk-7u7-linux-x64.tar.gz
-su: ./java.SlackBuild: No such file or directory
root@host:~#
 
Old 04-14-2014, 06:00 PM   #9
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Ok. It looks like your java.Slackbuild is a directory, not a file.

For simplicity, create a directory where you'll keep all your build files for java.
Download (to this new directory) all the java build files from, for example, here:
http://mirror.bytemark.co.uk/slackwa....1/extra/java/


Copy your jdk .tar.gz archive to the same directory and try to build it again.
 
Old 04-15-2014, 11:01 AM   #10
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Original Poster
Rep: Reputation: Disabled
Sorry for later response..I try again and this is what I get:

bash-4.2$ su -
Password:
root@host:~# /home/sasa/java/
-su: /home/sasa/java/: Is a directory
root@host:~# ls-l
-su: ls-l: command not found
root@host:~# ls -l
total 40
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Desktop/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Documents/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Downloads/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Music/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Pictures/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Public/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Templates/
drwxr-xr-x 2 root root 4096 Mar 28 17:47 Videos/
drwxr-xr-x 2 root root 4096 Apr 15 17:05 java/
drwxrwxr-x 5 501 501 4096 Feb 27 00:38 usr/
root@host:~# ls /home/sasa/java
java.SlackBuild jdk.csh jre.csh slack-desc.jdk
jdk-7u51-linux-i586.tar.gz jdk.sh jre.sh slack-desc.jre
root@host:~# ./java.SlackBuild /home/sasa/java/jdk-7u51-linux.i586.tar.gz
-su: ./java.SlackBuild: No such file or directory
root@host:~#
 
Old 04-15-2014, 01:21 PM   #11
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Try this, not as root:
Code:
mkdir java/profile.d
Then move jdk.sh, jdk.csh, jre.sh, and jre.csh into that directory.
Login as root:
Code:
su -
then:
Code:
cd /home/sasa/java
then:
Code:
chmod +x java.SlackBuild
then:
Code:
./java.SlackBuild
That will/should create a package in /tmp for you to install with installpkg.
 
Old 04-15-2014, 03:11 PM   #12
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Original Poster
Rep: Reputation: Disabled
I successfully installed java package and thank you very much,but now when I reboot I get this message:

bash-4.2$ which java
which: no java in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin)
bash-4.2$

How to set up a path for java,I tried this export JAVA_HOME=/usr/lib/java but I didn"t do it.
 
Old 04-16-2014, 05:39 AM   #13
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Quote:
Originally Posted by Sasha12 View Post
I successfully installed java package
Are you sure you've installed it, and not just created the package?
If you have "successfuly installed it", it would show up with the which java command, like this:
Code:
bash-4.2$ which java
/usr/lib64/java/bin/java
Like I said, a SlackBuild makes a package in /tmp, then you have to run:
Code:
installpkg /tmp/name of package

Last edited by brianL; 04-16-2014 at 05:42 AM.
 
Old 04-16-2014, 11:48 AM   #14
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Also, to check if the package is installed properly, you can issue:

Code:
ls /var/log/packages | grep jdk
jdk-7u51-x86_64-1
 
Old 04-16-2014, 03:40 PM   #15
Sasha12
LQ Newbie
 
Registered: Mar 2014
Location: Croatia
Posts: 16

Original Poster
Rep: Reputation: Disabled
Yes I did make a command installpkg/tmp/java and I have in tmp package java.I don"t know how to make a path for java,I tried the solutions from the forum but nothing.This is from my terminal:

bash-4.2$ ls /var/log/packages | grep jdk
jdk-7u51-i586-1
bash-4.2$ which java
which: no java in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin)
bash-4.2$ whereis java
java: /usr/lib/java /usr/share/java
 
  


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
Possible to install 64bit Fedora on 32bit machine? veeruk101 Linux - Newbie 5 06-01-2012 06:10 PM
Failed to install Slackware 13.37 32Bit on DELL PowerEdge R610 andr0 Slackware - Installation 3 08-01-2011 03:40 PM
[SOLVED] How do I install Java Virtual Machine on Kubuntu 9.04? JosephS Linux - Software 5 08-01-2009 01:16 PM
How to install Java Virtual Machine for Mozilla? JockVSJock Linux - Software 10 05-26-2005 11:16 AM
how can i install java virtual machine red hat-ziggis Linux - Software 1 10-23-2003 12:43 PM


All times are GMT -5. The time now is 04:18 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration