- An environment variable, or
- A properties file.
Using Environment Variables
When you need to obtain the value of an environment variable, import the os package into your script. Then, use the getenv() method to get the value of a specific environment variable.
import os
javaHome = os.getenv("JAVA_HOME")
print("JAVA_HOME is " + str(javaHome))
Using a Properties File
When you need to obtain the value of a property, use the loadProperties() method. Using this method, there is no need to declare the variable and assign a value. Instead, the property.name becomes the name of the variable. The property.value is the assigned value. You will need to define a properties file, e.g. wlstExample.properties.
myProperty=myValue
In the WLST script, reference the loadProperties() method and provide a path to the properties file. If the properties file is in the same directory, and likely it is, do not use a relative path like ../wlstExample.properties. Instead, just use the file name.
loadProperties("wlstExample.properties")
print("The value of myProperty is " + str(myProperty))
When executed, this script produces the following output.
[oracle@myHost ~]$ java weblogic.WLST wlstExample.py
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
JAVA_HOME is /usr/java/jdk1.7.0_75
The value of myProperty is myValue
ReplyDeleteI appreciate you for this blog. More informative, thanks for sharing with us.
C C++ Training in Chennai
c++ courses in chennai
C C++ Training in Porur
JMeter Training in Chennai
JMeter Certification
Appium Training in Chennai
javascript training in chennai
core java training in chennai
Great Article. Thank you for sharing! Really an awesome post for every one.
DeleteIEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.
JavaScript Training in Chennai
JavaScript Training in Chennai
ReplyDeleteThe innovative thinking of you in this blog. This blog makes me very useful to learn.
Selenium Training in Chennai
Best selenium Training Institute in Chennai
selenium testing training in chennai
Selenium Training
Selenium training in porur
Selenium training in OMR
Big data training in chennai
Android Training in Chennai
IOS Training in Chennai
JAVA Training in Chennai
I would like to value the time the author has taken to share this content with us. The author has focused on a single topic and explained it in detail.
ReplyDeleteSpoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
IELTS Training in Chennai
IELTS Chennai
Best English Speaking Classes in Mumbai
Spoken English Classes in Mumbai
IELTS Mumbai
IELTS Center in Mumbai
IELTS Coaching in T Nagar
I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
magento training course in chennai
magento training institute in chennai
magento 2 training in chennai
magento development training
magento 2 course
magento developer training
This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted. Thank you so much for this article.
ReplyDeleteLearn Best Digital Marketing Course in Chennai
Digital Marketing Course Training with Placement in Chennai
Best Big Data Course Training with Placement in Chennai
Big Data Analytics and Hadoop Course Training in Chennai
Best Data Science Course Training with Placement in Chennai
Data Science Online Certification Course Training in Chennai
Learn Best Android Development Course Training Institute in Chennai
Android Application Development Programming Course Training in Chennai
Learn Best AngularJS 4 Course Online Training and Placement Institute in Chennai
Learn Digital Marketing Course Training in Chennai
Digital Marketing Training with Placement Institute in Chennai
Learn Seo Course Training Institute in Chennai
Learn Social Media Marketing Training with Placement Institute in Chennai
In other words, an Office 365 migration that is stress-free! These objectives can be achieved by following these 7 steps: office 365
ReplyDeleteMua vé tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ giá bao nhiêu
vé máy bay từ houston về việt nam
vé máy bay khứ hồi từ đức về việt nam
vé máy bay từ nga về việt nam
bay từ anh về việt nam
chuyến bay từ châu âu về việt nam
bảng giá khách sạn cách ly tphcm