Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install JDK

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to install JDK, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

The easy way is to run msconfig, which shows a utility

You can set up here:

The setting items are as follows:

JAVA_HOME=L:JavaJ2SE / / the directory where you installed J2SE

/ / classpath settings, see

Classpath=.;%JAVA_HOME%lib ools.jar

Path=....;%JAVA_HOME%in

B) Windows 2000 (I don't have XP, who does, please follow):

Open the system settings, press Winkey+Break or right-click "my computer", select Properties, select Advanced-> system Environment.

Add the following settings in the first column:

JAVA_HOME=L:JavaJ2SE / / the directory where you installed J2SE

/ / classpath settings, see

Classpath=.;%JAVA_HOME%lib ools.jar

Path=.;%JAVA_HOME%in

This completes the installation of J2SE. If you want to add a jar file, you can do it in three ways:

one. System settings.

two. Set parameters at run time.

three. Copy your jar file to% JAVA_HOME%jrelibext.

The jre here is java runtime environment. It can be set in the control panel.

Considerations for installation on the Linux operating system.

When installing JDK (Java Development Kit) or JRE (Java Runtime Environment)

The default installation path for this Redhat package file is / usr/java.

If you want to install in another path, such as / usr/local/home directory, the instructions to install are as follows:

Rpm-I-- badreloc-- relocate / usr/java=/usr/local/home j2sdkj2sdk-

1_4_0-beta3-linux-i386.rpm

If installed in the default path, the instructions to be typed are:

Rpm-ivh j2sdk-1_4_0-beta3-linux-i386.rpm

Then set / etc/profile

# / etc/profile

# System wide environment and startup programs, for login setup

# Functions and aliases go in / etc/bashrc

# Path manipulation

JAVA_HOME=/usr/java/j2sdk1.4.0

CLASSPATH=/usr/java/j2sdk1.4.0/lib/tools.jar:/usr/java/j2sdk1.4.0

/ lib/dt.jar:.:/root/myjava:/home/captain/myjava:/home/ocean/myjava

PATH=$PATH:$HOME/bin:.:/usr/java/j2sdk1.4.0/bin

If [`id-u` = 0] & &! Echo $PATH | / bin/grep-Q "/ sbin"; then

PATH=/sbin:$PATH

Fi

If [`id-u` = 0] & &! Echo $PATH | / bin/grep-Q "/ usr/sbin"; then

PATH=/usr/sbin:$PATH

Fi

If [`id-u` = 0] & &! Echo $PATH | / bin/grep-Q "/ usr/local/sbin"

; then

PATH=/usr/local/sbin:$PATH

Fi

If! Echo $PATH | / bin/grep-Q "/ usr/X11R6/bin"; then

PATH= "$PATH:/usr/X11R6/bin"

Fi

# No core files by default

Ulimit-S-c 0 > / dev/null 2 > & 1

USER= `id-un`

LOGNAME=$USER

MAIL= "/ var/spool/mail/$USER"

HOSTNAME= `/ bin/ hostname`

HISTSIZE=1000

If [- z "$INPUTRC"-a!-f "$HOME/.inputrc"]; then

INPUTRC=/etc/inputrc

Fi

Export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

Export JAVA_HOME CLASSPATH

For i in / etc/profile.d/*.sh; do

If [- r $I]; then

. $I

Fi

Done

Unset i

Export QT_XFT=1

Thank you for reading this article carefully. I hope the article "how to install JDK" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report