Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.
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.
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.
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/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.