| Author |
Retrieve WL command-line (-Dname=value)
|
David W Brown
Greenhorn
Joined: Feb 13, 2008
Posts: 12
|
|
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.
|
Yet some, not wise, go to the other side of the globe, to barbarous and unhealthy regions, and devote ten or twenty years, in that they may live,-that is, keep comfortably warm,- and die in New England at last.<br />Henry David Thoreau - Walden - 1845
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8262
|
|
|
-D sets a system property. One retrieves a system property with the aptly named System.getProperty method.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
David W Brown
Greenhorn
Joined: Feb 13, 2008
Posts: 12
|
|
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
Joined: Oct 29, 2001
Posts: 8262
|
|
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 ]
|
 |
 |
|
|
subject: Retrieve WL command-line (-Dname=value)
|
|
|