[Solved] Loading user profile


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Loading user profile
# 1  
Old 11-23-2012
[Solved] Loading user profile

I need some help on solaris, setting java path:

Code:
$ PATH=/var/tmp/jdk1.5.0_22/jre/bin
$ export PATH
$ java -version

I got the correct version for the application to run, which is:

Code:
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Server VM (build 1.5.0_22-b03, mixed mode)


But if I log out, and log in again, I got this:

Code:
 java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

which is not what I want.

Please can you help me to set the correct java version?

FR
# 2  
Old 11-23-2012
You closed the shell where you exported it from, so it's lost. Put it into your .profile or your shells environment file.
The way you set your PATH you might be overwriting paths that have been set besides the way to your Java. You should check your PATH before you overwrite it or you might not be able to call some commands you expect to work.
# 3  
Old 11-23-2012
Loading User profile

Yes, thatīs right, because I was unable do an
Code:
ls

This is a fresh installation, there is nothing yet, I only copy
Code:
.bash_profile

from another server to this one.
Do I have to create a :
Code:
.profile

file?
Apart from root, there is only one user, and I created the user with its home directory, and in it, there are:
Code:
$ pwd
/moneta_home
$ ls -al
total 24
drwxr-xr-x   3 root     root         512 Nov 24 16:41 .
drwxr-xr-x  37 root     root        1024 Nov 24 12:29 ..
-rw-r--r--   1 moneta   staff       1374 Nov 24 15:50 .bash_profile
drwx------   2 root     root        8192 Oct 24 11:16 lost+found
$

the .bash_profile, I copied from another server.

Please help.

FR
# 4  
Old 11-23-2012
And what shell are you using for that user or yourself, and more what OS are we dealing with?
# 5  
Old 11-23-2012
If bash is this users shell and .bash_profile isn't being noticed at all, you can try to use .profile instead/additionally.
But accordingly to the man page of bash, .bash_profile should work. Just put a "echo hello" in there and log off and in again to try it out.
Since we don't know what's inside your .bash_profile, we can't say if it works or not.
# 6  
Old 11-24-2012
Loading User profile

Hi

I am using:
Code:
$ echo $SHELL
/bin/sh
$

and the O.S. is solaris 10
# 7  
Old 11-26-2012
Loading User profile

Hi!

Please can I have some help on this, I dont have much experience on sys admin, I am comming from Harware Support background.

As a said before, its fresh installation, Its solaris 10 system, no user profile has been created yet, apart from a file that I was asked to copy from other system which is .bash_profile, I can post the contents of that file, if you want.


FR

---------- Post updated at 05:12 PM ---------- Previous update was at 09:38 AM ----------

Hi

I have managed to solve this:

Code:
# rm /usr/bin/java
# ln -s /usr/jdk/jdk1.5.0_22/bin/java /usr/bin/java
# ls -ld /usr/bin/java
lrwxrwxrwx   1 root     root          29 Nov 27 17:01 /usr/bin/java -> /usr/jdk/jdk1.5.0_22/bin/java
# java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Server VM (build 1.5.0_22-b03, mixed mode)

 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

RHEL 6 SAMBA PDC not loading user's profile

Hi all I am facing a problem. I have configured SAMBA PDC on RHEL 6. Everything is going very smooth. Users are being logged in properly & their network drives (i-e; z: drives) are being shown. But either i login to Windows XP or Windows 7, user's profile does not get loaded. I get an error... (0 Replies)
Discussion started by: Yawar_Aziz
0 Replies

2. UNIX for Dummies Questions & Answers

Copying the .profile of one user to another.

I want to copy .Profile file from user1 homedirectoryto user2 homedirectory in Aix. Please help me with the process. (4 Replies)
Discussion started by: Laxxi
4 Replies

3. UNIX for Dummies Questions & Answers

[Solved] $HOME/.profile

what is the functionality of $HOME/.profile? (4 Replies)
Discussion started by: momhef4
4 Replies

4. UNIX for Dummies Questions & Answers

login profile[solved]

i vi .profile Set DATE `date +%m%d%Y%H%M`, but after logout/login, echo $DATE, it shows: Fri Mar 23 15:01:53 EDT 2012, i want to show: 032320121501 please ignore. vi /etc/profile, and export DATE=`date +%m%d%Y%H%M`, worked fine now. (0 Replies)
Discussion started by: lawsongeek
0 Replies

5. Solaris

[solved] Jumpstart Profile Issue

I have created profile file for zfs root (flash) on a wanboot server when i try to validate the rules file with check i get following error .. i 'm not sure why i 'm getting this error .. can any one help me on this ? # ./check Validating rules... Validating profile profile... Error in... (0 Replies)
Discussion started by: fugitive
0 Replies

6. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

7. UNIX for Dummies Questions & Answers

refresh user profile

Scenario: a non-root user is under primary group "devel" and I change their primary group to "nondevel"; I then want to be able to give the user a command which refreshes their user profile so that any new files created under their session are assigned to the new group. What is the command for... (1 Reply)
Discussion started by: dhinge
1 Replies

8. UNIX for Dummies Questions & Answers

User Profile

Hi Guys, Im really new with this stuff...could anybody help to guide me ...how do i change/edit user profiile ? (2 Replies)
Discussion started by: gagasan_makmur
2 Replies

9. Shell Programming and Scripting

User profile

Sorry to I am not familiar with script writing , attach is the /etc/profile in my system , we have limit each user can only have one login in the system . When the user login , if the system found the user have a dead process in the system , the system will confirm the user to kill the previous... (1 Reply)
Discussion started by: ust
1 Replies
Login or Register to Ask a Question