This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests and have Scott Selikoff and Jeanne Boyarsky on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Retrieve WL command-line (-Dname=value)

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 9623
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9623
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic