java_home

JAVA_HOME ,PATH SET GLOBALLY

PATH


export JAVA_HOME=/apps/jdk/jdk1.8.0_191
export PATH=$JAVA_HOME/bin:$PATH

Add the above lines in the /etc/profile just below comments.

$vi /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

after the end of comments like above set the path. write the JAVA_HOME,PATH here.

/etc/profile needs root or admin access.if you are the admin then use sudo.

for example
sudo  vi /etc/profile.
go to root
$password.
$vi /etc/profile.

logout and login again, reboot,

or enter the below command
$source /etc/profile


to apply changes immediately in your current shell.

to know the version of java you set

$java -version
it should display your java set version.

Weblogic Environment

Below paths are required for weblogic environment.Add these paths like above in  /etc/profile.
CLASSPATH=C:\oracle\weblogic10.3.6\wlserver\server\lib\weblogic.jar
 JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
PATH=C:\Program Files\Java\jdk1.8.0_191\bin
WL_HOME=C:\oracle\weblogic10.3.6\wlserver

Shortcuts and weblogic Environment


step 1:execute
sudo vi /etc/profile
step2: Add the below lines in profile file after noticing end of comments.
export JAVA_HOME=/apps/jdk/jdk1.8.0_191
export PATH=$JAVA_HOME/bin:$PATH
export WL_HOME=/apps/weblogic/wlserver
export CLASSPATH=/apps/weblogic/wlserver/server/lib/weblogic.jar:.
alias wlst="java weblogic.WLST"
alias start='/apps/weblogic/user_projects/domains/infra_domain/bin/startWebLogic.sh'
alias l='ls -lrt'
alias stop='/apps/weblogic/user_projects/domains/infra_domain/bin/stopWebLogic.sh'
alias jpid='ps -ef|grep java'
alias nm='/apps/weblogic/user_projects/domains/infra_domain/bin/startNodeManager.sh'
alias ms1='/apps/weblogic/user_projects/domains/infra_domain/bin/startManagedWebLogic.sh Weblogic_Server_1 http://inddlvtwlmas01.weblogic.net:7001/'
alias ms2='/apps/weblogic/user_projects/domains/infra_domain/bin/startManagedWebLogic.sh Weblogic_Server_2 http://inddlvtwlmas01.weblogic.net:7001/'
alias c='clear'


Optional java environment set

set java in ibm

set java in ibm Set JAVA_HOME using the syntax export JAVA_HOME=path to JDK. For example, export JAVA_HOME= /usr/java/jdk1.7.0_05/. Set PATH using the syntax export PATH=${PATH}:path to the JDK bin. For example, export PATH=${PATH}:/usr/java/jdk1.7.0_05/bin Verify the settings using the following commands:
echo $JAVA_HOME
echo $PATH

Note:The output must display the JAVA_HOME and PATH that you set.

Comments

Popular posts from this blog

Bsu

linux

Domain