package java.lang.management does not exist
Pete Brunet
peter.brunet at oracle.com
Fri Jan 9 03:49:42 UTC 2015
HI Mandy,
On 1/8/15 9:34 PM, Mandy Chung wrote:
> On 1/8/2015 7:01 PM, Pete Brunet wrote:
>> Hi, I'd like to use
>> java.lang.management.ManagementFactory.getThreadMXBean.dumpAllThreads(true,
>>
>> true) but when building I get package java.lang.management does not
>> exist. Is there a way to get the build to find this package? Or is
>> there alternative to the dumpAllThreads method in some other package?
>
> Do you see
> BUILD_OUTPUTDIR/jdk/modules/java.management/java/lang/management/ManagementFactory.class
> in your jdk build?
That directory is there.
>
> There is a typo in your statement above - should be getThreadMXBean()
> - missing "()" would that be the reason?
>
> ManagementFactory.getThreadMXBean().dumpAllThreads(true, true);
That's a typo in my email. Sorry. It's OK in the code. Here's a
snippet from the build output:
Compiling 18 files for oracle.accessbridge
c:\Users\Pete\JDK9\JDK-8057620\client\jdk\src\closed\oracle.accessbridge\windows
\classes\com\sun\java\accessibility\AccessBridge.java:7207: error:
package java.
lang.management does not exist
System.out.println(java.lang.management.ManagementFa
ctory.getThreadMXBean().dumpAllThreads(true, true));
^
Pete
>
> Mandy
More information about the jdk9-dev
mailing list