Are the XML files in the classpath of a java application always loaded into memo...
source link: https://www.codesd.com/item/are-the-xml-files-in-the-classpath-of-a-java-application-always-loaded-into-memory.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Are the XML files in the classpath of a java application always loaded into memory?
I have some configuration XML files in the classpath of a library project. Are these XML files always in main memory when the application ist running?
Additional Question: If not, how can i keep an XML file always in main memory?
No file in classpath is loaded automatically, even class files need a reason to be loaded. You have to use getResource or getResourceAsStream to access XML files. Then, it is unlikely you want to keep them in memory as byte or character arrays - better to convert them in more usable format.
If your application is executed under control of some web-container or application server, use its facilities to read configuration files.
Related Articles
Objective-C: Are all string literals always loaded into memory?
How to get the classpath of a Java application running on webstart?
Where are the logs of my Java application?
When is the file loaded into memory - for fread, fopen, and fwrite calls?
What are the fundamental differences between Java and C # in terms of internal / local / anonymous classes?
How many program / class copies are loaded into memory when multiple users access it at the same time
How can the jsp page be loaded into memory at once?
The index will be fully loaded into memory
What is the maximum size of a DataTable that I can load into memory in .Net?
You want to analyze the XML file in MySQL (using predefined functions / procedures) and insert it into the table
What are the best practices for changing application windows in Qt?
What are the components of a Web application?
JQuery - What are the differences between $ (document) .ready and $ (window) .load?
Counting the number of rows in a CSV file without loading into memory
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK