Setting a properties file

hi, tried to load a property file and append a line or two in it. the codes are below. didnt work though compilation went ok.
public void modifyJad() {
  Properties jadProp = new Properties();
  try {
    jadProp.load(new FileInputStream("C://Servlet//LiveSoccer.jad"));
  catch(IOException e) { }
jadProp.setProperty("eat","me");
}thx in advance

ah thnks for the reply.. solved it =D
public void appendJad() {
               Properties jadProp = new Properties();
               try {
                    jadProp.load(new FileInputStream("C://Servlet//LiveSoccer.jad"));
               catch(IOException e) { }
               jadProp.setProperty("MIDlet-Install-Notify",""+value1);
               jadProp.setProperty("Livefootball-SerialNumber",""+serial.getSerial());
               jadProp.setProperty("Livefootball-League-Name","English Premiere League");
               jadProp.setProperty("Livefootball-League-ShortName","EPL");
               jadProp.setProperty("Livefootball-League-ID",""+prop.load(new FileInputStream(sysConfig.LEAGUE_ID)));
               jadProp.setProperty("Livefootball-New-URL",""+prop.load(new FileInputStream(sysConfig.NEW_URL)));
               jadProp.setProperty("Livefootball-Update-URL",""+prop.load(new FileInputStream(sysConfig.UPDATE_URL)));
               jadProp.setProperty("Livefootball-Favorite-URL",""+prop.load(new FileInputStream(sysConfig.FAVORITE_URL)));
               try {
                    jadProp.store(new FileOutputStream(""+TempDir.), null);
               catch(IOException e) { }          
     }

Similar Messages

  • Setting up .properties file

    Hello
    I would like to know if theres any particular rules for setting up the .properties file. Like in my application i have four *.properties files
    1)log4j.properties 2) mapping.properties and so on
    the mapping.properties file have jsps mapping..so basically it says
    (key) add.project.param = (value)add_project.jsp
    project = project.jsp
    I am trying to understand how response.sendRedirect sends the appropriate link to project.jsp (view page) from add_project.jsp
    In add_project.jsp, response.sendRedirect is simply written as
    response.sendRedirect("tsaa.go?param=view&oid=" + parent + "&type=" + ptype);in my servlet dispatcher class; there are various functions two of them are
    1) void processRequest(HttpServletRequest request, HttpServletResponse response) { }
    2) String getForwardPage(HttpServletRequest request, HttpServletResponse response) { }
    and i think these classes take care of forwarding the request to appropriate page.
    If there are certain rules for setting up the mapping.properties file, do i have to set my new jsp pages in mapping.properties file as:
    quality.control.param = quality_control.jsp
    quality.control.results = quality_control_results.jsp
    (rite now i am using qc.results = quality_control_results.jsp and that doesnt seem to work)
    somehow response.sendRedirect("tsaa.go?param=view&oid=" + parent + "&type=" + ptype) doesn't seem to work in my quality_control.jsp page. Without the above line i can atleast move till quality_control.jsp page from home.jsp....but with response.sendRedirect().....i am on home.jsp after a refresh.
    if u know any links where i can read abt .properties file please let me know. googling gave me build.properties file but nothing for jsp mappings
    Any help is appreciated
    Thanx

    i got the solution
    please ignore the posting
    thanx

  • Flex properties file

    Hi. I've got some URL's in my Flex app that I'd like to pull
    into a properties file; the values will differ between our
    development and production systems. How do you get/set a properties
    file in Flex? Thanks.

    The Flex project properties files do not exist at run-time.
    Are you speaking in general, of needing to initialize your
    application at run time with some values?
    The simplest way to do this is to pass the values into the
    Flex app from the html wrapper, via flashvars. You just need a
    different version of the wrapper for each different deployment.
    This is the way I do it. It also makes it easy to have different
    launch configurations in FlexBuilder.
    Another solution is to use HTTPService to load an xml file
    containing your initialization data. Of course that way you have to
    have an URL for the HTTPService...
    Tracy

  • Log4j Logger - properties file configuration

    Hi
    This is regarding Apache Log4j logger and the configuration of Log4j.properties file.
    Suppose if I have set the properties file to log the messages in a database. It works fine.
    However, lets say for some reason the database is not accessible for some time.
    Is there a way to configure a "backup" feature in log4j.properties file that basically says that if database is not accessible then log to a temporary file somewhere, may be a text file on the user's system using the RollingFileAppender.

    Hi,
    you can all in the Application class:
    Application.class.getResource( "log4j.properties" ) if its in the Application class package
    Quote:
    URL java.lang.Class.getResource(String name)
    Finds a resource with a given name. The rules for searching resources associated with a given class are implemented by the defining class loader of the class. This method delegates to this object's class loader. If this object was loaded by the bootstrap class loader, the method delegates to ClassLoader.getSystemResource.
    Before delegation, an absolute resource name is constructed from the given resource name using this algorithm:
    If the name begins with a '/' ('\u002f'), then the absolute name of the resource is the portion of the name following the '/'.
    Otherwise, the absolute name is of the following form:
    modified_package_name/name
    Where the modified_package_name is the package name of this object with '/' substituted for '.' ('\u002e').
    Parameters:
    name name of the desired resource
    Returns:
    A java.net.URL object or null if no resource with this name is found
    Since:
    JDK1.1

  • Even after classpath setting in jserv.properties file  error.

    hi kali,
    i have used a custom jsp page for export to excell using a jar file poi-3i-200566.jar which i deployed in oracle apps version 11.5.10.2.
    the jar is put in $JAVA_TOP and class path entry is set in jserv.properties file as
    wrapper.classpath=/d2_u10/....../poi-3i-200566.jar .
    After setting the classpath , bounced the apache.
    But even after the setting , the same error continues.
    I refered the mod_jserv.log file for error details , the error is in import statement of classes present in the poi-3i-200566.jar file like
    could not find the symbol HSSRow , HSSpreadsheet , etc. all these are classes in jar file.
    please anybody know any extra conf is needed or any idea where i am going wrong.
    thanks
    prabhakr,ap

    Hi,
    Please check your jserv.properties file whether the custom class path that you have set is present or not in jserv.properties after restarting the AutoConfig and Apache server.
    Thanks & Regards,
    Sagarika

  • Weblogic Classpath setting error not able to pick the properties file

    Hi All,
    We are using a third party jar and create a java Web service on the top of that jar. This jar file need two configuration file .properties and .xml when we deploy war for the application into weblogic server it will give file not found error. Though this file already exists inside the .war but from the application it is not able to pick the files.
    We find that these file need to be put in weblogic domain home and we put it there and application works.
    I decompile the jar and found that inside java class they use FileReader("allXXX.xml") path and when I Google it and found that it will pick the file from weblogic domain directory.
    The issue is that we need to put properties file in specific weblogic folder like /3party/config by setting the class path inside startWebLogic.cmd. Please let us know solution for same
    Thanks in advance
    Edited by: sb**** on Mar 19, 2012 9:08 AM

    Hi , I am also facing the similer issue. I am deploying war file of my Spring MVC application , but its not picking resource bundle .properties files from one of the configuration file.
    <bean id="PropertiesRepository"
              class="LanguageBasedPropertiesRepository">
              <property name="propertiesFiles">
                   <map>
                        <entry key="en" value="classpath:/exceptionMessages.properties" />
                        <entry key="es" value="classpath:/exceptionMessages_es.properties" />
                        <entry key="default" value="classpath:/exceptionMessages.properties" />
                   </map>
              </property>
         </bean>
    Please let me know how we can modify this to make it work.
    thanks .

  • How to set Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    I am using the propeties file to get the SQL statements. I have all the SQL query statement in the properties file. I am creating a preparedstatement after getting the statement from the properties file with the id like we do in ResourceBundle. If I keep the properties file in the config directory of the Sun App Server instance , then it is working fine. But If I don't keep it there, then it is giving me a file not found exception.
    My SQL class which is accessing the properties file are in same package (com.company.sql). But still it is not able to find the file. As suggested by you, I tried it by giving the path as com.company.sql.SQL. Still it did not found the file. The file is there inside the WEB-INF/classess/com/company/sql/.
    Thanks
    Amit

  • Application setting - properties files, user settings - Preferences API

    HI!
    I have 2 rules:
    1. All application settings (e.g. debug level, path to resources - icons, images, path to localization resources) I store in properties files.In other words all information that user CAN NOT change I store use a properties files.
    2. All user settings (e.g. language, skin and so on) I store with Preferences API. In other words all information that user CAN change I store a use Preferences API.
    Is this a good rules?

    a_subscriber wrote:
    HI!
    I have 2 rules:
    1. All application settings (e.g. debug level, path to resources - icons, images, path to localization resources) I store in properties files.In other words all information that user CAN NOT change I store use a properties files.
    2. All user settings (e.g. language, skin and so on) I store with Preferences API. In other words all information that user CAN change I store a use Preferences API.
    Is this a good rules?Sounds good.

  • Unable to load properties file from filesystem

    Hi,
    I have a client swing-applicatiion packaged in a jar-file. The application uses some resource files, including a xxxx.properties file to set defaults for the application. All resource files are included in the jar file and everything works as expected. I load the xxxx.properties file as follows:
    is_ = getClass().getResourceAsStream("/resources/xxxx.properties");
    Because it is not possibl to change any property values inside the jar-file without recreating this jar-file, i want to exclude the xxxx.properties file from the jar-file and put it in the folder containing the jar-file.
    So i have:
    drive:/folder/app.jar
    drive:/folder/xxxx.properties
    Now i read the xxxx.properties file from disk in stead of the 'resouce'-folder within my application (jar):
    is_ = getClass().getResourceAsStream("drive:/folder/xxxx.propoerties");
    but it doesn't work, the file isn't found.
    What am i missing here?
    Any suggestions?

    The best way to approach this is to include the properties file in the Jar as you originally did. If the user changes any property, save the entire set of properties to a sub-directory of user.home (perhaps based on the package name of the main class). Check for the copy in user.home before using the 'default' properties built into the Jar.
    Other places/ways to store the changed information.
    - java.util.prefs.Preferences
    - Assuming the app. has a GUI and can be deployed over a network, the JNLP API PersistenceService. Here is a demo. of the PersistenceService (http://pscode.org/jws/api.html#ps).
    Edit 1:
    I did not at first notice that this post was in Java Applet Development.
    <li> Applets can also (theoretically) use cookies to store information. This is prone to failure when users disable cookies.
    <li> To store information on the local file system (e.g. in user.home) or to use Preferences (AFAIU) would require trusted code.
    <li> If the user has the Next Generation Java Plug-In (Java 1.6.0_10+) it is possible to leverage the JNLP API services in an embedded & sand-boxed applet.
    Edited by: Andrew Thompson on Feb 1, 2011 9:32 AM

  • JRE7Update25 Deployment Properties File Not Working And Cant Disable Next Gen Plugin

    Good Day
    Our organisation needs to deploy JRE7U25 to over 4000 workstations. Our desktops are running the following Windows and IE combinations:
    WinXP 32 Bit/IE7
    WinXP 32 Bit/IE8
    Win7 32 Bit/IE8
    Win7 32 Bit/IE9
    Win7 64 Bit/IE8
    Win7 64 Bit/IE8
    We use the 32bit JRE installer across all environments and all IE browsers use 32Bit IE. On all of our environments the Deployment.properties and config files no longer work due to what appears to be a bug in the JRE7U25 installer. Our deployment files are as follows:
    Deployment.config
    deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
    deployment.system.config.mandatory=true
    Deployment.properties
    deployment.security.level=MEDIUM
    deployment.security.level.locked=
    deployment.javaws.autodownload=NEVER
    deployment.javaws.autodownload.locked=
    deployment.security.mixcode=HIDE_RUN
    deployment.security.mixcode.locked=
    deployment.console.startup.mode=HIDE
    deployment.console.startup.mode.locked=
    Both files are being copied to the following location:
    C:\Windows\Sun\Java\Deployment
    After the installer runs and deployment files are copied to the workstation the deployment.properties and config files look like this:
    Deployment.config
    deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
    deployment.system.config.mandatory=true
    Deployment.properties
    #System Deployment Properties
    #Mon Jul 01 12:29:20 CAT 2013
    deployment.security.level=MEDIUM
    I have tried changing the deployment.config file as follows in an attempt to fix this to no avail:
    1. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=true
    2. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=false
    3. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=true
    4. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=false
    5. deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    None of the above mentioned works. So all our required settings in the deployment.properties file are being overwritten when opening the Java console? Our other major problem is that Changing the registry key to 0 in order to disable the next generation plugin does not disable the next generation plugin in Jre at the usual location as it worked for us machine wide (across multiple profiles for JRE6U29):
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\10.25.2]
    "UseNewJavaPlugin"=dword:00000000
    ^^I have observed on a fresh install of JRE7U25 that the above mentioned registry key no longer exists in this version so a computer wide disablement of this option is no longer possible via the registry.
    On our 32Bit and 64bit machines running the 32 bit JRE 7U25 client when we disable the next generation plugin it keeps enabling itself again. Even when we run the javacpl.exe to run as administrator by changing the compatibility settings and disabling the next generation plugin it enables itself again. This is a huge problem for us because our company Oracle web based applications need this plugin to be disabled in order to run the apps properly.
    These are major obstacles for our deployment as we desperately require assistance or any advice in addressing these issues as there appear to be numerous bugs with the JRE7U25 release. Thank you in advance.
    Update 7 July 2013:
    I have observed that if you have the following options in your Deployment.config file it doesn't allow our java webstart apps which use jnlp extensions to run.
    1. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=true
    2. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=false
    3. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=true
    4. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=false
    The jnlp file association is also broken on Windows XP workstations with JRE7U25. We are having to manually associate the .jnlp file extension with javaws.exe on workstation for Web start apps or else users cannot lauch JRE whn clicking on .jnlp links.
    The only Deployment.config syntax which allows our Webstart applications to run is as follows:
    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    What a mess!

    I don't have an answer to the problem, but I am having problems with the system level deployment.properties file and IE9 on Windows 7 32/64bit.
    Starting with version 13, the IE plugin seems to igonore the system level deployment.properties file in favor of the user level deployment.properties file. When I open the Java Control Panel, the settings are correct per the system deployment.properties file. Currently to get the Java Plugin to work reliably in IE9 I have to set the following:
    _JAVA_OPTIONS = -Djava.net.preferIPv4Stack=true
    Disable caching
    Set the proxy to Direct Connection.
    If I set the _JAVA_OPTIONS as an environment variable and the other two in the system deployment.properties file, Firefox works fine, but IE wont load either of the Java tests. If I removed the system deployment.properties files and configure the user deployment.properties file, both IE and Firefox work fine.
    I find it interesting that if I set the configuration through the control panel, then apply the system deployment.propteries file, the user deployment.properties file reverts to defaults when the system file is removed.

  • Is there a way to save a specific set of open files?

    Hi,
    I'm trying to figure out if it's possible to save a specific set of open files in Flash so that when you close the app and then reopen it, you would either see the files that were open when you closed Flash or at least have the option to select it and it woud then open those files in the order that you left them.
    Is that an option by any chance?
    With all my class files open at one time, I hate having to reload them into the order that makes sense to me every time I launch Flash.
    I was looking into the Projects panel which seems like it's in the direction of what I would like but I can't seem to find anwhere that saves open files.
    Thanks in advance for any insight into this!
    Cole

    I don't believe this is possible with Flash - I've used Flash for a long time, and certain learn new things all the time! But Flash only has a "memory" of recently open files, and doesn't automatically open them for you.
    But, for class files, you're in luck. There's a 3rd party AS editor, FlashDevelop, that does EXACTLY that. When you launch it, it auto opens the multiple AS files you ahd open from the previous day/session. FlashDevelop is a wonderful tool to use for editing your AS (and is quicker than Flash, and does custom class introspection, where it auto-completes your own class properties & methods, as well as many other developer-friendly features).
    http://www.flashdevelop.org
    Here is a screen grab of what Flash Develop lloks liek for me when I open it (showing multiple class files opened yesterday, without me having to open them today)

  • How Can i specify multiple server names in rwservlet.properties  file?

    How Can i specify multiple server names in rwservlet.properties file without clustering?
    I am using oracle 10g Application server. we have 3 servers Repsvr1, RepSvr2 and RepSvr3. Now i need to configure rwservlet.properties file to point to these servers based on any running report. i got 3 keymap files with reports info.
    Sample entry in the key map file is:
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    rwservlet.properties file letting me to enter only one servername. Even though i merged all 3 keymap files into 1, still i have the server name issue. If i leave the server to the default name still i am getting the below error.
    REP-51002: Bind to Reports Server Repsvr1 failed. However, i know the default rep_<servername> would be used incase we dont have SERVER=<value> parameter in the rwservlet.properties file.
    If i specify the servername in the rwservlet.properties file then only Repsvr1 reports are working fine and other 2 server reports are giving the same error like
    REP-51002: Bind to Reports Server <<Server Name>> failed.
    how can i configure the info which will work all 3 reports. 2 Port servers are invoking using oracle forms and report server is invoking using ASP pages.
    If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error, whenever i am trying to integrate all 3 to workable i am getting binding error. if i exclude the server from rwservlet.properties still i am getting the same error.

    My RELOAD_KEYMAP setting is YES only.As i said If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error.
    keymap file entries
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    If i use http://server.domain:port/reports/rwservlet? cmdkey = key1 should bring the report from Repsvr1 and http://server.domain:port/reports/rwservlet? cmdkey = key2 should bring the report from Repsvr2, but i am getting an error from Repsvr2 saying that REP-51002: Bind to Reports Server repsvr2 failed.
    Only Servername Repsvr1 is in rwservlet.properties file. Now what is the best option to by pass the server from rwservlet.properties file and should be from keymap file. if i comment server name in rwservlet.properties file still i am getting REP-51002: Bind to Reports Server <<Server Name>> failed error for both keys.

  • How to set CORS properties for BLOB Storage using node?

    Hi - I just got started with Azure using a Node-based web site and mobile services.
    I am following various documentation in order to provide an API for users to upload images via a time-restricted SAS for the BLOB Storage.
    In order to upload my image, I need to set the CORS configuration for the BLOB Storage. Unfortunately this cannot be done via the management portal.
    I'm unclear as to how to accomplish this. I'm considering using the startup.js file in my mobile service to make a post request to the BLOB Storage REST API:
    http://msdn.microsoft.com/en-us/library/windowsazure/hh452235.aspx
    Are there appropriate methods in the Node SDK to make this easier, especially the signing part?
    What is the recommended way for setting CORS properties for the BLOB Storage via Node?
    Thanks for your help
    Stefan

    Unfortunately Node SDK does not support CORS functionality yet. Your option would be to write code which consumes the REST API for setting CORS. Not sure if it helps but there's a free tool out there written by my company which you can use to set CORS
    on your storage account. More information about this tool can be found here:
    http://blog.cynapta.com/2013/12/cynapta-azure-cors-helper-free-tool-to-manage-cors-rules-for-windows-azure-blob-storage/
    Hope this helps.

  • How to load a .properties file by giving relative path in a JSP file.

    Hey guys,
    I'm trying to load a .properties file in a JSP using relative path...
    It is not taking the properties file..
    What is the problem...?
    Any solution..?
    Thanks a lot.

    Yes I tried that also.
    Your path was something like this ?
    http://localhost:8080/Database/a.properties ?
    Whether this path will change after client installation ? if no then what's the problem ?
    For client side installation how you are going to set your conf directory for your application ?
    You are not going to give client installation page ?which will have all the values to be set like conf path. database,user name(s),log folder,temp folder etc ? Why you are keeping everything on server ?
    Check if this is useful,
    String context = request.getContextPath();
    String rmtAdd = request.getRemoteAddr();
    String host = request.getRemoteHost();
    out.println("http://"+rmtAdd+context+"<BR>");
    out.println("http://"+host+context);
    "http://"+rmtAdd+context
    Edited by: kanad on Jan 12, 2008 1:29 PM

  • Problem in loading a Properties File

    Following is my program which is actually reading a Properties file from a specific location and saving it latter. The program is able to save the Properties file but gives NullPointerException while reading it back.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Map;
    import java.util.Properties;
    import java.util.Set;
    import com.server.config.ConfigurationException;
    import com.server.config.SimpleNetworkConfigurationManager;
    public class Test {
         private static final Properties DEFAULT_CONFIGURATION;
         private static final String CONFIGURATION_FILE = "config/server_config.cfg";
         protected Properties m_config;
         static {
              DEFAULT_CONFIGURATION = new Properties();
              DEFAULT_CONFIGURATION.setProperty("ServerName", "Utility Server");
              DEFAULT_CONFIGURATION.setProperty("Host", "localhost");
              DEFAULT_CONFIGURATION.setProperty("Port", "1100");
         public Test(){
              try {
                   loadConfiguration();
              } catch (ConfigurationException e) {
                   //TODO: Log error message
                   System.out.println("Could not load Configuration; Reason: "+e.getMessage());
                   this.m_config = new Properties();
                   this.m_config.putAll(DEFAULT_CONFIGURATION);
         public Map getAllConfigurationParameters() {
              return m_config;
         public Set getConfigurationKeys() {
              return m_config.keySet();
         public Object getValue(String configurationParameter) {
              return m_config.getProperty(configurationParameter);
         public void loadConfiguration() throws ConfigurationException{
              try {
                   this.m_config.load(new FileInputStream(CONFIGURATION_FILE));
              } catch (FileNotFoundException e) {
                   throw new ConfigurationException(e);
              } catch (IOException e) {
                   throw new ConfigurationException(e);
         public void saveConfiguration() throws ConfigurationException {
              FileOutputStream fos = null;
              try {
                   File file = new File(CONFIGURATION_FILE);
                   file.createNewFile();
                   fos = new FileOutputStream(file);
                   this.m_config.store(fos,"Utility Server Configuration");
              } catch (FileNotFoundException e) {
                   throw new ConfigurationException(e);
              } catch (IOException e) {
                   throw new ConfigurationException(e);
              }finally{
                   if (fos!=null){
                        try {
                             fos.close();
                        } catch (IOException e) {
                             //ignore
                        fos = null;
         public void setConfigurationParameters(Properties configurationParameters) {
              this.m_config = new Properties(configurationParameters);
         public String setConfigurationParameter(String param, String value) {
              return (String)this.m_config.setProperty(param, value);
         public static void main(String[] args) {
              Test configManager = new Test();
              try {
                   configManager.saveConfiguration();
              } catch (ConfigurationException e) {
                   e.printStackTrace();
    }The Exception is as follows:
    Exception in thread "main" java.lang.NullPointerException
         at Test.loadConfiguration(Test.java:52)
         at Test.<init>(Test.java:29)
         at Test.main(Test.java:92)
    Please help me. I am unable to understand why is it happening. May be that I am doing some silly mistake.

    dhirendra_logicon wrote:
    The Exception is as follows:
    Exception in thread "main" java.lang.NullPointerException
         at Test.loadConfiguration(Test.java:52)
         at Test.<init>(Test.java:29)
         at Test.main(Test.java:92)
    Please help me. I am unable to understand why is it happening. May be that I am doing some silly mistake.Well, obviously, m_config is null. You cannot call a method on a null value.

Maybe you are looking for

  • Apps purchased on iOS 4.2.1 no longer available unless i purchase a new ipod touch.

    I restore my ipod touch (2nd Gen) and some purchased apps are No More Longer Available on it, So my question is how can i get all my purchased app and use it again on my ipod?.   Some apps are Adobe, iBook, and a lot games, and essential apps like Tw

  • Help me on my hp administra​tor password or power on power pls

    Good Morning Pals, am using hp window 8 product, my junoir brother when ahaead to input power on password. he forget what he use. now my ready to print my project from it since day before yesterday. after i press the password he though he used 3 time

  • EIDE drives

    Are EIDE drives somehow different from IDE drives. What I really need to know is--Can a Western Digital EIDE 13Gb drive be installed in a G3 B&W? Is there some trick to the process? I have tried all of the jumper positions on both drives and I can ne

  • Include a new tab and add custom fields in transaction ME21n

    Hi All, I have a requirement to add a new tab at the header level and include 4 custom fields to the tab in ME21N transaction. I need to use BADI for developing this. Can any one help me with the procedure to how to include the tab and add new fields

  • RE: Documentation with the help of ARIS or Solution manager ?

    Good day to all, We have a documentation requirement from one of our client. The current situation is : The client had implemented SAP about 5 years back but has no Documentation for the any of the Transactions, or any of the Zprogram that were creat