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

    Default Is there any way to control java application through a file

    Hi,
    i am trying to create anstand alone application where i want to pass values through a files, that should be used in my code. (like config file )

    How can i achieve this??

    Thanks in Advance....

    :)

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

  3. #3
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    Use a Properties file?

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

    Default

    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...

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

  6. #6
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    Can we pass Parameter to the method through properties File.
    so it is a strange task. The properties files is needed for configurations your codes and you want to configure a properties files :) What aim do you want to solve?
    Skype: petrarsentev
    http://TrackStudio.com

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

    Default

    I have an Excel sheet which i am reading through function.In the excel sheet my columns are not constant these are changing.

    eg. Initially date is in "C" range Now it is in "G". every time i need to change the code according to condition. If i can do this by passing parameters through properties file it is the best solution.

    Please tell me is it possible or is there any other way to do this.

    Thanks a Lot for Replying....

  8. #8
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    It is easy you just can make some input before run process.
    for example
    java UtilExlec -range=G
    That is all.
    Skype: petrarsentev
    http://TrackStudio.com

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

    Default

    Can you tell me something about Config Files.

  10. #10
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    So if you need often change some parameters in your configurations this approach is better.
    What do you want to heart about Config File?
    Skype: petrarsentev
    http://TrackStudio.com

Similar Threads

  1. Browser Control in standlone application
    By tvks in forum New To Java
    Replies: 0
    Last Post: 12-18-2009, 09:37 AM
  2. Replies: 0
    Last Post: 12-03-2009, 06:46 AM
  3. Excel macros to control Java application
    By musicgold in forum Advanced Java
    Replies: 8
    Last Post: 04-25-2009, 10:43 PM
  4. Delegate Control from one Application to another
    By saikumarkomati in forum Advanced Java
    Replies: 4
    Last Post: 01-24-2009, 03:19 AM
  5. Remove control characters in txt file
    By trivektor in forum New To Java
    Replies: 7
    Last Post: 09-23-2008, 04:22 PM

Posting Permissions

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