Ubuntu8.04JDK6.0 Installation Problems

Source: Internet
Author: User
Ubuntu8.04JDK6.0 installation problems-general Linux technology-Linux programming and kernel information, the following is a detailed description. My younger brother is depressed when using windows, so I want to use Linux to install ubuntu8.04 today (the first time I used linux OS) And then I want to install JDK to learn JAVA.

Install JDK in/usr/local/lib/jdk1.6.0 _ 10.
The profile configuration file is as follows:
#/Etc/profile: system-wide. profile file for the Bourne shell (sh (1 ))
# And Bourne compatible shells (bash (1), ksh (1), ash (1 ),...).

If [-d/etc/profile. d]; then
For I in/etc/profile. d/*. sh; do
If [-r $ I]; then
. $ I
Fi
Done
Unset I
Fi

If ["$ PS1"]; then
If ["$ BASH"]; then
PS1 = '\ u @ \ h: \ w \ $'
If [-f/etc/bash. bashrc]; then
./Etc/bash. bashrc
Fi
Else
If ["'id-U'"-eq 0]; then
PS1 = '#'
Else
PS1 = '$'
Fi
Fi
Fi
Export JAVA_HOME =/usr/local/lib/jdk1.6.0 _ 10
Export PATH = $ JAVA_HOME/bin; $ PATH
JRE_HOME =/usr/local/lib/jdk1.6.0 _ 10/jre
Export CLASSPATH =.; $ JAVA_HOME/lib/dt. jar; $ JAVA_HOME/lib/tools. jar; $ JRE_HOME/lib; $ ClASSPATH
Export JRE_HOME
Umask 022

Save and exit

Enter java-version and the result is as follows:

The 'java' program is included in the following software packages:
* Java-gcj-compat-headless
* Openjdk-6-jre-headless
* Cacao
* J2re1.4
* Kaffe
* Jamvm
* Gij-4.1
* Gij-4.2
* Sablevm
Try: sudo apt-get install <选定的软件包>
Bash: java: Command not found


If source/etc/profile is input first, the output is
Bash:/usr/local/lib/jdk1.6.0 _ 10/bin: A directory
Bash:/usr/local/lib/jdk1.6.0 _ 10/lib/dt. jar: Permission denied
Bash:/usr/local/lib/jdk1.6.0 _ 10/lib/tools. jar: Permission denied
Bash:/usr/local/lib/jdk1.6.0 _ 10/jre/lib: A directory
Input java-version to output
Java version "1.6.0 _ 10-beta"
Java (TM) SE Runtime Environment (build 1.6.0 _ 10-beta-b23)
Java HotSpot (TM) Client VM (build 11.0-b11, mixed mode, sharing)
However, after logging out, you cannot enter GNOME. An error is prompted. I wrote down the key points.
Beginning session setup:
/Etc/profile 28/usr/local/lib/jdk1.6.0 _ 10/bin Permission denied
/Etc/profile 30/usr/local/lib/jdk1.6.0 _ 10/lib/dt. jar
/Etc/profile 30/usr/local/lib/jdk1.6.0 _ 10/lib/tools. jar: Permission denied
/Etc/profile 30/usr/local/lib/jdk1.6.0 _ 10/jre/lib Permission denied
/Etc/TPD/xsession 178: grep: not found
/Etc/TPD/xsession 191: ls: not found
/Etc/TPD/xession Executing faild
In addition, there are several lines of error messages .. Is there any hero who can help solve the problem .. After checking for two days, baidu has not been resolved...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.