Set environment
DB version: 11.2
OS version:Aix
I am trying to set env in .profle or oraenv. However, the session gets exit abruptly.
Below is the .profile file.
# Sun OS or HP-UX or AIX Enviropnment Settings:
case `uname -s` in
SunOS) export awk=/usr/xpg4/bin/awk
export grep=/usr/xpg4/bin/grep
export egrep=/usr/xpg4/bin/egrep
export sed=/usr/xpg4/bin/sed
export test=/usr/xpg4/bin/test
export sendmail=/usr/lib/sendmail
export EDITOR=/usr/xpg4/bin/vi
export ORATAB=/var/opt/oracle/oratab
HP-UX) export awk=/usr/bin/awk
export grep=/usr/bin/grep
export egrep=/usr/bin/egrep
export sed=/usr/bin/sed
export test=/usr/bin/test
export sendmail=/usr/sbin/sendmail
export EDITOR=/bin/vi
export ORATAB=/etc/oratab
AIX) export awk=/usr/bin/awk
export grep=/usr/bin/grep
export egrep=/usr/bin/egrep
export sed=/usr/bin/sed
export test=/usr/bin/test
export sendmail=/usr/sbin/sendmail
export EDITOR=/bin/vi
export ORATAB=/etc/oratab
export AIXTHREAD_SCOPE=S
esac
# Check if oracle recieved UNIX mail
if [ -s "$MAIL" ] # This is at Shell startup. In normal
then
echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
# Alter default paths
export MANPATH=$MANPATH:/usr/man:/usr/local/man
PATH=$PATH:/usr/bin:/usr/sbin:/usr/ucb:/etc:/bin:/usr/local/bin:/usr/ccs/bin:.
export PATH
# Establish UNIX prompt
PS1=`hostname`':$LOGNAME->$PWD> '
export PS1
# Telnet customization parameters
stty istrip
stty erase ^h
stty erase
stty cols 140
# Terminal Type
export TERM=vt220
# SET default editor to VI ;; SET default security level to 022
set -o vi
umask 027
# Paths for Batch Environments
export APPS=/apps
export APPBATCH=${APPS}/app_batch
export DBBATCH=${APPS}/db_batch
export COMMON=${DBBATCH}/common
export GENERIC=${DBBATCH}/generic
# Oracle Environment Settings (using first SID in oratab file)
ORACLE_SID=`cat ${ORATAB} | egrep ':N|:Y' | grep -v \* | cut -f1 -d':'`
export ORACLE_SID=`echo ${ORACLE_SID} | cut -f1 -d' '`
if [ ${ORAENV_ASK:-0} = 0 ]
then
export ORAENV_ASK=NO
fi
. oraenv
# Paths for Oracle Environments
export BACKUP=${DBBATCH}/${ORACLE_SID}/backup
export RESTART=${DBBATCH}/${ORACLE_SID}/restart
# SET aliases:
alias dbp='ps -fu oracle | sort -k 1.48'
alias ls='ls -lart'
alias oh='cd ${ORACLE_HOME}'
alias CRS01D='export ORACLE_SID=CRS01D; export ORAENV_ASK="NO";. oraenv;'
# SHELL FUNCTIONS
# dfm () prints a format version of the df -k command using MB instead of KB
dfm ()
df -k | nawk '/Filesystem/ {printf "%25s %11s %11s %11s %7s\n", \
"Filesystem","Total MB","Free MB","Used MB","%Used";}
/\// {printf "%25s %11.1f %11.1f %11.1f %7s\n", \
$1, $2/1024, $3/1024, ($2-$3)/1024, $4;}'
# diskhog () prints a formatted list of the space used by each directory
# It obtains this by using the total blocks (1 block = 512 bytes = 0.5 KB)
# listed after each directory in the ls -lR command
diskhog ()
ls -lR ${1} | nawk '/total/ { printf "%7i MB %10i KB %-40s\n", $2/2048, $2/2, dir }
/:/ { dir = $1; } '
clear
echo ""
echo "########################################################################"
echo "# The following commands are now available: #"
echo "########################################################################"
echo "##### Directory Paths: ################################################"
echo ""
echo " Based on Oracle SID = ${ORACLE_SID}"
echo ""
echo " cd \${ORACLE_HOME} = cd ${ORACLE_HOME}"
echo " cd \${APPBATCH} = cd ${APPBATCH}"
echo " cd \${DBBATCH} = cd ${DBBATCH}"
echo " cd \${COMMON} = cd ${COMMON}"
echo " cd \${GENERIC} = cd ${GENERIC}"
echo ""
echo " cd \${BACKUP} = cd ${DBBATCH}/${ORACLE_SID}/backup"
echo " cd \${RESTART} = cd ${DBBATCH}/${ORACLE_SID}/restart"
echo " cd \${DATAGAURD} = cd ${DBBATCH}/${ORACLE_SID}/dataguard"
echo ""
echo " cd \${ARCHIVE} = cd /uB04/oraarchive/${ORACLE_SID}"
echo " cd \${BACKUP_PATH} = cd /uB05/orabackup/${ORACLE_SID}"
echo ""
echo "##### Aliases: ########################################################"
echo ""
echo " ls = ls -lart"
echo " oh (oracle home) = cd ${ORACLE_HOME}"
echo ""
echo "##### Functions: ######################################################"
echo ""
echo " dbp = listing of all oracle processes"
echo " dfm = formatted version of df -k using MB"
echo " diskhog = listing of directories and disk space usage"
echo ""
echo "########################################################################"
echo ""
==============================
Trying to enter this value...
ORACLE_SID=test
ORACLE_HOME=/u01/apps/oracle/product/11.2.0
ORACLE_BASE=/u01/apps/oracle
ORAENV_ASK=NO
export ORACLE_SID
export ORACLE_BASE
export ORACLE_HOME
#export ORAENV_ASK
export PATH=$PATH:$ORACLE_HOME/bin
set -o vi
echo "ORACLE env set for test"
export EDITOR=vi
stty erase ^?
Let me know how to add entry in the .profile file or can i create seperate oraenv file in my home dir and add the above values.
. oraenv
dev01:/home/m01 (m01)$./oraenv
ORACLE env set for 01D
/u01/apps/oracle/product/11.2.0/bin/osh: Can't raise ulimit. The mode of /u01/apps/oracle/product/11.2.0/bin/osh should be 4711 and owned by root.
dev01:/home/m01 (m01)$sqlplus /
ksh: sqlplus: not found
dev01:/home/m01 (m01)$ls -lart
total 40
drwxr-xr-x 33 bin bin 4096 Jul 18 15:29 ..
drwxr-xr-x 2 m01 dba 256 Jul 21 11:59 .
-rwxrwxrwx 1 m01 dba 480 Jul 21 12:01 oraenv
-rw------- 1 m01 dba 153 Jul 21 12:01 .vi_history
-rw------- 1 m01 dba 7608 Jul 21 12:03 .sh_history
dev01:/home/m01 (m01)$cat oraenv
# Oracle Environment Settings
ORACLE_SID=01D
ORACLE_HOME=/u01/apps/oracle/product/11.2.0
ORACLE_BASE=/u01/apps/oracle
export ORACLE_SID
export ORACLE_BASE
export ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME/bin
export ORAENV_ASK=NO
echo "ORACLE env set for 01D"
export EDITOR=vi
set -o vi
stty erase ^?
. oraenv
dev01:/home/m01 (m01)$./oraenv
ORACLE env set for 01D
/u01/apps/oracle/product/11.2.0/bin/osh: Can't raise ulimit. The mode of /u01/apps/oracle/product/11.2.0/bin/osh should be 4711 and owned by root.
I have already given you .profile file entries
$uname -a
AIX dev01 3 5 00C441B04C00
Edited by: user548261 on Jul 21, 2011 9:07 AM
Edited by: user548261 on Jul 21, 2011 9:09 AM
Similar Messages
-
Mountain Lion: how set environment variables
Am I correct that for Mountain Lion, if not earlier, the only way to set environment variables at the system level is to use (or create) a file /etc/launchd.conf that contains commands such as:
setenv CATALINA_BASE /opt/local/share/java/tomcat6
(That does seem to work as expected.)
If so, how does one do this by referencing the value of something else, e.g., to set JAVA_HOME? I tried
setenv JAVA_HOME $(/usr/libexec/java_home)
but then in Terminal if I run
echo $JAVA_HOME
I just get back $(/usr/libexec/java_home).
By contrast, if I put that same setenv JAVA_HOME $(/usr/libexec/java_home) command into my ~/.profile, then the result of echo $JAVA_HOME is the actual value referenced, namely, /Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home.Linc Davis wrote:
launchd is not a shell and does not peform expansion. You have to use literal expressions. But you can also modify the bash environment system-wide by editing the file /etc/profile.
But sudo emacs /etc/profile won't let me edit this file: it's read-protected, emacs says.
What permissions should I give it? Right now it's in group wheel, owned by root but with Read permission only.
P.S. And is it really a good idea to edit /etc/profile -- assuming I can suitably set the permissions to do so? Apple goes out of its way to try to hide this file: /etc is a link to /private/etc, e.g. -
Forget to set environment variable export SAPINST_USE_HOSTNAME
Dear Experts
we have installed the SAP ECC6.0 EhP4 in HACMP environment with AIX6.1 ,Power HA cluster6.1, oracle 11g database
the problem is while installing the CI and ASCS and Dialog instance I missed to set environment variable
export SAPINST_USE_HOSTNAME = <virtual Host Name> and while starting the sap-inst also i didn't start as like
./sapint SAPINST_USE_HOSTNAME = <virtual Host Name>,Now i am facing problem while doing cluster fail over to another node
Node A host Name is not reflecting in Node B and I am not able to start the SAP with host name of Node A
in AIX6.1 in IBM Admin they didnt give any virtual host name they said that they have configured the cluster with two service IP there is no virtual IP in AIX6.1
please help me out how to resolve this host Name issue and to start the SAP in Node B
Thanks in Advance
krishnaHi Krishna,
I dont agree with the AIX 6.1 having no virtual ip's, because i recently installed a HA instance with ASCS, SCS & also ERS on 6.1
to answer your questions:-
"can you tell is this correct setup or anything we did mistake for file system setup and installation"
This depends on what your requirement is. Typically a cluster will have Oracle on one host and SAP on the other host. Ill explain the VCS concept, so you will have a better understanding.
Lets consider Node1 & Node2. Now each node will have a physical IP and a virtual IP. The Virtual IP will be associated with a set of file systems. For example /oracle will be associated to virtual ip lets say "xyzDB" & the /usr/sap/<sid>, TRANS & sap mount will be associated with virtual ip lets say "abcCI". Now when the cluster fails over to which ever node, these file systems will still be associated with their respective virtual ip's.
So, the start profile will always have START_DVEBMGS_abcCI. Irrespective of which Node the sap is in, when you start the SAP, it will use the virtual hostname and start up SAP. I hope your getting the concept.?
Coming back to the setup, since you have ASCS, Oracle , CI & a dialog instance. Im not sure what file systems you have associated with VCS groups. Can you give command "hastatus -sum" and post the output?
Regarding your other question
"this file system is moving to Node B but while starting SAP on Node B host Name is not reflecting and SAP is not coming up due to there hostname didnt change in Node B,, can you advice me please ,,"
This is inline with what i explained above for cluster mechanism. The physical IP will not change. It is only the virtual IP that is associated with a set of file systems.
Ill give you one more example, Consider the parameter rdisp/mshost = <> . What should this be? Physical host or Virtual host?? :-) .It should be Virtual. Because the CI can be in Node1 or Node2. If we give the physical host, then if the SAP fails over to the other node. How will it start up? because the profiles still say the message server is in the other host... Getting my point?
Regards,
Shanser -
Setting environment using custom script
In our environment we have multiple db's of different versions running on same server.
We are building a custom env script to set all env variables. We have created below script, it's not setting environment.
Script is :
#!/bin/sh
set -x
if [ $# != 1 ] ; then
echo "Wrong number of parameters.Expected Oracle sid as parameter..exiting!!"
exit 1
fi
PATH=/var/opt/oracle/bin:/usr/bin:/usr/xpg4/bin:/usr/ucb:/usr/openwin/bin:/usr/dt/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/
bin:/opt/EMCpower/bin:/etc:/var/opt/oracle/standard/bin:/sbin:/usr/5bin:/usr/sbin:/usr/openv/neer/bin:/usr/openv/netbackup/bin:/
usr/proc/bin:/usr/afsws/bin; export PATH
unset ORACLE_SID LD_LIBRARY_PATH LIBPATH ORA_NLS33 ORA_NLS10
ORACLE_SID=$1
export ORACLE_SID
ORAENV_ASK="NO";export ORAENV_ASK
. oraenv
if [ $? != 0 ] ; then
echo "Running oraenv again from standard location /usr/local/bin/oraenv"
. /usr/local/bin/oraenv
fi
echo "Oracle home is $ORACLE_HOME"
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib; export LIBPATH
SHLIB_PATH=$ORACLE_HOME/lib; export SHLIB_PATH
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
ORA_NLS10=$ORACLE_HOME/nls/data; export ORA_NLS10
If I do env | grep ora after script finishes. Changes in environment variable are not reflected. kindly help. Although I used set -x and saw that it's running fine.Not sure what you mean, but if I understand your need, functions might be a solution.
The following is my oracle user's profile (it's Linux, but Solaris shouldn't be different) :
export EDITOR=vi
umask 022
export ORACLE_BASE=/home/oracle/base
o10()
{ export ORACLE_SID=db102
export ORACLE_HOME=$ORACLE_BASE/OraHome10
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export TNS_ADMIN=$ORACLE_BASE/OraHome11/network/admin
export PS1='[\u@\h_10 \W]\$ '
o92()
{ export ORACLE_SID=db92
export ORACLE_HOME=/scsi/OraHome92
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export TNS_ADMIN=$ORACLE_BASE/OraHome11/network/admin
export PS1='[\u@\h_92 \W]\$ '
o11()
{ export ORACLE_SID=db11
export ORACLE_HOME=$ORACLE_BASE/OraHome11
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export PS1='[\u@\h_11 \W]\$ '
xe()
{ export ORACLE_SID=XE
export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export TNS_ADMIN=/home/oracle/base/OraHome11/network/admin
export PS1='[\u@\h_XE \W]\$ '
}If I want to set Oracle 10 environment I enter
$ o10
and similarly for others. -
Can not set environment-naming-url-factory-enabled in server.xml
Hi,
I am trying to set environment-naming-url-factory-enabled="true" in server.xml but I find that it is removed as soon as I start the server.
Here is what I did:
(1) installed BPM 10.1.3.1
(2) applied patch 6148874 to get to version 10.1.3.3
(3) modified bpel\system\appserver\oc4j\j2ee\home\config\server.xml - I added the attribute environment-naming-url-factory-enabled="true" to the application-server element.
(4) started the server
Very soon after starting the server, if I reopen server.xml, environment-naming-url-factory-enabled is gone.
I am trying to follow the instructions I found on page 3-26 of the following pdf:
http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf
Thanks,
Josh
Edited by: user756776 on Feb 13, 2009 12:21 PMHi Prashant,
Please refer the below KBA related to BODI-1111469 issue in SAP Data Services 4.1 Support Pack 1 Patch 1 (Version 14.1.1.284).
ADAPT01664699
An importing operation from a WSDL that has a recursive import of a schema would fail with the error: "An error occurred while importing metadata: Unknown JNI error... (BODI-1111469)”. This issue has been fixed in this release.
1804623 - Release Notes for SAP BusinessObjects Data Services 4.1 Support Pack 1 Patch 1 (Version 14.1.1.284)
https://service.sap.com/sap/support/notes/1804623
Thanks,
Daya -
How to set environment variables in WL ?
Hi,
How to set environment variables in WL ?
Thanks,
SriviHi,
You can set the environmet variable in Weblogic by using the below commands
setWLSEnv.cmd/sh ==>Set the CLASSPATH to include the WebLogic Server classes.
Overview of WebLogic Server Domains
or you can use to set the Environment variable along with domain specific varables using the SetDomainEnv.cmd
To run SetDomainEnv.sh in Linux please use
. ./setDomainEnv.sh it require two dots (Dont miss it )
http://docs.oracle.com/cd/E28280_01/web.1111/e13749/weblogicserver.htm#ADMRF205
Hope it helps -
Does a user need to have certain rights or access to certain libraries to
set environment variables off or on when running a pl/sql script?
environment variables such as:
set echo off;
set termout off;
thanksIt is possible to disable certain SQL*Plus, SQL and PL/SQL commands, using the PRODUCT_USER_PROFILE table (note that this only affects the SQL*Plus environment).
See: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch10.htm#1005596 -
Runtime.exec Problem with setting environment
Hello
I will run a command with a new process environment. As example I take "ls". If I use the "exec(String)" method it works fine (like it should; my PATH is ...:/usr/bin:...).
Next when I use "exec(String cmd, String[] env)" with cmd = ls and env = {PATH=} then the programm also prints out the listing of the current directory. In my opinion this shoudn't work.
I have the problem using jdk1.2.2 (Solaris VM (build olaris_JDK_1.2.2_10, native threads, sunwjit)) on Solaris 8.
As I understand the exec the method should work like this:
1. fork a new Process
2 set environment for the new process
3 exec the new Programm in this process
Is this statement right?
On Solaris 2.6 the program works fine and I get an IOException.
Some hints way the env for the process isn't set?
Thanks
========================================================
import java.io.*;
public class Test {
/** Version der Klasse. */
public static final String VERSION = "$Revision:$";
public static void main(String[] arg) {
try {
call("ls", new String[]{"PATH="});
} catch (Exception ex) {
System.out.println(ex);
private static void call(String cmd, String[] env)
throws Exception
Runtime rt = Runtime.getRuntime();
try {
System.out.println(cmd);
Process p = rt.exec(cmd, env);
StreamGobbler errorGobbler = new
StreamGobbler(p.getErrorStream(), "ERROR", System.err);
StreamGobbler outputGobbler = new
StreamGobbler(p.getInputStream(), "OUTPUT", System.out);
errorGobbler.start();
outputGobbler.start();
try {
p.waitFor();
} catch (InterruptedException e) {
if (p.exitValue() != 0) {
throw new Exception("Process failed");
} catch (IOException ex) {
System.out.println("IOException: " + ex.toString());
class StreamGobbler extends Thread {
private InputStream m_input;
private OutputStream m_output;
private String m_type;
private StringBuffer m_message;
StreamGobbler(InputStream is, String type, OutputStream os) {
this.m_input = is;
this.m_output = os;
this.m_type = type;
this.m_message = new StringBuffer();
outputGobbler.start();
try {
p.waitFor();
} catch (InterruptedException e) {
if (p.exitValue() != 0) {
throw new Exception("Process failed");
} catch (IOException ex) {
System.out.println("IOException: " + ex.toString());
class StreamGobbler extends Thread {
private InputStream m_input;
private OutputStream m_output;
private String m_type;
private StringBuffer m_message;
StreamGobbler(InputStream is, String type, OutputStream os) {
this.m_input = is;
this.m_output = os;
this.m_type = type;
this.m_message = new StringBuffer();
public synchronized void run() {
try {
InputStreamReader reader = new InputStreamReader(m_input);
BufferedReader bufferedReader = new BufferedReader(reader);
PrintWriter writer = new PrintWriter(m_output, true);
String line = null;
while ( (line = bufferedReader.readLine()) != null) {
writer.println(m_type + "> " + line);
this.m_message.append(m_type + "> " + line + "\r\n");
} catch (IOException ioe) {
ioe.printStackTrace();
public synchronized String getMessage() {
return this.m_message.toString();I'm having the same problem...
Have you been able to solve your problem yet? -
How to set environment variable ORACLE_HOME ?
Hi
I trying to install SAP Solution manager 4.0 SR3:
OS: Linux RHEL4u4
DB: Oracle
SAPinst now stops the installation.
To proceed with the installation, install the Oracle database as follows:
1.Log in as user orassm.
2.Set the DISPLAY variable.
3.Change to directory /oracle/stage/102_32/database/SAP.
4.Start './RUNINSTALLER'.
After you installed the Oracle database software, proceed with the database instance
installation by choosing 'OK' in this dialog box.
./RUNINSTALLER
oracle_stage is not set (OK)
oracle_base is not set (OK)
oracle_home is not set (OK)
oracle_sid is not set (OK)
oracle_home_name is not set (OK)
oracle_inst_group is not set (OK)
from_location is not set (OK)
tmp_netca_file is not set (OK)
tmp_dbca_file is not set (OK)
Working in /oracle/stage/102_32/database/SAP ...
The environment variable ORACLE_HOME is not set! abort ...
How to set environment variable ORACLE_HOME ?
Regards
Erici
Switch shell to bash:
orassm:x:502:503:SAP Database Administrator:/oracle/SSM:/bin/bash
[root@csp-p-sm00 ~]# su - orassm
[orassm@csp-p-sm00 ~]$
But when try to run ./RUNINSTALL
[orassm@csp-p-sm00 SAP]$ ./RUNINSTALLER
oracle_stage is not set (OK)
oracle_base is not set (OK)
oracle_home is not set (OK)
oracle_sid is not set (OK)
oracle_home_name is not set (OK)
oracle_inst_group is not set (OK)
from_location is not set (OK)
tmp_netca_file is not set (OK)
tmp_dbca_file is not set (OK)
Working in /oracle/stage/102_32/database/SAP ...
The environment variable ORACLE_HOME is not set! abort ...
Additionaly I've post csh.cshrc and csh.login
/etc/cshrc
csh configuration for all shell invocations.
by default, we want this to get set.
Even for non-interactive, non-login shells.
[ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]
if $status then
umask 022
else
umask 002
endif
if ($?prompt) then
if ($?tcsh) then
set prompt='[%n@%m %c]$ '
else
set prompt=\[`id -nu`@`hostname -s`\]\$\
endif
endif
if ( $?tcsh ) then
bindkey "^[[3~" delete-char
endif
setenv MAIL "/var/spool/mail/$USER"
limit coredumpsize 0
if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r $i ) then
source $i
endif
end
unset i nonomatch
endif
/etc/csh.login
System wide environment and startup programs, for login setup
if ($?PATH) then
if ( "$" !~ /usr/X11R6/bin ) then
setenv PATH "$:/usr/X11R6/bin"
endif
else
if ( $uid == 0 ) then
setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
else
setenv PATH "/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
endif
endif
setenv HOSTNAME `/bin/hostname`
set history=1000
if ( ! -f $HOME/.inputrc ) then
setenv INPUTRC /etc/inputrc
endif
Regards
Eric -
Runtime.exec and setting environment variables
Runtime.exec and setting environment variables
I need a decent example which works on Windows.
Got any?Thank you.
I was hoping for an example of the use of
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runti
e.html#exec(java.lang.String,%20java.lang.String[]) or
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runti
e.html#exec(java.lang.String,%20java.lang.String[],%20j
va.io.File) which take environment variable
information such as PATH.
The reason is because there is a library which is
being loaded via loadLibrary (
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Syste
.html#loadLibrary(java.lang.String) ). However, for
the child process to find the library the PATH needs
to be updated.
Any example regarding changing the PATH variable via
Java so that libraries can be loaded and processes
created? (Perhaps, I should make a new post and
restate the question with this more explicit
information?)
That won't work. LoadLibrary occurs in the JVM environment. As I said you can't change the JVM environment via exec().
If the shared library needs something in the path then you are going to have to set the path before your application starts up.
If you just need to load the library from someplace that is not on the path then you should be using System.load(). -
How to set environment variables using java program
Hi all
I want to set environment variables on windows 98/200/xp system, such as path and classpath using a java program.
How to do this using a java program.
Any body plz helppppppppp.#1 05-02-2003, 07:38 AM
Goodz13 Join Date: Jan 2002, Posts: 985
Location: Halifax, NS, Canada
Reputation:
Java FAQ's and tutorials
Java FAQ's
Path and ClassPath:
PATH
In Windows 9x you would set it up in the autoexec.bat file
ie.
SET PATH=%PATH%;c:\jdk1.4.2\bin\;
where c:\jdk1.4.2\ is the path where you installed Java.
In Windows 2000 and XP
Right click on My Computer->Properties->Advanced Tab->Environment Variables... Button.
If you see a PATH in System Variables, click that and edit it. If you don't, you will need to create a new System variable.
It should look something like this:
%SystemRoot%\system32;%SystemRoot%;c:\jdk1.4.2\bin\;
Any querry email me to [email protected]
Answer by
Rajasekhar Goli
DS UNICS Infotech -
Error in setting environment variable
hi
Please note JKit is where my jdk1.3 is stored(i.e instead of jdk1.3 folder its JKit folder)... i have gone thru the similar threads but with no success.
SET
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;D:\Jkit\bin;D:\Jkit\lib;D:\Oracle\bin;"C:\PROGRAMFILES\ORACLE\JRE\1.1.7\BIN";D:\JKit\Jre\Bin;
SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
SET CLASSPATH=c:\JavaWebServer2.0\lib\servlet.jar;c:\JKit\lib;
SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29;
SET JAVA_HOME=D:\Jkit;
The error i get after running autoexec.bat and then tomcat/bin/startup is as follows..
The CATALINA_HOME environment variable is not defined
This environment variable is needed to run this program
please HELP!!.THANKSHi
Very many thanks for ur solution.. i actually hadset the environment variables spacce..but when i execute the autoexec.bat file i dont get any error(out of env space)..but when i run the startup.bat file i get from the command prompt, i get the foll error.
This is my Autoexec.bat
SET JAVA_HOME=D:\Jkit\bin
SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29\bin
SET PATH=D:\Jkit\bin;C:\WINDOWS;C:\WINDOWS\COMMAND;
SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
THE FOLLOWING IS THE ERROR I GET WHEN I RUN STARTUP.BAT UNDER TOMCAT'S BIN UNDER THE COMMAND PROMPT
D:\tomcat\jakarta-tomcat-4.1.29\bin>startup
Syntax error
Out of environment space
Out of environment space
Out of environment space
Using CATALINA_BASE: D:\tomcat\jakarta-tomcat-4.1.29
Using CATALINA_HOME: D:\tomcat\jakarta-tomcat-4.1.29
Using CATALINA_TMPDIR: D:\tomcat\jakarta-tomcat-4.1.29\temp
Using JAVA_HOME: D:\Jkit
Out of environment space
Out of environment space
Invalid switch - -DJAVA.ENDORSED.DIRS=D:\TOMCAT\JAKARTA-TOMCAT-4.1.29\COMMON\ENDORSED
I even set JAVA_HOME AND CATALINE_HOME to the \bin dir respectively..
still i get the same error
As given under the tomcat installation documentation (RUNNING.txt), i set the space for environment space under the Memory tab, for startup and shutdown.bat files, it creates a shortcut for running the resp .bat files, running startup.bat file i get,CATALINA_HOME VAR HAS NOT BEEN SET PROPERLY, THIS OCCURS FOR BOTH TOP LEVEL DIR SETTING AND /bin DIR SETTING of CATALINE_HOME IN autoexec.bat
PLEASE HEL, I HAVE BEEN TRYING TO CONFIGURE IT FOR THE PAST DAYS BUT WITH NO SUCCESS, DONT KNOW WHERE I AM GOING WRONG..PLEASE HELP -
To run the java, and javac exes in any directory path
I have set the environment varible as
path='c:\jdk1.2.1\bin\'
But it is not working
why?Hi Amirtraj,
Try this out in the command prompt:
For example:
E:\>set classpath=%CLASSPATH%;.;c:\jdk1.2.1\bin;
and
E:\>set path=%PATH%;.;c:\jdk1.2.1\bin
now type java or javac, it will work. -
Setting Environment Variable CPIC_MAX_CONV
Hi Experts,
In of the steps during POST INSTALLATION of PI7.0 it says to set the variable CPIC_MAX_CONV, using the transaction RZ10.
When i logged in to the abap system , and checked in RZ10,did find any variable of this name.
Do I need to create it first and then set the value gw/max_conn_per_wp.
If yes, give me the steps to do this. or else any other alternative.
Thanks in advance,
YounusHi,
Check this note :
1.- https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_fes/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d333136383737%7d
2.- /thread/174978
The parameter CPIC_MAX_CONV is a environment variable that you find in Unix or windows, depends where you had installed SAP PI.
Best regards
Ivá -
Setting environment variable CONFIGROOT
Hi
I want to find the msg store for a particular user account so i'm planning to use hashdir command utility and the requirement for the same is given
below
Requirements:
Must be run locally on the Messaging Server. Make sure that the environment variable CONFIGROOT is set to msg_svr_base/config.
My Ques..
1. How i have to set CONFIGROOT and in which file ???
Thanks in AdvanceHi,
CONFIGROOT is a shell environment variable. It needs to be set in the environment of the shell you are using for example for bash shell:
export CONFIGROOT=<msg_base>/config
Regards,
Shane. -
Setting environment variable Forms 10.1.2.0.2 (10g)
Hi,
We are migrating forms from 6i to 10g(10.1.2.0.2). We want to run reports in batch form Forms 10g and setting these environment variable.
Please let me know correct path for these variables in Application Server.
FORMS_PATH=
FORMS_OUTPUT=
FORMS_MAPPING=
FORMS_REPFORMAT=
REPORTS_NO_DUMMY_PRINTER=
DOC=
DEMO60=
GRAPHICS60_PATH=
UI_ICON=
REPORTS_PATH=
## setting for Project Builder
ORACLE_AUTOREG=
Thanks in advance
SandhyaThanks for response. I have set forms_path and reports_path already. I need information about rest of the variables.
Could you please tell me document or link where I can find detail about these variables. Actually these variables were used in forms reports 6i
and we are trying to keep what client has in 6i in 10g.
Thanks
Sandy
Maybe you are looking for
-
WEBAS Installation problem on HPUX 11.11
Hi , I am running the sapinst present in the "/usr/sap/CD/51030191_NW04_Installation_Master_Oracle/IM2/SAPINST/UNIX/HP11_64" but when i am running that i am getting this error output . [==============================] | extracting... done! iauxsysex
-
I just got a new white iphone 4. When I try to take a video using the camera app, there is only a muffled sound. I never had this problem with my old iphone. I tried to restore it and that didn't help. I checked over all of the settings. Does an
-
Yosemite Mail performance problems
I upgraded to OS 10.10 Yosemite this morning. When I opened the new Mail application, I noticed some significant performance problems. I organize all my emails by conversation (i.e., they display by thread), and I like to expand those conversations o
-
Hi experts - is there a way to compare different versions of the same workflow? I'm familiar with displaying the different versions, but I'm interested in having a side-by-side comparison between versions, much as we can with ABAP code. Thanks for
-
HT3702 I keep getting charges $7.95 a month on my credit card from apple
For the past 3 months I have been charged 7.95 a month. How do I find out what it is for