Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

installing java sdk on linux

  Asked By: Grant    Date: Aug 04    Category: Java    Views: 999
  

I am new linux user(Debian 4).I want to install java ee 5 sdk on debian.
there is two way :
1. making debian package from binary file
2.installing j2ee sdk directly from binary file.
My question are :
1-which would better?
2-how can i set enviroment variable(PATH,JAVA_HOME,etc)?
i have pronblem to setting PATH enviroment variable in debian(i tryied to change PATH variable with
1.changing .bash_profile
2.changing /etc/profile
3.using source command
) but , i couldn`t setting enviroment variables.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Hehet Chalthoum     Answered On: Aug 04

installing j2ee sdk  directly from binary  file is easier for novice users

in linux  (and most Unix like systems) you can set  environment variable  like this:
export VARIABLE_NAME=VALUE

for example:
export JAVA_HOME=/user/arash_r/bin/java

you can check environment variable values using echo command
echo $VARIABLE_NAME

for example
echo $JAVA_HOME

path is path  in most linux distributions and is case sensitive

in Debian linux for making  variables persistence during reboots
you can define them in:

There is NO DEFAULT WAY of setting  the variables  in Debian, but you may use the /etc/environment file  that can be parsed in scripts that use bourne compatible shells (like bash).

LANG=de_DE
LC_MESSAGES=en_US

Now, this file may be parsed by /etc/profile adding following line there:

. /etc/environment

the above is copyied from "Debian Maintenance HOWTO"

wish you best
and happy java  experience over Linux

P.S.
can I know where are you using Java and Linux?

 
Answer #2    Answered By: Sean Grant     Answered On: Aug 04

Installing JDK is pretty easy from linux  GUI. If you have ubuntu which is debian base, or you have another linux distributor which has Synaptic Package Manager, you can search for JDK and then install  it.

If you do not want to use Synaptic Package Manager or you do not have it, you should download JDK with bin extension and install it in this way:
#./jdk-1_5_0_04-linux-i586.bin

After that, you should set  your PATH and CLASSPATH in this way:
export PATH=/home/<user>/jdk1.5.0_04/bin
export CLASSPATH=/home/<user>/jdk1.5.0_04/lib

Also you can read install.html and system-configurations.html in java  web site.

 
Didn't find what you were looking for? Find more on installing java sdk on linux Or get search suggestion and latest updates.




Tagged: