• Post Reply Bookmark Topic Watch Topic
  • New Topic

Lack of ClassLoader in J2ME & Java Reflection

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that thread, I have seen that we can use ClassLoader class to apply the duplicating a class and creating a new one with extra capabilities....

In small and very limited systems such as in J2ME, ClassLoader class is not available... In this case, how can one achieve the goal to create classes like you said in the above mentioned thread?

And could you please tell us a bit about your aspect on class loading mechanism that will be available in J2ME systems? Thanks...
 
Nate Forman
author
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not too familiar with J2ME. I took one OOPSLA tutorial in 2002, but virtually all of my programming experience is J2SE. Do you mean that there is no ClassLoader, it's not available to you, or that you can't make your own?

Also, perhaps there are some other readers with more experience who care to comment?

Best Regards,

Nate
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ko Ko,
Take a look at this article from IBM. It has a section on the CLDC (512K of memory or less) for J2ME. A CLDC J2ME implementation doesn't need to support reflection. This is mainly due to the memory constraint.

However, larger devices like PDAs probably could handle reflection. So I don't think we can generalize for all of J2ME.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nate Forman:
I am not too familiar with J2ME. I took one OOPSLA tutorial in 2002, but virtually all of my programming experience is J2SE. Do you mean that there is no ClassLoader, it's not available to you, or that you can't make your own?

It's ok, Nate. I am just curious to know whether there is a way to apply reflection in J2ME field... There is no ClassLoader in J2ME field... ANd it is not available to us or we can't make our own, because of the limitation of the device support and the memory consumption issue... but I just would like to know if there will be some way to acheive custom class loading feature in the future...
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
Take a look at this article from IBM. It has a section on the CLDC (512K of memory or less) for J2ME. A CLDC J2ME implementation doesn't need to support reflection. This is mainly due to the memory constraint.


Thanks a lot for the link to the great article... But I don't think CLDC 1.1 Spec mandates only 192KB of memory, 512KB is not needed for CLDC-compliant device to support... Well, I've just passed SCMAD exam last two weeks ago. So the memory requirement for CLDC-compliant device is nailed in my head for the exam...

So I can see that CLDC implementation doesn't need to support reflection. But I am so eager to know and can't still find any info about the future support for the reflection in CLDC...

BTW, Jeanne, do u have any idea about that? Maybe you are the one, Nate is talking about, who got both reflection API experience and J2ME experience...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ko Ko Naing:
BTW, Jeanne, do u have any idea about that? Maybe you are the one, Nate is talking about, who got both reflection API experience and J2ME experience...

Nope, Sorry. I have relection experience, but just an interest in J2ME. I haven't actually used J2ME to do a project.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!