Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011
    Posts
    52
    Rep Power
    0

    Default Can we pass Parameter to the method through properties File.

    Hi All,

    Can we pass Parameter to the method through properties File.
    Java Code:
     Properties props = new Properties();
     props.load(new FileInputStream("MyProp.properties"));
      message = props.getProperty("name");
      JOptionPane.showMessageDialog(Form.this, message);
     MyMethod(message,10);
    I want to use name from properties file into mymethod.

    Please Help me.

    Thanks in Advance...

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default

    What happened when you tried it?

    db

    edit And don't double post, it wastes people's time.

    Abuse reported.
    Last edited by DarrylBurke; 04-18-2011 at 09:19 AM.

  3. #3
    Join Date
    Mar 2011
    Posts
    52
    Rep Power
    0

    Default

    Thanks for the reply,

    I am using Net beans 6.9.1 IDE, i m using try... catch Block for exception handling when i am using command prompt without try.. catch block this code works fine but when i use in net beans it will show some exception..

Similar Threads

  1. Replies: 18
    Last Post: 04-18-2011, 05:39 AM
  2. Replies: 1
    Last Post: 03-11-2011, 01:55 PM
  3. Replies: 10
    Last Post: 08-05-2010, 05:27 PM
  4. how to pass parameter from one jsp to another jsp
    By kader_sit in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-10-2010, 02:04 PM
  5. I can't seem to pass a file through a parameter
    By daletron3030 in forum New To Java
    Replies: 5
    Last Post: 01-15-2009, 06:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •