简体   繁体   English

如何在rt.jar中编辑.class以支持任意椭圆曲线

[英]How can I edit a .class in rt.jar to support arbitrary Elliptic Curves

I am trying to change the ECParameters class in sun.security.ec . 我正在尝试更改sun.security.ecECParameters类。 I need to do this in order to get arbitrary curves working, and I already downloaded the OpenJDK source, edited the code and compiled it again. 为了使任意曲线正常工作,我需要执行此操作,并且我已经下载了OpenJDK源代码,对代码进行了编辑并再次对其进行了编译。

I unpacked my current rt.jar and replaced all the files in sun.security.ec with my own compiled files. 我解压缩了当前的rt.jar并用自己的编译文件替换了sun.security.ec所有文件。 Everything looks right, but when I compile it again and try to start netbeans nothing happens.. 一切看起来都不错,但是当我再次编译它并尝试启动netbeans时,什么都没有发生。

Does anyone know what I did wrong, and how I should do it properly? 有谁知道我做错了什么,以及我应该如何正确做?

Edit: I have read that it is not recommended to edit these classes, but this particular class even has a piece of code that is commented out. 编辑:我读过,不建议编辑这些类,但是这个特定的类甚至有一段被注释掉的代码。

// The code below is incomplete.
//It is left as a starting point for a complete parsing implementation.

It is not a good idea to change compiled JDK classes. 更改已编译的JDK类不是一个好主意。 Why you don't use "normal" ways to implement your case? 为什么您不使用“常规”方式实施案件? As you already mentioned that it isn't a good way you could use the commented code you've found eg to implement an util class. 正如您已经提到的那样,这不是使用您发现的注释代码(例如实现util类)的好方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM