Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6968589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:28:15+00:00 2026-05-27T16:28:15+00:00

How do I, from Netbeans, for use with Tomcat, set up an environment variable

  • 0

How do I, from Netbeans, for use with Tomcat, set up an environment variable that I can read using System.getProperty(...);

We have a source controlled project – and we’re constantly making changes to confirurations that we “would” like to share (don’t want to use svn:ignore). We’re trying to set up one simple parameter, an environment variable to the config properties of our application. For example: mark.properties or john.properties. If the system can’t find the environment variable, then it defaults to server.properties (for the live system).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:28:16+00:00Added an answer on May 27, 2026 at 4:28 pm

    1. Go to the Tomcat Properties Platform Settings

    In Netbeans, click the “Services” tag. Under “Servers”, you’ll see “Tomcat 7.0”. Right click “Tomcat 7.0” and select “Properties”. Then select the “Platform” tab.

    2. Under VM Options, add -Dvariable=value

    Leave the D in place, and replace the variable with whatever variable name you’d like to set and value whatever value you’d like to set the variable to.

    3. Read out the property from your code.

    System.out.println("The value is " + System.getProperty("variable"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i use netbeans to check out projects from svn repo, then i edit the
I've just switched from radrails to netbeans. So far, so good. But I have
I'm using NetBeans 6.8 on Windows 7. I upgraded from WinXP and NetBeans 6.7.
I downloaded these zip files from the link http://netbeans.org/downloads/zip.html with the hope that this
I'm trying to use NetBeans to compile C code and have the following versions
I find it annoying that Netbeans tries to disable editing the source code whenever
I use NetBeans 6.8 and have MAMP with this config on my mac: Apache
I'm trying to set up my Netbeans IDE so that it is capable of
I have a next problem. When I'm running project from NetBeans IDE evrything is
I have decided to use Netbeans and Mercurial for my latest project (after no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.