I'll be working on a project for instrumenting a relatively complex java application, and I'm planning to use java.lang.instrument to hook into the JVM and redefine classes before they're loaded.
我将研究一个用于检测相对复杂的java应用程序的项目,并计划使用java.lang。在装入类之前与JVM挂钩并重新定义类的工具。
What is your take on this package? Is it well supported across JVMs? Does it work well with Hotspot?
你对这个包裹有什么看法?它在jvm中得到很好的支持吗?它在Hotspot中工作得很好吗?
Thanks!
谢谢!
2 个解决方案
#1
1
java.lang.instrument is used by many very popular frameworks and pieces of software, including:
. lang。许多非常流行的框架和软件都使用仪器,包括:
- AspectJ
- AspectJ
- JRebel
- JRebel
- JProfiler
- JProfiler
- The java profiling extensions themselves
- java剖析扩展本身
which leds me to the conclusion that it is save to use. (Maybe not in your in case but that wasn't the question).
这使我得出结论,它是保存使用的。(也许不是你的以防万一,但那不是问题所在)。
I use all the given frameworks while using the HotSpot compiler, and got no problems.
我在使用HotSpot编译器时使用了所有给定的框架,没有出现问题。
#2
0
If you want to profile the java application, I would suggest using existing java profilers as this API is definitely still pretty new and has some issues.
如果您想对java应用程序进行概要分析,我建议使用现有的java分析器,因为这个API肯定还是相当新的,并且存在一些问题。
Though the following article was written in 2005, the findings pretty much are still relevant
尽管下面这篇文章是在2005年写的,但是这些发现仍然是相关的
http://www.javalobby.org/java/forums/t19309.html
http://www.javalobby.org/java/forums/t19309.html
#1
1
java.lang.instrument is used by many very popular frameworks and pieces of software, including:
. lang。许多非常流行的框架和软件都使用仪器,包括:
- AspectJ
- AspectJ
- JRebel
- JRebel
- JProfiler
- JProfiler
- The java profiling extensions themselves
- java剖析扩展本身
which leds me to the conclusion that it is save to use. (Maybe not in your in case but that wasn't the question).
这使我得出结论,它是保存使用的。(也许不是你的以防万一,但那不是问题所在)。
I use all the given frameworks while using the HotSpot compiler, and got no problems.
我在使用HotSpot编译器时使用了所有给定的框架,没有出现问题。
#2
0
If you want to profile the java application, I would suggest using existing java profilers as this API is definitely still pretty new and has some issues.
如果您想对java应用程序进行概要分析,我建议使用现有的java分析器,因为这个API肯定还是相当新的,并且存在一些问题。
Though the following article was written in 2005, the findings pretty much are still relevant
尽管下面这篇文章是在2005年写的,但是这些发现仍然是相关的
http://www.javalobby.org/java/forums/t19309.html
http://www.javalobby.org/java/forums/t19309.html