user4577362
user4577362

Reputation:

How to check how many classes are loaded and how much space they will take?

I am planning to migrate to Java 8, before I want to check how many classes are being loaded in my project, and more important how much space they will take, so that I can tune and configure metaspace accordingly.

I know that I can use jstat for this purpose, but not sure what kind of parameters do I need to get the result I want.

Upvotes: 1

Views: 584

Answers (2)

Kedar Parikh
Kedar Parikh

Reputation: 1271

Use jconsole / jvisualvm from the bin of jdk. Its more intuitive and informative.

Upvotes: 1

Milkmaid
Milkmaid

Reputation: 1754

You should use some java profiler tool. Here are some of them link. YourKit is really decent but its not free.

Upvotes: 1

Related Questions