Write alternatives to Java standard class libraries from scratch

I'm just curious, but I wonder if I can completely delete the Java standard class library attached to the JVM and start a new [à llasspath] from scratch

If possible, which classes must implement the least? Objects and strings appear in my mind, but... I don't know

Such a thing breaks some rules. Is there any way to say "don't use rt.jar" to the "Java" command?

Thank you in advance,

Ernesto

Solution

You can use the - xbootclasspath option to specify your own set of core classes

If you follow this path, you may encounter many problems if you intend to use third-party libraries, because they will depend on the core API, and any inconsistency in your version may lead to errors

As an absolute minimum, you may have to re implement Java Lang package In addition to object and string, the original wrapper class needs to exist for automatic boxing I don't think you can replace Java without quite a lot of native code Lang makes threads work

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>