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

  • Home
  • SEARCH
  • 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 6847011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:41:34+00:00 2026-05-27T00:41:34+00:00

I have standalone Java application ,in that i have various modules Application starts from

  • 0

I have standalone Java application ,in that i have various modules
Application starts from one classes main() method and then application goes on.

Now i wanted share variables in form of key/value pair to various modules

How can i do it ?

Update :

From main() which kicks on application , from there i will be setting some variables.
and also from here it starts some modules programs ,

I just want similar functionality like ServletContext , SessionContext variables , just like in Servlet container

  • 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-27T00:41:34+00:00Added an answer on May 27, 2026 at 12:41 am

    If you’re looking for JVM wide simple string based key/value configuration storage then the system properties are usually a good fit: http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html

    Anywhere in your code you can use:

    String configThingValue = System.getProperty("config-thing");
    
    System.setProperty("config-thing", "config thing value");
    

    Also, System.getProperties() provides a map like set of properties (it extends Hashtable).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a standalone Java application that gets data from a database and displays
I have a standalone Java application that uses EclipseLink 2.0.1. It is configured by
Let's say that you have a standalone application (a Java application in my case)
I have some code which is a standalone java application comprising of 30+ classes.
I have a standalone Java application below that is: Generating a random line Applied
I have written a standalone Java application that I've packaged into a jar file
I need to write a standalone Java application which will have a embedded HTTP
I have a standalone Java app that has some licensing code that I want
I have many structs (classes) and standalone functions that I like to compile separately
I have developed a standalone application using java, in which I am executing an

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.