问题描述
,并根据JEP 313和弃用文本 javac
与 -h $应该使用c $ c>标志:
javah
has been deprecated since JDK 8 and will be/has been removed in JDK 10, and according to JEP 313 and the deprecation text, javac
with the -h
flag should be used instead:
问题是, javah
对已编译的 .class
文件进行操作,而 javac
对源文件进行操作(即 .java
files。)
The problem is, javah
operates on compiled .class
files, while javac
operates on source files (i.e. .java
files.)
javah
与Kotlin和功能,因为一切都最终编译为Java字节码,但由于使用Kotlin时没有任何Java源文件,我看不出任何方式 javac -h
可以工作。
javah
works fine with Kotlin and external
functions, since everything ends up compiled as Java bytecode, but since there aren't any Java source files when using Kotlin, I don't see any way javac -h
could work.
Kotlin是否有 javah
替换或解决方法?
Is there a javah
replacement, or a workaround, for Kotlin?
推荐答案
我建议。
将来我还将实现一个更易于使用的命令行工具,该工具提供与javap类似的功能。
I recommend gjavap.
In the future I will also implement an easier-to-use command line tool which provides similar functionality to javap.
这篇关于Kotlin替代javah的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!