Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I Reduce the size of JDK

 
Gourav Panda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I used only few API of JDK, and as I am working in embedded Environment I have very less Space in Memory.
Can any one suggest if I can reduce the size of the JDK to an optimum position so that only my Used API will be available.

Please share yours knowledge.

Thanks in advance.
 
Campbell Ritchie
Sheriff
Posts: 48409
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If embedding, why are you not using the micro-edition? The JVM only loads classes which are required, as far as I can remember, so unused classes are not loaded in the first place.
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about Java SE for Embedded?

And wasn't this exactly what Java Kernel was meant for as well - a small JRE that downloads what it needs afterwards?
 
Gourav Panda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2 good piece of information. Thanks!!
Java Karnel is in JDK 1.6, and Java SE embadded is not free?? I am not sure.

Actually the existing system uses JDK 1.1, Can I apply these concept you explained for JDK 1.0 as well?
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately no, since Java Kernel only exists since Java 6, and Java SE for Embedded will anyway no longer be available for such an old JVM.
 
Gourav Panda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, Now comes a compairision, JDK 1.1 VS JDK1.6 with Kernel
 
Gourav Panda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes Campbell You are correct, Class loaded only on demand!!
So if we reduce the size of JDK or not it does not matter!!

Thanks
 
Gourav Panda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But one advantage we will get if we can reduce the size of the JDK is that.
The look up for the class loading will be very fast.

It means, suppose VM want to load Class A, He has to find the class defination from a poll of classes.
So, the searching will be faster, if we reduce the number of class in the poll.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But one advantage we will get if we can reduce the size of the JDK is that. The look up for the class loading will be very fast.

My gut feeling is that you wouldn't even be able to measure the performance benefit you'd get out of this. (Of course, gut feelings are often wrong when it comes to performance, but I think this one is correct.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic