No there is not a cron user. the crons are setup on a user per user
basis. The crons will executed using the shell that is set up for the
user that created it and look in /etc/passwrd for the uses environment
and in so doing use that users profile. 
first the system wide /etc/profile 
then the users 
    .bashrc for bash
    .kshrc   for ksh 
    .profile for sh
in their home directory 
any other shell we can assume that the user is of advance enuf lvl to
sort out there own environments and so we don't have to worry about
them.

be very carefull of messing around with the /etc/.profile file ... it is
system wide .... rather only work with ~/.profile or ~/.bashrc or
~/.kshrc dependant on the shell they are using, in the users home
directory.

btw: The . in front of the profile indicates a system hidden file.
(check with ls -l and then again with ls -la  (a = all)) 
It (/etc/profile) is not a bash command but a text file that is the
system wide users profile that is loaded for all users. 

me
solaris system admin : big
java                            : not so big 

thanks for the feed back on the the paths this is exactly what i was
looking for 

the 
'java -version' sanity check i think will turn out to be pure gold
here. 

Thanks a million for ur feed back.


On Wed, 2007-10-03 at 15:57 +0200, Bobby Quinne wrote:

> I think you only need to set the /etc/.profile, since there is
> probably a cron system user. With my limit Solaris experience I don't
> recall seeing a cron user in /home
> 
> As Mike pointed out set the $PATH environment variable. I generally
> end up setting $JAVA_HOME as well. 
> Your example :
> 
> >JAVA_HOME=/usr/java/j2sdk1.4.2; 
> >export JAVA_HOME
> >PATH=$JAVA_HOME/bin:$PATH; 
> >export PATH
> 
> looks correct. Try from your user account running
> 'source /etc/.profile'. That should read an execute .profiles(not sure
> if its a bash command) 
> Enter 'java -version' it should show J2SDK1.4.2_14 as opposed to Java
> 5 version info. Info not environment variables were not overridden.
> 
> On 10/3/07, eddie <[EMAIL PROTECTED]> wrote:
> 
> > Yeah, its java 2 - 1.4.2_14. Any of the java 1.4's would have done
> > for our purposes. In fact, what we installed was a little over the
> > top for us but it was  j2sdk-1_4_2_14-solaris-sparcv9.
> > 
> > Ok 
> > What i have seen so far, with a little help from my friends is the
> > following.
> > 
> > normally three variables have to be set
> > JAVA_HOME
> > PATH
> > CLASSPATH
> > 
> > where CLASSPATH can also be set in the launch script for the
> > application.
> > and  JAVA_HOME is not always used.
> > I am not total sure about the above two things.
> > 
> > for BASH. 
> > export JAVA_HOME=/usr/java/j2sdk1.4.2     <-- example may not be
> > true to ur system
> > export PATH=${JAVA_HOME}/bin:${PATH}   <-- example may not be true
> > to ur system
> > export CLASSPATH=
> > ${JAVA_HOME}/lib/tools.jar:/usr/java/j2sdk1.4.0/jre/lib/rt.jar  <--
> > example 
> > 
> > For SH don't place the varables in ${} and u may have to use the
> > following syntax 
> > JAVA_HOME=/usr/java/j2sdk1.4.2; export JAVA_HOME
> > PATH=$JAVA_HOME/bin:$PATH; export PATH
> > 
> > for ksh the following is used. and dont place variables in ${} there
> > might also be a .kshrc file.
> > set JAVA_HOME=/usr/java/j2sdk1.4.2; export JAVA_HOME 
> > 
> > in BASH this goes to .bashrc
> > in SH or KSH this goes in .profile or .kshrc for KSH
> > 
> > for SH and KSH and I believe BASH, you could also put it
> > in /etc/profile 
> > the /etc/profile is read before the ~/.profile or ~/.bashrc (the ~
> > or $HOME indicates the users home directory) file so that any
> > changes in the users .profile file would take preference over
> > the /etc/profile. 
> > 
> > One might also look at  /etc/skel/.profile or /etc/skel/.bashrc but
> > remember. 
> > /etc/profile is used every time anyone logs in 
> > /etc/skel/.profile or .bashrc is used when a new user is created for
> > the first time. 
> > In any case those two scripts should only be edited by the system
> > admin.
> > 
> > Of course you find the users default shell (used by crontab scripts
> > as well) by checking 
> > cat /etc/passwd | grep <username>
> > 
> > anyway that is my understanding, as it is. 
> > Is this correct ?
> > 
> > Thanks Eddie
> > 
> > On Wed, 2007-10-03 at 08:00 +0200, Bobby Quinne wrote:
> > 
> >         Java 1.14...does this version make sense to anyone else?
> >         Java 2 - 1.4.1_xx perhaps. I cannot imagine SUN shipping
> >         this on SolarisX 
> >         since 1.4.1 has reached EOL according to java.sun.com .
> >         
> >         But in regard to original question,  is there an error s/he
> >         is receiving with Java5? Jars should be upward compatible
> >         with newer VM releases.
> >         
> >         On 10/1/07, Duncan Adams <[EMAIL PROTECTED]> wrote:
> >         
> >         > Hi All
> >         > 
> >         > Wondering if someone can help me.
> >         > 
> >         > I have a Solaris 10 box that has Java 1.14 and Java 5
> >         > installed
> >         > One user has applications that require the Java 1.14. I
> >         > wish to, for this user set up there environment when they
> >         > log in or run from cron to uses the 1.14 binaries and the
> >         > other users of the box to use the Java 5.
> >         > 
> >         > In a nut shell, how would one do this or what should I be
> >         > searching for as I have not had much luck thus far on
> >         > google.
> >         > 
> >         > Thanks for your time
> >         > Duncan. 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

Reply via email to