• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieve WL command-line (-Dname=value)

 
David W Brown
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello BEA/WL gurus and users, I have the dubious task of including a command-line argument to the startWeblogic.(cmd|sh) script such that at run-time I can retrived the value of name from a servlet deployed as a .war on the same WL instance.

Please advise, David.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-D sets a system property. One retrieves a system property with the aptly named System.getProperty method.
 
David W Brown
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Joe, thanks for the reply. I tried: -Dtempdir=TEMP as follows:

startWeblogic.cmd -Dtempdir=TEMP

This is the exception I get:

JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX ermSize=48m -XX:MaxPermSize=128m
.
WLS Start Mode=Development
.
CLASSPATH=C:\bea\domains\fcservicing92-online\lib\mbeantypes\authprovider.jar;c:\bea;;C:\bea\patch_weblogic923\profiles\default\sys_manifest_classpath
\weblogic_patch.jar;C:\java\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\WEBLOG~1\server\li
b\webservices.jar;;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient51.jar;C:\bea\WEBLOG~1\server\lib\xqrl.jar;;
.
PATH=C:\bea\patch_weblogic923\profiles\default\native;C:\bea\WEBLOG~1\server\native\win\32;C:\bea\WEBLOG~1\server\bin;C:\java\jre\bin;C:\java\bin;C:\P
rogram Files\Windows Resource Kits\Tools\;C:\Program Files\Subversion\bin;C:\java\bin;C:\Documents and Settings\dwbrown\My Documents\dev\java\apache-a
nt-1.7.0\bin;C:\Program Files\CVSNT\;C:\Documents and Settings\dwbrown\My Documents\dev\java\apache-maven-2.0.9\bin;C:\Program Files\SSH Communication
s Security\SSH Secure Shell;C:\Documents and Settings\dwbrown\My Documents\dev\java\apache-ant-1.7.0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys
tem32\Wbem;C:\Program Files\Common Files\OTG;C:\Program Files\Support Tools\;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Program Files\
Xythos\Xythos Enterprise Document Manager Evaluation\pgsql\bin;C:\Program Files\Xythos\Xythos Enterprise Document Manager Evaluation\pgsql\lib;C:\Prog
ram Files\QuickTime\QTSystem\;C:\java\bin;C:\Documents and Settings\dwbrown\My Documents\dev\java\apache-ant-1.7.0\bin;C:\Program Files\CVSNT\;C:\Docu
ments and Settings\dwbrown\My Documents\dev\java\apache-maven-2.0.9\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Documents and
Settings\dwbrown\My Documents\dev\java\apache-ant-1.7.0\bin;Y:.;Z:.;;C:\bea\WEBLOG~1\server\native\win\32\oci920_8
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\hostname ort\console *
***************************************************
starting weblogic with Java version:
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing)
Starting WLS with line:
C:\java\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX ermSize=48m -XX:MaxPermSize=128m -Xverify:none -da -Dplatform.home=C:\b
ea\WEBLOG~1 -Dwls.home=C:\bea\WEBLOG~1\server -Dwli.home=C:\bea\WEBLOG~1\integration -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.t
estConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\bea\patch_weblogic923\profiles\default\sysext_manifest_classpath -Dweblogic.Name=fcservic
ing92-online-adminServer -Djava.security.policy=C:\bea\WEBLOG~1\server\lib\weblogic.policy -Dtempdir TEMP weblogic.Server
Exception in thread "main" java.lang.NoClassDefFoundError: TEMP
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


It looks like either you forgot the equals sign between -Dtempdir and TEMP or the startup scripts dropped it.
[ October 21, 2008: Message edited by: Joe Ess ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic