It's better to set them in one of the /etc/profile files (for all users) or one of the individual user's profile files as Mohamed Sanaulla's link instructs.
Solaris is not Linux, in case you were thinking it is.