Hi. I want to import java.nio.files.Files and java.nio.file.StandardCopyOption packages for copying a file. I am able to run this standalone. Next, I am trying to create an agent in Lotus Notes (using jvm 8). When compiling agent and saving, told java.nio.files does not exist. That is a surprise as I think java.nio.files was new with jvm 7. I then used "edit project" and added rt.jar from the standalone jvm 8 on my workstation. Now I get a "cannot access java.nio.file.Files" compile error. Does anybody have any idea why it cannot access? Thank you so much for reading.
Note: adding rt.jar as classpath doesn't work. The SE api packages are sealed which means one cannot inject new classes into them.
The rt.jar (the one in the vm base directory) is loaded by the bootstrap classloader. An additional rt.jar in the classpath accessed by a standard runtime classloader then causes errors as the base packages within in are already loaded and sealed off.
I can't come up with an analogy why it's a bad idea to try to copy some base resources around.