Initializing all Java classes at Start-Up
Jean-Marie Dautelle writes "Java classes are initialized at first-use only which can introduce significant runtime delays detrimental to real-time or games applications (for which accurate scheduling is often required).
To solve this problem, the latest open-source Javolution library supports initialization of all Java classes at start-up (e.g.
javolution.lang.ClassInitializer.initializeAll(); // Initialize runtime classes (rt.jar) and all classes in classpath).
Note: Runtime class initialization (rt.jar) takes typically a few seconds and about 3 Mbytes of memory."
How long would it take someone to write this themselves if they needed it? 10 minutes?
.class files to the list of class names .zip, .war ... ) and find all class names in there.
Maybe a day ?
(1) Identify all files and directories that can be found in the CLASSPATH.
(2) Look at the directories and add all contained files to the list of files.
(3) Differentiate beween types of files:
(4) Add
(5) Look through all zip format files (.jar,
(6) Call ClassLoader#loadClass with all classnames.
(5) will take longest to write yourself, but there should certainly already be code out there tht gets that done
(6) Which ClassLoader to use? Surely the ClassLoader needs to be supplyable as a parameter.
db4o - open source object database for Java and