• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How to read the System properties into file dynamically

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to to read the System properties into file dynamically. But i can't get the expected result. Please help me.

Advance Thanks,

ReadFromFile.java


log.file


Expected Result
mytable

Getting Result
${System.tablename}
 
Ranch Hand
Posts: 499
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
meruva surendra,

As you said, your log file contains a String "${System.tablename}". So when you print out it will give you a String "${System.tablename}".

Note: ${System.tablename} is different from "${System.tablename}"
 
meruva surendra
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for prompt reply. String is not a issue but just i want to know the way(${System.tablename}) getting value into file is right or not???
 
Partheban Udayakumar
Ranch Hand
Posts: 499
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

meruva surendra wrote:but just i want to know the way(${System.tablename}) getting value into file is right or not???



When running your program, it may or may not take the value (depends on how you have configured) but if you read the file and print it out it will display the string written inside the file.
 
reply
    Bookmark Topic Watch Topic
  • New Topic