How to accces environment Variables in app
Hi, thanks for reding my post
I have created in the OAS Portal a variable called PORTAL_HOME that points to the home of the Oracle Portal's OC4J. I want to access this variable for logging purposes.
I tried to access it with ${PORTAL_HOME}, but it doesn't works...
¿What I'm doing wrong?
Hi,
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
Similar Messages
-
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 -
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 -
How to set environment variables in JavaCAPS6 app server?
In JavaCAPS6 you can have variables in wsdls of the form {$var}.
How are the values of these set in the app server configuration?
RupertHi,
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 -
How to set environment variable?
Hi,
I just succeeded starting up an external executable by using nativeprocess.
Now I have to set the portnumber as an environment variable.
After setting this portnumber, I can send queries to the executable.
But I don't now how to set this environment variable.
You can see my try in bold:
Starting the executable (an extract of the code):
public var portnumber;
file = file.resolvePath("C:\\Program Files\\CM Synergy 6.3\\bin\\start_dbase.exe"); #start executable
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, getportnumber); #get portnumber as output of the executable
The next step is to define the variable portnumber:
file = file.resolvePath("C:\\WINDOWS\\system32\\cmd.exe");
processArgs[0] = "/C";
processArgs[1] = "set";
processArgs[2] = "portnumber=";
processArgs[3] = portnumber;
When I try to print out all environment variables, portnumber is not in:
file = file.resolvePath("C:\\WINDOWS\\system32\\cmd.exe");
processArgs[0] = "/C";
processArgs[1] = "set";
If I replace the last executable with my real command (running the query), the executable is giving the error that my portnumber is not set.
Is it possible? I have also tried it with setx.exe. Even running a python script where I set os.environ is not working.
I have the feeling that the command is executed but that the variable is not remembered for the next executable.Hello Martin,
Thanks for your input. I have tried what you suggested but it didn't work. I will post my source code. Perhaps I'm doing something wrong. After setting my variable portnumber, I would normally run a query. Instead of running the query, I'm writing out the environment variables. Unfortunately, portnumber is not in the list . I also tried using "setx" insetad of "cmd.exe set" but without any difference.
public var portnumber;
public function run_query():void
var file:File = new File("C:/WINDOWS/System32/cmd.exe");
var si:NativeProcessStartupInfo = new NativeProcessStartupInfo();
si.executable = file;
var processArgs:Vector.<String> = new Vector.<String>();
processArgs[0] = "/C";
processArgs[1] = "set";
nativeProcessStartupInfo.arguments = processArgs;
var process:NativeProcess = new NativeProcess();
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
process.start(si);
public function set_portnumber():void
var file:File = new File("C:/WINDOWS/System32/cmd.exe");
var si:NativeProcessStartupInfo = new NativeProcessStartupInfo();
si.executable = file;
var process:NativeProcess = new NativeProcess();
process.start(si);
process.standardInput.writeUTF("set portnumber="+portnumber+"\n")
setTimeout(run_query, 1000);
public function onOutputData(event:ProgressEvent):void
var process:NativeProcess = event.target as NativeProcess;
textReceived.text += process.standardOutput.readUTFBytes(process.standardOutput.bytesAvailable) + "\n"; -
How to pass environment variables to adf application?
Hi,
I Created form function with this settings to open my adf application:
Type : SSWA plsql function
Maint Mode = None
Context : Resp
Web HTML : test.jsp
Web host: 192.168.1.30:8890
This works fine. But how can I pass environment variables as parameters?
I like to pass username and org_id.
Thanks in advanceKdeGraaf,
Sounds real interestign what you are saying. But I don't know what you mean with:"the application server name appended till html folder($COMMON_TOP/html) "
Basically if u make a SSWA jsp function with only jsp name say A.jsp.At runtime the url is automatically converted tohttp://<application server>:<port number>/OA_HTML/A.jsp
By the way $COMMON_TOP/html folder is the location for all jsps' in EBS.
Where can I find some information about making a OAF page wrapper? Because I have totaly now experience with OAF.
Make a OAF page, say page A, in process request of page get all the context data say, responsibility, org etc, and set it in http session.Then redirect the flow to ur ADF application page. If ur new and have no knowledge how do we build a page in OAF, u can download OAF developers guide from metalink. Search old threads u would get get the metalink id.--Mukul -
How to add environment variable programmatically??
Hi all,
I want to add TOMCAT_HOME environment variable programmatically. How can I do this?
Is there any dos command to set an environment persistently?
Pls help guys...
Thanks in advance
MithunkThe way environmental variables work is that they are passed to newly created tasks by the task that creates them. So, for example, when a command shell calls Java it passes a copy if it's current environmental variables, and if Java calls Runtime.exec it can override the set it passes on.
The comands within a shell that set environmental variables can do so because they are part of the command shell, not separate programs run by it.
In short a program run by a shell can't alter the environmental variables belonging to the shell. They move only from the calling task to the called. -
How to read environment variable
How do I read an environment variable within TS?
I was thinking of calling getenv("VARIABLE_NAME") except it returns a char * and TS only allows Boolean or Numeric return type.
I wonder if LV has any function for doing the same thing.With the new ability in TestStand 4.2 to get the standard output from a command line, you can do this with a call executable step.
Simply call cmd.exe as the executable, and pass it the following expression. Then all you have to do is set Locals.EnvironmentVariableName to the name of the environment variable you want the value of and define where you want the standard output to be stored.
"/C \"echo %"+Locals.EnvironmentVariableName+"%\""
I'm attaching a sequence file that shows this. The attachment is necessarily saved in TestStand 4.2, since it uses a feature introduced in that version.
Josh W.
Certified TestStand Architect
Formerly blue
Attachments:
get env var.seq 6 KB -
How to set environment variables for Tomcat on mac osx 10.8.5
How do I set up my environment variables - JAVA_HOME and CATALINA_HOME on my iMac running mac osx 10.8.5?
You need to create a setenv.sh script in the tomcat bin directory. The link is an example that you will need adjust- http://www.unidata.ucar.edu/software/thredds/current/tds/tds4.2/tutorial/Getting Started.html
-
How to read Environment Variable in Java.
Hi,
I am trying to read a environment variable $TMP which has a value of /apps/bea/pt847/psoft5/tmp in UNIX.
I have written the following code and getting Null pointer exception when calling the method logmessage. Any help with reading environment variable is appreciated.
public static void logMessage(String message) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
Date now = new Date();
Properties p = null;
try
p = getEnvVars("$TMP");
System.out.println("the current value of TEMP is : " + p.getProperty("$TMP"));
catch (Throwable e) {
e.printStackTrace();
try
BufferedWriter os = new BufferedWriter(new FileWriter("/tmp/pscas_signon_log.txt", true));
os.write(formatter.format(now));
os.write(message);
os.write("\n");
os.write("tmp_env = " + p.getProperty("$TMP"));
os.write("\n");
os.close();
catch(IOException _ex) { }
public static Properties getEnvVars(String env_var) throws Throwable {
Properties envVars = new Properties();
Process p = Runtime.getRuntime().exec(env_var);
BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
String line = null;
while( (line = br.readLine()) != null ) {
int idx = line.indexOf( '=' );
String key = line.substring( 0, idx );
String value = line.substring( idx+1 );
envVars.setProperty( key, value );
// System.out.println( key + " = " + value );
return envVars;
}Updated code:
public static void logMessage(String message) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
Date now = new Date();
Properties p = null;
try
p = getEnvVars("$TMP");
System.out.println("the current value of TEMP is : " + System.getProperty("$TMP"));
catch (Throwable e) {
e.printStackTrace();
try
BufferedWriter os = new BufferedWriter(new FileWriter("/tmp/pscas_signon_log.txt", true));
os.write(formatter.format(now));
os.write(message);
os.write("\n");
os.write("tmp_env = " + System.getProperty("$TMP"));
os.write("\n");
os.close();
catch(IOException _ex) { }
public static Properties getEnvVars(String env_var) throws Throwable {
Properties envVars = new Properties();
Process p = Runtime.getRuntime().exec(env_var);
BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
String line = null;
while( (line = br.readLine()) != null ) {
int idx = line.indexOf( '=' );
String key = line.substring( 0, idx );
String value = line.substring( idx+1 );
envVars.setProperty( key, value );
// System.out.println( key + " = " + value );
return envVars;
}and this is the error message..
java.io.IOException: $TMP: not found
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:72)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:602)
at java.lang.Runtime.exec(Runtime.java:461)
at java.lang.Runtime.exec(Runtime.java:397)
at java.lang.Runtime.exec(Runtime.java:359)
at SimpleCasValidator.getEnvVars(SimpleCasValidator.java:108)
at SimpleCasValidator.logMessage(SimpleCasValidator.java:81) -
How to use Environment variables in Context Settings
I need to set some Preferences using a Context, and in the value of the preference I need to use a path which may change depending on the OS.
I need to use environment variables or java variables to create the relative path for the value.
Is possible to access env variables from a Context Setting?
Just to give an example, I'm trying to set the M2_REPO variable in the classpath settings in the preferences menu.
to user.home + /.m2/repository
How can I access the user.home from there?Hi Matias,
Sure, you can use substitute-variables command for this purpose.
See the example below:
concat [substitute-variables "${system_property:user.home}" | str] "/.m2/repository"]
Kind regards,
Ulyana. -
From Where should i download Servlets and how to set Environment variables?
Hi,
I want to download the Servlets Kit for my development of application,but couldnt find it.I found a zip file containing all class files.If that is the correct one,then how should i set my environment variables?
thanks
raoYour files should come in a folder with the name "Javax" and subfolders right?
What you can do is to paste the file "Javax" in your folder of your JDK installation.
For example, I have installed my JDK in C:\Java\jdk1.3
I added one new folder in C:\Java\jdk1.3 called classes.
Then I would put the Javax folder in classes.
PS : We add one new folder called classes so that in future when you want to add new classes you can just into this folder.
Then in your enviroment settings, simple point to C:\Java\jdk1.3\classes;.;
This works for me. Hopefully you will no problems!
jing
170902 -
How to look Environment Variable
Hi All:
Can any one let me know how can I find environmental variable??
For example I am working in Server (XMD, XMP,XMS)
D=development
P=production
S=Staging
Now I need to map this filed to target filed<system>.
So how can I get this variable ? Suppose I receive "XMD" then cheking last char "D" or "P" or "S" I can map Development, Production or Staging.
-For this I need to write a java code(to get Environment Variable)
or I can achive it in Graphical Mapping tool itself.
Max points for the best answer
Regards,
Farooq.
Regards,
Farooq.here is more details :
<b>source mesg:</b>
name
id
address
<b>target id</b>
name
id
address
en_variable
I have one fixValues table
XMD - Developemt
XMP - Production
XMS - Staging.
so before mapping this I need to chek what is my environment variable.
so according to that I can Map the respective field
bottom line how can I get a SID so that I can map it to target.
Regards.
Farooq. -
How to access environment variables from Oracle Forms
Hi,
Any idea how to use the Environment variables from Oracle Forms.
My basic problem is that from Oracle form I am calling Batch file which calls excel file with a macro.
So i want to check whether the macro was successful or not.
So in my batch file i will set %errorlevel% which I should be able to read from Oracle Forms.
I am able to read the registry from oracle forms, so is there anyway to read environment variable as well?
Thanks!
Avinash.Hello,
Use the TOOL_ENV.Getvar() built-in
Francois -
How to set environment variables permanetly?
I have installed oracle apps R12 on Oracle Enterprise Linux 5.3 successfully. When i run the file APPS<context_name>.env as oracle user(the one who installed software), the variables are set,,,but when i logout and login again,,,,,i dont see $ORACLE_HOME, $APPL_TOP etc......so please can someone tell me how to set the variables permanently..
thanksHi,
set the env file in profile of unix user.
if your shell is bash shell, then edit the user .bash_profile with env file. If your's is bourn shell, edit the user .profile
for example,
i have PROD as the database SID
/oraprod and /applprod are the base mount points of database and application tiers respectively.
erpserver is the hostname of R12 (single node)
(1) Database Tier:
login as oracle user
$vi .bash_profile
. /oraprod/db/tech_st/10.2.0/PROD_erpserver.env
save the file
(2) Application Tier:
login as applmgr user
$vi .bash_profile
. /applprod/apps/apps_st/appl/APPSPROD_erpserver.env
save the file
------
Maybe you are looking for
-
Loading attached documents from SAP R/3 system to BW/BI system
Dear Experts, In SAP R/3 system, I created generic datasource to extract sales activities which are entered with transaction code VC01N. In SAP R/3 system, it is possible to attach documents (like word, Excel, pdf) to the sales activity. I need to u
-
Oam11g and oim 9.1.0.2 SSO
anyone done sso with oam11g and oim 9.1.0.2? I seem to be having issue where OAM11g sessions and header variables not getting over.
-
How can I transfer all my Iphone informations to my sim
How can I transfer all my Iphone informations to my sim?
-
ITunes 7.3.1 cannot run as it has detected a problem with your audio..
Hey I installed iTunes 7.3.1 last night, and when I click to open it, a message comes up saying 'iTunes 7.3.1 cannot run as it has detected a problem with your audio configeration' Please help Thanks
-
InfoPackage to load multiple flat file for different plant
Hi There is a requirements to load the data from multiple flat files by different plant into BI which source data is coming from other system. Each flat file has it own naming convention. As data has to load via infopackage into the targeted cube. Th