LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-26-2008, 04:40 PM   #1
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Question java


Hi, I'd be glad if you can help me. I can't seem to install java correctly. I want to work on a forex trading program (web based platform) as the normal trading program doesn't want to install at all.
 
Old 11-26-2008, 05:12 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Which distribution? Ubuntu, Fedora, Suse, Mandriva, Debian, ...?
 
Old 11-27-2008, 05:21 AM   #3
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Hey I'm as lost never before, downloaded it from SUN at this page: http://java.com/en/download/linux_ma...&host=java.com

I tried to copy it into /usr/local but copy and paste doesn't work as there isn't a paste option when I right click in that folder. I also can't seem to download it directly into that folder.
 
Old 11-27-2008, 05:58 AM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Well no, all system directories are protected from regular users. They can be accessed only by super users, who have to log in as root first. This involves a bit of command line work but most distributions now come with plug-ins that will let you open protected folders/files by simply selecting an option from the context menu. Packages (like the jdk) can be installed and managed a lot more easily than what you are trying to do if you use the system package manager, which will take care of the download and install for you. Unfortunately, I cannot offer any further details as long as I do not know which distribution you are using.
 
Old 11-27-2008, 09:10 AM   #5
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I'm clueless... how can I check?
 
Old 11-27-2008, 09:21 AM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Try the following commands in a terminal:
cat /etc/issue
or
cat /etc/release

By the way, have you got an administrator account/password? If not, you will have to install the software in your home directory.
 
Old 11-27-2008, 04:46 PM   #7
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Debian GNU/Linux 4.0 \n \l
 
Old 11-27-2008, 07:47 PM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
You can find out which jdk is available by running this command in your terminal:
aptitude search jdk
I believe that the highest Debian 4.0 has to offer is sun-java5-jdk, which is the 1.5.?. version of the sun JDK. If you have an administrator password, you can install it with:
su -
(enter root password)
aptitude install sun-java5-jdk
exit
That is all you need to do.

However, without such a password, you are limited to installing a JDK manually to your home directory. This also means you will have to put up with the inconvenience of configuring things manually (and even then, integration with the system will not be optimal).
Visit sun and get the .bin version of the JDK (the latest stable release is 1.6.10 or so). Extract it by running
chmod +x name_of_downloaded_package
./name_of_downloaded package
Now you need to inform the system that a JDK has been installed. Open your .bash_profile
(if you have gedit, you can run gedit .bash_profile) and add this at the bottom:
export JAVA_HOME=$HOME/name_of_extracted_jdk_directory (should be something like jdk_1.6.10)
export J2RE_HOME=$JAVA_HOME/jre
export JAVA_BIN=$JAVA_HOME/bin
export CLASSPATH=$CLASSPATH:$JAVA_HOME:$JAVA_HOME/lib
export PATH=$JAVA_BIN:$PATH
Save, log out and log in again. Check by running the following commands in your terminal:
echo $JAVA_HOME <- this should point to point to your jdk directory
java -version <- this should show the version of the jdk that you installed

Next, you can install an IDE such as Netbeans or Eclipse.
 
Old 11-28-2008, 09:17 AM   #9
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I have an admin password, but nothing happens when I run aptitude search jdk.

I tried to download a sun-java5-jdk file and then run your commands again but this is what happened:
/home/user/My Documents> su -
Password:
eeepc-pieterler:/root> aptitude install sun-java5-jdk_1.5.0-14-letch1_i386.deb
Reading package lists... Done
Building dependency tree... Done
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
Couldn't find any package whose name or description matched "sun-java5-jdk_1.5.0-14-letch1_i386.deb"
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
 
Old 11-28-2008, 10:30 AM   #10
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Oh, you have an eeepc! You should have mentioned that.
For one thing, because the eeepc does not have Debian as an operating system but Xandros (which is based on Debian). For another thing, because ASUS seems to have decided that it would be a great idea to rip out the package manager. The consequence is that, as you have discovered, aptitude will not work.
To enable as much functionality as possible, I would recommend that you have a look at this:
http://www.r3uk.co.uk/index.php/home...ips-and-tricks

As for installing the jdk package manually, that does not involve any aptitude. Aptitude (or alternatively apt-get) is used to fetch software packages from the on-line software collection for your operating system. If you install things manuallly, then you just need to extract them. If you have a look at my previous post, you will see that I explained it all, from download up to and including configuration.

I would still recommend installing the package through aptitude (or apt-get) over installing manually. You may want to take the alternative approach if you find that Xandros does not offer any JDK. And if you feel more experimental, you could even consider installing a completely different operating system; there are quite a few alternatives that are 100% free, perfectly reliable and a lot more flexible than Xandros.
 
Old 12-03-2008, 08:22 AM   #11
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I'm getting tired of this operating system. I ran all the commands a few times now but nothing seems to work. I copied and pasted all the commands except this one:
/home/user> chmod +x jdk-6u10-linux-i586.bin
/home/user>

Did I type something wrong? jdk-6u10-linux-i586.bin is the file I downloaded from Sun.
 
Old 12-03-2008, 09:04 AM   #12
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Nothing wrong with the chmod command as you posted it. After doing so, you just need to run
./jdk-6u10-linux-i586.bin
(you can just type jdk and then press TAB for auto-completion - providing that the jdk has not been extracted yet during one of your previous attempts, in which case you can skip immediately to the .gedit part).
You will need to accept the license by typing "y", then the jdk directory will be extracted to your home directory.

Then all you need to do is open your .bash_profile (or .profile if Xandros does not use .bash_profile):
gedit .bash_profile (or gedit .profile)
and paste all this at the bottom (do not forget to do the name_of_etc edit):
Quote:
export JAVA_HOME=/home/user/name_of_extracted_jdk_directory <--- replace "name_etc" with actual name of extracted jdk directory, probably "jdk1.6.10"!!!
export J2RE_HOME=$JAVA_HOME/jre
export JAVA_BIN=$JAVA_HOME/bin
export CLASSPATH=$CLASSPATH:$JAVA_HOME:$JAVA_HOME/lib
export PATH=$JAVA_BIN:$PATH
Save, log out and log in.

Now check by entering these into your terminal:
echo $JAVA_HOME
and
java -version

If that does not do it, then yes, I would also get tired of Xandros very soon.

Last edited by jay73; 12-03-2008 at 09:06 AM.
 
Old 12-03-2008, 05:20 PM   #13
Pieter le Roux
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I did, it still doesn't work. wich operating systems were you referring to?

/home/user> ./jdk-6u10-linux-i586.bin
./jdk-6u10-linux-i586.bin: line 1: syntax error near unexpected token `<'
./jdk-6u10-linux-i586.bin: line 1: `<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>'
/home/user>
 
Old 12-03-2008, 06:39 PM   #14
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Those are some really weird error messages, it looks as if the jdk file you downloaded is an html file???

Well, it appears you can get the package manager (synaptic) if you enable full desktop mode; once you have synaptic, you can install the jdk with a few clicks:
http://www.downloadsquad.com/2007/11...urse-in-linux/

As for the other operating systems I was referring to, here is one very popular one:
http://www.eeebuntu.org/ (see download section for details)
Plenty more here (even explains how to install windows if that is what you prefer):
http://wiki.eeeuser.com/#installing_operating_systems
 
  


Reply



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
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 02:13 AM
Ubuntu 7.10 64bit - how to set java path to/redirect java to libjvm.so ? Thane Ubuntu 1 03-25-2008 05:52 PM
LXer: Java news met with cautious optimism in free Java community LXer Syndicated Linux News 0 11-14-2006 10:21 PM
Firefox refuses to load Java jnlp files - plugin and java ok Melsync Linux - Software 1 06-25-2006 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:49 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
Open Source Consulting | Domain Registration