gpt4 book ai didi

java - 修改jdk文件夹中的src.zip文件

转载 作者:行者123 更新时间:2023-12-02 07:22:47 26 4
gpt4 key购买 nike

我可以修改src.zip(它包含预定义的java类)以便我

首先解压缩,然后添加我的个人包压缩并替换 src.zip 与此我修改了新的 src.zip。

这样我就可以像任何其他类一样导入它们。

最佳答案

查看 CLASSPATH 上的 Java 教程。这提供了一种添加 Java 使用库的可扩展方法,这不会影响原始安装,并且可以在运行的进程之间进行隔离。

The CLASSPATH variable is one way to tell applications, including the JDK tools, where to look for user classes. (Classes that are part of the JRE, JDK platform, and extensions should be defined through other means, such as the bootstrap class path or the extensions directory.)

The preferred way to specify the class path is by using the -cp command line switch. This allows the CLASSPATH to be set individually for each application without affecting other applications

您很少需要接触 JDK/JRE 安装,我强烈建议不要这样做。通过使用上述机制,每个应用程序都可以指定自己的库,并且您可以在 JDK/JRE 的变体之间进行交换,而不必确保修改每个部署。

关于java - 修改jdk文件夹中的src.zip文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13992021/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com