Jdk bin package installation problems, jdk bin package

Source: Internet
Author: User
Tags unpack

Jdk bin package installation problems, jdk bin package

Download a Bin for jdk1.7 Installation

However, an error occurred while running java to check the version number after installing and setting the environment:


$ java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Check whether the PATH and CLASSPATH settings are correct. Check whether the lib directory contains tools. jar and jre/lib without rt. jar:

$ ls -al /usr/java/jdk1.7/lib
total 8148
-rw-r--r-- 1 root root 139034 Oct 31 15:08 dt.jar
-rw-r--r-- 1 root root 1161394 Oct 31 15:08 htmlconverter.jar
-rw-r--r-- 1 root root 18381 Oct 31 15:08 ir.idl
-rw-r--r-- 1 root root 429 Oct 31 15:08 orb.idl
-rw-r--r-- 1 root root 1743428 Oct 31 15:08 tools.pack
-rwxr-xr-x 1 root root 145112 Oct 31 15:08 unpack

Replaced by tools. pack and rt. pack.
Use the uppack tool that comes with the lib directory to decompress these two jar files:

$ Cd/usr/java/jdk1.7/lib
$ Unpack tools. pack tools. jar
$ Cd ../jre/lib
$ ../Unpack rt. pack rt. jar
In View:
$ Ls-l/usr/java/jdk1.7/lib/tools .*
-Rw-r -- 1 root 5092901 Oct 31/usr/java/jdk1.7/lib/tools. jar
-Rw-r -- 1 root 1743428 Oct 31/usr/java/jdk1.7/lib/tools. pack
$ Ls-l/usr/java/jdk1.7/jre/lib/rt .*
-Rw-r -- 1 root 26782544 Oct 31/usr/java/jdk1.7/jre/lib/rt. jar
-Rw-r -- 1 root 8684102 Oct 31/usr/java/jdk1.7/jre/lib/rt. pack

Everything is normal when running java:

Java-version

Java version "1.7"

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.