Properties « Core Library « Java Articles

Java Articles
1. Build Deploy
2. Class
3. Core Library
4. Data Types
5. Database JDBC
6. Design
7. Development
8. File Input Output
9. Graphics Desktop
10. J2EE Enterprise
11. J2ME Wireless
12. JVM
13. Language
14. Library Product
15. Network
16. Security
17. SOA Web Services
18. Test
19. Web Development
20. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Products
Java by API
Photoshop Tutorial
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Articles » Core Library » Properties 
1. Smartly load your properties
"Let's say you need to load a classpath resource that corresponds to a some/pkg/resource.properties file. I use classpath resource to mean something that's packaged in one of the application jars or added to the classpath before the application launches. You can add to the classpath via the -classpath JVM option each time the application starts or by placing the file in the <jre home>\classes directory once and for all. The key point is that deploying a classpath resource is similar to deploying a compiled Java class, and therein lies the convenience."

2. Escaping Properties Purgatory - Part 1
"In Listing 1, the Properties class is used to specify two name-value pairs that will be passed to the InitialContext constructor. The InitialContext constructor is a JNDI-provided factory method that loads different JNDI providers depending on the parameters passed in."

3. Escaping Properties Purgatory - Part 2
"The current installed based of Java applications includes thousands of shell scripts to correctly set various CCI properties. A wholesale industry switch to XML would require rewriting these scripts. Also, such a switch would be problematic where pre-1.4 versions of Java are still in use. So, XML cannot be a complete solution. A general-purpose CCI will need a backwards-compatibility mode that includes the various ad hoc solutions currently in place, without encouraging their continued use in the future."

w_ww.__j_av__a__2__s.__co__m_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.