?
Solved

Setting a Java System Property

Posted on 2005-04-26
4
Medium Priority
?
675 Views
Last Modified: 2010-03-17
Hello,

I have no knowledge of Java Application Servers or how they work.  But I am in charge of installing a Java web application.  I have managed to install the Java JRE/SDK 1.4.2 and JBoss 3.2.3 with embedded Tomcat.  I can get the jmx-console to come up so I figure I can begin installing this application.  I am following the steps, but I am stuck on this step because I don't know how to do it:

"This software needs to know which type of database is being used.  Do this by setting a Java System Property in the application server (such that deployed applications have access to the property).  The name of the property should be 'RGDBTYPE' with a value of 'oracle'. "

What is this and how would I go about doing this?  I sifted through the JBoss directories but couldn't find a properties type file other than server/default/conf/jndi.properties, but it looked like I shouldn't be messing with it.  

Please be as detailed as possible and also explain how these properties work please.  Thanks.

0
Comment
Question by:dentyne
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 2000 total points
ID: 13874957
Java System properties can be set during startup of Java Virtual Machine by providing following syntax -Dpropertyname=propertyvalue.
In you case you should modify you run.bat or run.sh file. Find JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME" line in file which you use for jboss startup and add your property=value. It should be like that:
JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME -DRGDBTYPE=oracle"
and restart jboss.
0
 
LVL 1

Author Comment

by:dentyne
ID: 13876563
Thanks for the reply.  So would this be correct?  I found the line I think you are describing and I added my property.

rem Setup JBoss specific properties
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -DRGDBTYPE="oracle"
set JBOSS_HOME=%DIRNAME%\..

What is the "D" for before? Should my RGDBTYPE have this "D" in front of it?  Also, does oracle have to be in quotation marks?  THanks.
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13876689
other -D option is some internal system property for jboss.
It doesn't matter where you put your -D parameter in that line.
oracle shouldn't be in quotation marks.
Your line should be:
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -DRGDBTYPE=oracle
0
 
LVL 1

Author Comment

by:dentyne
ID: 13876787
Thanks for the help.  I really appreciate it.  I'm sure I will have more questions later.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question