The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Declaring Global Variables in KLD int80h BSD 1 01-21-2008 09:11 AM
Declaring functions in CSH tipsy Shell Programming and Scripting 4 01-22-2007 04:54 PM
Declaring Local Arrays ksh Shell Programming and Scripting 1 02-22-2005 09:16 AM
setting environments xNYx Shell Programming and Scripting 3 03-24-2002 10:03 AM
Crontab Environments SmartJuniorUnix UNIX for Dummies Questions & Answers 4 05-01-2001 02:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2001
v_sharda v_sharda is offline
Registered User
  
 

Join Date: Nov 2001
Posts: 1
Declaring variable environments in .cshrc

Hi All,

I have been trying to set variable environment for the JAVA_HOME but it doesn' work. The path set is as follows

setenv JAVA_HOME "/usr/local/jdk1.3"
setenv PATH $JAVA_HOME/bin
setenv CLASSPATH ${JAVA_HOME}/lib/tools.jar:{JAVA_HOME}/lib/dt.jar
can anyone suggest Me where am I and how can I test this?

Thanks

Vikas
  #2 (permalink)  
Old 09-23-2002
photon's Avatar
photon photon is offline
Registered User
  
 

Join Date: Jul 2002
Posts: 162
First find out what shell you want to use.

If you are using Shell: C-shell, T-Shell
Code:
#Put in file $USER_HOME/.cshrc
setenv JAVA_HOME /home/myname/jdk1.4
setenv CLASSPATH .:/myclasses
setenv PATH $PATH:$JAVA_HOME/bin
If you are using Shell: Bourn, K-Shell
Code:
JAVA_HOME = /home/myname/jdk1.4
CLASSPATH = .:/myclasses
PATH = $PATH:$JAVA_HOME/bin
To find out what shell enter at UNIX prompt.
%echo $SHELL

To run script.
For C Shell (csh):
%source ~/.cshrc
%which java

For ksh, bash or sh:
%. $HOME/.profile
%which java
  #3 (permalink)  
Old 09-23-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Quick correction:
Bourne related shells (sh, bash, ksh, etc...) cannot have a space in the assignment.
For example,
CLASSPATH = .:/myclasses
should be:
CLASSPATH=.:/myclasses
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0