PDA

View Full Version : Install sun's java documentation



ultimate_aektzis
June 4th, 2008, 07:42 PM
Hi everybody.I think my question is very simple for you.I have downloaded java documentation from sun and I cant find a way to install it so that I can use it while programming at Eclipse IDE.To be more specific I want to write

System.
and when I press . to see a drop down menu with the class methods.I would be very grateful if you can help me with this simple thing

mike_g
June 4th, 2008, 07:57 PM
This thread:
http://ubuntuforums.org/showthread.php?t=641736
Post #4 did the trick for me.

ultimate_aektzis
June 5th, 2008, 10:56 AM
I opened the terminal window wrote sudo apt-get sun-java6-doc but it produced some strange warnings and installation not completed
I followed those instuctions but anything happened:(:(

http://www.cis.upenn.edu/~matuszek/General/Pages/eclipse-faq.html#api_javadoc

geirha
June 5th, 2008, 11:56 AM
You forgot the install keyword, so it should be
sudo apt-get install sun-java6-doc If it asks for the jdk-6-doc.zip, go to http://java.sun.com/javase/downloads/ and download the documentation to your Desktop. Then move it to /tmp and change ownership as the information suggests. Like this:

DESKTOP=`xdg-user-dir DESKTOP`
sudo mv "$DESKTOP/jdk-6-doc.zip" /tmp/
sudo chown root:root /tmp/jdk-6-doc.zip

If it fails, paste the output here and we might be able to identify the problem.

ultimate_aektzis
June 5th, 2008, 02:43 PM
ok I ve done it and this is the output.What's next??
Note that some of the output is in greek but dont mind.Its just the process of the command execution


periklis@p:~$ sudo apt-get install sun-java6-doc
[sudo] password for periklis:
Ανάγνωση Λιστών Πακέτων... Ολοκληρώθηκε
Κατασκευή Δένδρου Εξαρτήσεων
Reading state information... Ολοκληρώθηκε
το sun-java6-doc είναι ήδη η τελευταία έκδοση.
Τα ακόλουθα πακέτα που εγκαταστάθηκαν αυτόματα και δεν χρειάζονται πια:
libseda-java libcommons-cli-java circuslinux-data etw-data
libcommons-lang-java
Χρησμοποιήστε το 'apt-get autoremove' για να τα απομακρύνετε
0 αναβαθμίστηκαν, 0 νέο εγκατεστημένα, 0 θα αφαιρεθούν και 0 δεν αναβαθμίζονται.
1 μη πλήρως εγκατεστημένα ή αφαιρέθηκαν.
After this operation, 0B of additional disk space will be used.
Γίνεται εγκατάσταση sun-java6-doc (6-06-0ubuntu1) ...
This package is an installer package, it does not actually contain the
JDK documentation. You will need to go download one of the
archives:

jdk-6-doc.zip jdk-6-doc-ja.zip

(choose the non-update version if this is the first installation).
Please visit

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

now and download. The file should be owned by root.root and be copied
to /tmp.

[Press RETURN to try again, 'no' + RETURN to abort]
This package is an installer package, it does not actually contain the
JDK documentation. You will need to go download one of the
archives:

jdk-6-doc.zip jdk-6-doc-ja.zip

(choose the non-update version if this is the first installation).
Please visit

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

now and download. The file should be owned by root.root and be copied
to /tmp.

[Press RETURN to try again, 'no' + RETURN to abort] DESKTOP=`xdg-user-dir DESKTOP`
This package is an installer package, it does not actually contain the
JDK documentation. You will need to go download one of the
archives:

jdk-6-doc.zip jdk-6-doc-ja.zip

(choose the non-update version if this is the first installation).
Please visit

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

now and download. The file should be owned by root.root and be copied
to /tmp.

[Press RETURN to try again, 'no' + RETURN to abort]
This package is an installer package, it does not actually contain the
JDK documentation. You will need to go download one of the
archives:

jdk-6-doc.zip jdk-6-doc-ja.zip

(choose the non-update version if this is the first installation).
Please visit

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

now and download. The file should be owned by root.root and be copied
to /tmp.

[Press RETURN to try again, 'no' + RETURN to abort] no
Abort installation of JDK documentation
dpkg: σφάλμα στην επεξεργασία του sun-java6-doc (--configure):
η υποδιεργασία post-installation script επέστρεψε κατάσταση λάθους 1
Προέκυψαν σφάλματα κατά την επεξεργασία του:
sun-java6-doc
E: Sub-process /usr/bin/dpkg returned an error code (1)
periklis@p:~$ DESKTOP=`xdg-user-dir DESKTOP`
periklis@p:~$ udo mv "$DESKTOP/jdk-6-doc.zip" /tmp/
Το πρόγραμμα 'udo' δεν είναι αυτή τη στιγμή εγκατεστημένο. Μπορείτε να το εγκαταστήσετε πληκτρολογώντας:
sudo apt-get install udo
bash: udo: command not found
periklis@p:~$ sudo mv "$DESKTOP/jdk-6-doc.zip" /tmp/
periklis@p:~$ sudo chown root:root /tmp/jdk-6-doc.zip
periklis@p:~$

geirha
June 5th, 2008, 05:20 PM
Ok, I was unclear on that point. The code to copy the jdk-6-doc.zip file to /tmp as apt-get instructed,

DESKTOP=`xdg-user-dir DESKTOP`
sudo mv "$DESKTOP/jdk-6-doc.zip" /tmp/
sudo chown root:root /tmp/jdk-6-doc.zip
should've been run in a different terminal when the message

JDK documentation. You will need to go download one of the
archives:

jdk-6-doc.zip jdk-6-doc-ja.zip

(choose the non-update version if this is the first installation).
Please visit

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

now and download. The file should be owned by root.root and be copied
to /tmp.

[Press RETURN to try again, 'no' + RETURN to abort]
was showing on the apt-get command. If you still have the zip-file in /tmp now, it should work if you run
sudo apt-get install sun-java6-doc again. If you've rebooted meanwhile, all files in /tmp has been deleted, so download the file and move it to /tmp again, before running apt-get then.

ultimate_aektzis
June 5th, 2008, 09:38 PM
Hmm.No results.It claims that is unable to unlock.:(


E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

bobhonea
March 24th, 2009, 07:06 PM
I used the Package Manager to do this job, and left it open while working to download and chown, etc. I got the "lock" message.

The message about the lock on the Admin Directory happened to me because the Synaptic Package Manager was open. Funny thing is, you need it open to finish the job....

0. exit the Package Manager.
1. Get the Java Document Package you need (1.5, or 1.6) from sun.
2. Open a terminal and move them into /tmp.
3. use chown to make root their owner (chown root:root <zipfile name>
4. if installing Java6 docs, rename the zipfile (jdk-6u10-doc.zip, in my case) to jdk-6-doc.zip.

5. Open the Package Manager.
a) if the Package manager 'thinks' our java-docs are installed, or partially installed, go through the process to remove them.
b) select the checkbox for the java docs you want to install.
c) the install should go forward when you "apply", ending with an advisory that you can delete the zipfile from /tmp...(do with them what you will....for they are just a hollow shell...)

Albert Net
November 24th, 2009, 06:08 PM
Very detailed instruction. I managed to install java documentation. At least, it doesn't give me error.
How can I use it in eclipse?

Pooven
November 27th, 2009, 10:42 AM
Try reading this post: http://ubuntuforums.org/showthread.php?t=476280 and the 2nd post will tell you how to configure eclipse to use the Java docs.

Though, for me, I just added '/usr/lib/jvm/java-6-sun' to the docs path in Netbeans.