| Author |
how to retrieve from .properties file using java.util package
|
rajesh mara
Greenhorn
Joined: Nov 30, 2006
Posts: 11
|
|
i have stored all sql statements in sql.properties (for example: retrieve =" select * from emp") how can i retrieve this statements from sql.properties using java.util package can please anyone send me the code how to get from sql.properties
|
 |
Jeremy Botha
Ranch Hand
Joined: Feb 16, 2005
Posts: 125
|
|
why java.util specifically? J
|
 |
Raghavan Muthu
Ranch Hand
Joined: Apr 20, 2006
Posts: 3327
|
|
explore java.util.Properties class and its associated APIs. you will get it. Try googling for sample programs for the same.
|
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
|
 |
Kiran Jakkaraju
Greenhorn
Joined: Jun 05, 2007
Posts: 2
|
|
Hi, If you have "MyResources.properties", and the above file has "KEY_WORD= xyz" To retrieve the KEY_WORD in your java file is: //initiate the Resource Bundle, and get the properties file. ResourceBundle myResources = ResourceBundle.getBundle("MyResources"); //get the keyword myResources.getString("KEY_WORD")
|
Kiran Jakkaraju<br />email: kiran.jakkaraju@gmail.com
|
 |
 |
|
|
subject: how to retrieve from .properties file using java.util package
|
|
|