LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-28-2004, 12:49 AM   #1
jjunge
LQ Newbie
 
Registered: Jul 2004
Posts: 1

Rep: Reputation: 0
How to set J2SE SDK environment variables on Fedora 2


I want to be able to compile and run java programs from my /home directory. I have tried setting the environment variables by typing the following in the command prompt:

PATH=$PATH:/usr/java/j2sdk1.4.2_05/bin
JAVA_HOME=/usr/java/j2sdk1.4.2_05
export PATH

It works fine at first. I type

java -version

and it returns:

java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

When I exit the command terminal it no longer works. I type java -version and it returns:

bash: java: command not found

How can I get this to work so I can always run java programs from my /home directory?

Thanks,
John
 
Old 07-28-2004, 02:14 AM   #2
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 30
Environment variables set at the terminal are only set for that given terminal window.

You want to set them in your ~/.bash_profile
 
Old 07-28-2004, 02:27 PM   #3
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
http://www.csfalcon.com/wiki/csfalcon/JavaSDK

Last edited by csfalcon; 06-09-2008 at 02:08 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i set environment variables? guitarfella Slackware 2 12-04-2004 11:05 PM
KDE set environment variables TroelsSmit Linux - Newbie 3 09-06-2004 02:14 PM
How to set environment variables anjaan Linux - General 3 06-10-2004 02:04 PM
set environment variables using GUI? bax Linux - Software 2 04-10-2004 02:42 PM
Help with the currently set environment variables!! apoc013 Linux - Newbie 6 01-21-2004 01:28 AM


All times are GMT -5. The time now is 03:32 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration