Re: [rvm-research] How to modify standard library?
Eliot Moss <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2/26/2015 8:35 PM, Nathan Ricci wrote: > I've been trying to modify java.lang.String to do an experiment, but I'm at a bit of a loss as > to how that ends up built. I tried to modify > <jikesrvm-base>/classpath/97.2p12/classpath/java/lang/String.java, but that changes there don't seem > to actually be incorporated when I run the rvm. I tried removing every .jar and .class file I could > find and building with real-clean to make sure everything was regenerated, but that did not work. > How is the classpath actually built, and where does the rvm look to find the compiled classes? > > --Nathan Ricci > Tufts University Hi, Nathan! The .class file generally comes from some slightly system specific jar file, often called rt.jar (for run-time, I guess). That's what you will see with the HotSpot and IBM JVMs. If you are changing only the .java file and not the native part, and are not changing the interface to the natives or otherwise fiddling things that will confuse them, you should be able to replace java/lang/String.class in that jar file. You *may* be able to search some other .jar file first in the bootstrap class path, and get your own version loaded that way without modifying the system rt.jar. I can't swear that JikesRVM is built the same way, but I expect so ... Eliot Moss ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/