Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: passign value at the runtime in the program

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default passign value at the runtime in the program

    I have a program in which i want to pass the value of file path at runtime without asking for it from user.

    String fPath="C:\\user\\jProp.properties

    i want to assign the value to the fPath variable at runtime and not like mentioning it in the program. How can i do it?


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: passign value at the runtime in the program

    Why don't you want the path variable visible in the program source?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

Similar Threads

  1. Exit Status from Perl program called by java using runtime
    By twk in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 2nd, 2011, 03:19 PM
  2. In eclipse how do you get the runtime of your program?
    By beginnerprogrammer in forum Java Theory & Questions
    Replies: 5
    Last Post: May 22nd, 2011, 04:19 PM
  3. Runtime Error
    By SyntheticD in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 10th, 2011, 04:09 PM
  4. Runtime Error running in UVA
    By mathfxr in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 17th, 2010, 03:06 PM
  5. Create buttons at runtime
    By rtumatt in forum AWT / Java Swing
    Replies: 2
    Last Post: May 24th, 2010, 07:42 AM