Lost in J2ME

S

Sebastien Roy

If anyone could get me out of the bush I'm in, I would greatly appreciate.

I have been asked to build a program that would allow our handheld scanners
(Symbol 81xx) to communicate directly with our ERP. Unfortunately, I have
never taken a look at J2ME before. I am very comfortable with Java and have
developed most of our solutions using it (J2SE and J2EE), but when it comes
to J2ME, I'm totally lost. I took a look at sun's website and first thought
that CLDC was the solution, though I realized that it was meant for "devices
with limited memory, processing power". I have 64 megs on these devices
which I think is acceptable and not so limited. Also, I wanted this new
application to look good and I definitely wouldn't want to have a "cellphone
look". I really don't know where to go and what to use.

Could anyone bring some light on my problem?

Thanks in advance!
 
R

Roedy Green

Could anyone bring some light on my problem?

Which sides are you writing client, server or both?

Your client basically pretends to be a browser sending GETS and POSTs.
The messages might be packed with binary data.

Your server code would think it was talking to a browser that send a
lot of strange characters. Other than that it would be an ordinary
Servlet or J2EE app.

I am in a similar boat to you. I am trying to get my head around J2EE
by studying other production apps.
 
A

Andreas Rossbacher

Sebastien said:
Could anyone bring some light on my problem?

Like with all Java you need a VM which is application is
running on. Does the device have such a VM? If so, what
J2ME class models are supported?
These are the first things to find out.
 
D

Darryl L. Pierce

Sebastien said:
If anyone could get me out of the bush I'm in, I would greatly appreciate.

I have been asked to build a program that would allow our handheld
scanners (Symbol 81xx) to communicate directly with our ERP.
Unfortunately, I have
never taken a look at J2ME before. I am very comfortable with Java and
have developed most of our solutions using it (J2SE and J2EE), but when it
comes
to J2ME, I'm totally lost. I took a look at sun's website and first
thought that CLDC was the solution, though I realized that it was meant
for "devices
with limited memory, processing power". I have 64 megs on these devices
which I think is acceptable and not so limited.

The CLDC *minimally* targets limited resource devices.
Also, I wanted this new
application to look good and I definitely wouldn't want to have a
"cellphone
look". I really don't know where to go and what to use.

What is a "cellphone look"? The MIDP provides a straight forward user
interface API, the LCDUI, and leaves it to the OEM/MIDP implementor to
define how the actual widgets will look on the device, to make the Java
application consistent on each device, rather than making all devices look
the same.
Could anyone bring some light on my problem?

The first question is this: does the Symbol device on which you're working
*have* an implementation of the MIDP?
 
H

huy

Sebastien said:
If anyone could get me out of the bush I'm in, I would greatly appreciate.

I have been asked to build a program that would allow our handheld scanners
(Symbol 81xx) to communicate directly with our ERP. Unfortunately, I have
never taken a look at J2ME before. I am very comfortable with Java and have
developed most of our solutions using it (J2SE and J2EE), but when it comes
to J2ME, I'm totally lost. I took a look at sun's website and first thought
that CLDC was the solution, though I realized that it was meant for "devices
with limited memory, processing power". I have 64 megs on these devices
which I think is acceptable and not so limited. Also, I wanted this new
application to look good and I definitely wouldn't want to have a "cellphone
look". I really don't know where to go and what to use.

Could anyone bring some light on my problem?

Thanks in advance!

Hi Sebastien,

Take a look at the IBM J9 JVM. This supports CDC/Personal profile which
is probably what you want for the Symbol device. J2ME CDC/PP is J2SE
with some missing APIs (things Sun has decided you won't need for a PDA
application).

Don't bother looking for a free JVM from Sun, it doesn't exist.

Other things I would recommend:

1. Stay away from the Jeode JVM as it only supports PersonalJava, which
is the predecessor to J2ME and limits you to Java 1.1 APIs.
2. Stay away form AWT if your application requires many windows/frames,
try SWT (Eclipse project) instead.
3. Make sure you know how to use the JNI.


I've recently completed (field testing) a PDA app, on an Intermec
device. I used Jeode and AWT, and I can't say that it was a good experience.

Are you running Pocket PC on the Symbol ?

Email me if you need further help.

Huy Do
3.
 
D

Darryl L. Pierce

huy said:
Take a look at the IBM J9 JVM. This supports CDC/Personal profile which
is probably what you want for the Symbol device. J2ME CDC/PP is J2SE
with some missing APIs (things Sun has decided you won't need for a PDA
application).

Uh, no, that's quite misleading. The CDC is *not* J2SE, it's *not* the JVM.
It is the *CVM* which has lower resource requirements than does the JVM,
and runs a different class of byte code than the JVM.
Don't bother looking for a free JVM from Sun, it doesn't exist.

Currently, no, the CDC implementation from Sun for the PocketPC isn't
available for free.
Other things I would recommend:

1. Stay away from the Jeode JVM as it only supports PersonalJava, which
is the predecessor to J2ME and limits you to Java 1.1 APIs.

Personal Java is *not* the predecessor to any J2ME Profile, although there
is a well-documented migration path from Personal Java to the Personal
Profile.
2. Stay away form AWT if your application requires many windows/frames,
try SWT (Eclipse project) instead.

SWT isn't available on any profile. However, the AWT *is* available with the
Personal and Personal Basis Profiles.

<snip>
 
S

Sebastien Roy

Thank you all for your answers! I took note of each comment and it helped
me trying to figure out what I needed. I finally had a simple application
running on my device. I used CrEme implementation.

Thanks a lot again!

Sébastien
 
H

huy

Darryl said:
huy wrote:




Uh, no, that's quite misleading. The CDC is *not* J2SE, it's *not* the JVM.
It is the *CVM* which has lower resource requirements than does the JVM,
and runs a different class of byte code than the JVM.

I don't care much for CVM vs JVM specifics. I use JVM to mean an
application (I won't even say Java Virtual Machine) which executes my
java class files. I don't understand or care much for "different"
classes of byte code, as I am only an application programmer.
Personal Java is *not* the predecessor to any J2ME Profile, although there
is a well-documented migration path from Personal Java to the Personal
Profile.

Again, I don't care about marketing BS. PersonalJava was introduced
before J2ME to more or less cater for the type of devices we are
referring to here (the fact that it was crap is another matter),
therefore I can refer to it as preceding J2ME whether anybody else (Sun
or yourself) tells me otherwise. I am only a lowly programmer who wants
to write applications which satisfy requirements. I don't care much for
specifics which don't make a difference to this goal.
SWT isn't available on any profile. However, the AWT *is* available with the
Personal and Personal Basis Profiles.

Who cares if it's not part of the spec (Sun doesn't know everything),
just try using it with J9.



Cheers,

Huy
 
D

Darryl L. Pierce

huy said:
I don't care much for CVM vs JVM specifics.

You should, since your lack of caring is resulting in incorrect, misleading
information. Why would you want to be misleading?
I use JVM to mean an
application (I won't even say Java Virtual Machine) which executes my
java class files. I don't understand or care much for "different"
classes of byte code, as I am only an application programmer.

If you "don't understand or care" about proper information, then why give an
answer to someone's question? If you're not going to answer with correct
information, and know that up front, why give such an incorrect answer?
Again, I don't care about marketing BS.

It's not marketing. It's technology. And, it's not BS, it's fact. You're
being misleading and apparently you know that but don't seem to care, going
by what you've said.
PersonalJava was introduced
before J2ME to more or less cater for the type of devices we are
referring to here (the fact that it was crap is another matter),
therefore I can refer to it as preceding J2ME whether anybody else (Sun
or yourself) tells me otherwise.

It *predated* J2ME but it was not a *predecessor*; i.e., PersonalJava was
never incorporated into the technologies referred to by J2ME. To say it
does is to again be intentionally misleading. If you're not interested in
giving correct information, perhaps you should refrain from answering
questions?
I am only a lowly programmer who wants
to write applications which satisfy requirements. I don't care much for
specifics which don't make a difference to this goal.

But, it makes a *big* difference when someone is asking for technology
answers and you give them incorrect information. If you're not interested
in being at least partially correct, then perhaps you shouldn't offer
advice?
Who cares if it's not part of the spec (Sun doesn't know everything),
just try using it with J9.

Mate, you're making a good point for ignoring your advice. J9 is *not* a
certified VM, so writing to it is to lock yourself into *one* company's
implementation of a non-standard environment. That's a *bad* piece of
advice. No insult to IBM (I worked for them) but advising someone to do
that is horrible advice.
 
C

chris

Darryl said:
You should, since your lack of caring is resulting in incorrect,
misleading information. Why would you want to be misleading?

Huy's answer may not be backed by scripture, but the idea is not conveys it
not misleading. It's exactly the way I explain CDC/PP or CDC/FP when I want
to give a nutshell-sized answer. In fact it's exactly how I explained it
several times at a trade show yesterday.
If you "don't understand or care" about proper information, then why give
an answer to someone's question? If you're not going to answer with
correct information, and know that up front, why give such an incorrect
answer?

Even some of Sun's documentation using JVM in the sense of "any runtime
that implements the Java platform". Otherwise thay'd have to change every
occurrence of JVM to read "JVM, CVM, KVM, or any compliant blah blah blah",
which would make for pretty turgid prose.
It's not marketing. It's technology. And, it's not BS, it's fact. You're
being misleading and apparently you know that but don't seem to care,
going by what you've said.

Historically pJava precedes J2ME, and was targeted at the same market. The
fact that code developed for pJava will not run on any recent platform has
not gone unnoticed - it has cost the industry a great deal of money - but
that's another matter.
It *predated* J2ME but it was not a *predecessor*; i.e., PersonalJava was
never incorporated into the technologies referred to by J2ME. To say it
does is to again be intentionally misleading. If you're not interested in
giving correct information, perhaps you should refrain from answering
questions?


But, it makes a *big* difference when someone is asking for technology
answers and you give them incorrect information. If you're not interested
in being at least partially correct, then perhaps you shouldn't offer
advice?

SWT is available wherever it is installed. It's not part of any profile,
but then nor are a lot of things.
Mate, you're making a good point for ignoring your advice. J9 is *not* a
certified VM, so writing to it is to lock yourself into *one* company's
implementation of a non-standard environment. That's a *bad* piece of
advice. No insult to IBM (I worked for them) but advising someone to do
that is horrible advice.

Disagree strongly. J9 actually implements the spec pretty well, and I have
come across applications which (for reasons of compliance with the spec)
only run on two embedded VMs; J9 and one other. Since my company markets
the other VM, I'd love to be able to say that J9 sucks, but it ain't so.

IMO, insisting on the use of only Sun-certified VMs and Sun-certified
terminology is Horrible Advice. Both the certification process and the
"official" terminology are heavily coloured by Sun's perception of their
own commercial interests, and do not adequately reflect the technical
issues.

Keep cool,

Chris
 
H

huy

Darryl said:
huy wrote:




You should, since your lack of caring is resulting in incorrect, misleading
information. Why would you want to be misleading?

Hi Darryl,

I don't mean to press your technology sensitivy buttons, but as a user
of the technology, I am only trying to explain how I think people who
have not come across J2ME will find it most easy to understand (not the
subject heading "Lost in J2ME" not "I am a java expert who wants to know
the specifics of J2ME implementation".

I do not doubt your own expertise in this area as I will be the first to
agree that you probably know more than me about J2ME technology.
However, my own experiences with J2ME has been like Sebastien i.e
"Lost", and I have to say that it's partly because of the Sun
documentation as well as other information I have found on the net (I
have read your J2ME FAQ, and point 1 of your J2ME FAQ already confuses
me after reading your first reponse; something about CVMs not being
JVMs). It's just aimed at the wrong audience. Who isn't going to be
confused about all the J2[A-Z]E, Configurations, Profiles and [A-Z]VM.
If you "don't understand or care" about proper information, then why give an
answer to someone's question? If you're not going to answer with correct
information, and know that up front, why give such an incorrect answer?

Can you tell me how my answer can hurt people reading this thread ? How
have I construed the information so much that people will totally
misunderstand what J2ME is, and how to use it ? I do really want to
further my own understanding of J2ME so your help will seriously be
appreciated (if it turns out to be really helpful) ?
It's not marketing. It's technology. And, it's not BS, it's fact. You're
being misleading and apparently you know that but don't seem to care, going
by what you've said.

I have been extremely disappointed in recent years of software
technology. All the money spent in marketing crap technology instead of
improving it has been such a waste. I can name many a technology
including J2ME which in my opinion is all just marketing crappy older
technologies and making a much bigger deal about it then it really is
(don't get me wrong, it does achieve somethings, but it's not rocket
science). Instilling confusion and complexity into the problem space
where I feel none is needed.
It *predated* J2ME but it was not a *predecessor*; i.e., PersonalJava was
never incorporated into the technologies referred to by J2ME. To say it
does is to again be intentionally misleading. If you're not interested in
giving correct information, perhaps you should refrain from answering
questions?

Maybe you should try answering the question instead just telling me I'm
wrong. If I read something useful from yourself which persuades me that
I'm wrong, I'll tell the world myself that "I am giving incorrect
answers" and stop posting responses. Until that time, I am only trying
to help my fellow developers strive towards giving the world some
working software.

Mate, you're making a good point for ignoring your advice. J9 is *not* a
certified VM, so writing to it is to lock yourself into *one* company's
implementation of a non-standard environment. That's a *bad* piece of
advice. No insult to IBM (I worked for them) but advising someone to do
that is horrible advice.

If you would rather lock yourself to AWT, go for it. I am not stopping
you. From my own experiences, I hate it. It's ugly, slow, limited. To
advise people to use because it's some sort of standard is IMO "great
advice if you want to go through what I went through". In terms of
standard environments, Java has a long way to go before you can write a
PDA application which runs on multiple hardware platforms out there
without a fair bit of changes.

Hope I can learn something from this thread.

Cheers,

Huy Do
Reluctant J2ME programmer
 
D

Darryl L. Pierce

chris said:
Huy's answer may not be backed by scripture, but the idea is not conveys
it not misleading.

It *is*. It is *incorrect* information. The CDC is *not* J2SE. The CDC does
*not* run on the JVM, but runs on the CVM. The JVM requires *greater*
resources than the CVM. The byte codes that execute on the KVM and the CVM
are *not* the same as will execute on the JVM, since they must be
preverified.
It's exactly the way I explain CDC/PP or CDC/FP when I
want
to give a nutshell-sized answer. In fact it's exactly how I explained it
several times at a trade show yesterday.

Then you commit the same error he commits in that you give incorrect
information when you dumb it down for people. If you want to actually
*teach* somebody something, the worse thing you could do is give them *bad*
or *incorrect* information.
Even some of Sun's documentation using JVM in the sense of "any runtime
that implements the Java platform".

Cite please?
Otherwise thay'd have to change every
occurrence of JVM to read "JVM, CVM, KVM, or any compliant blah blah
blah", which would make for pretty turgid prose.

Why would they have to do that? Their technical documentation tells you
upfront what runtime environment is being described. Nowhere in the MIDP or
CLDC spec. is the JVM mentioned, only the KVM. The same with CDC,
Foundation, PP and PBP specifications, only there it's the CVM. What's I'm
hearing here is an attempt at rationalizing giving the wrong information
out to people.
Historically pJava precedes J2ME, and was targeted at the same market.

DOS preceeded J2ME technologies, but that does not make DOS the predecessor
to any J2ME technology.
The
fact that code developed for pJava will not run on any recent platform has
not gone unnoticed - it has cost the industry a great deal of money - but
that's another matter.

And irrelevant to what I have said.

SWT is available wherever it is installed. It's not part of any profile,
but then nor are a lot of things.

And as such is not going to be present on all platforms that support a
profile. The minute you target a non-standard API, you have effectively cut
your potential market considerably. SWT would have to be implemented *in*
the CVM/KVM in order for you to access it, so there's no way to just add it
to a platform. Therefore, Huy's suggestion to target SWT is bad advice.
Disagree strongly. J9 actually implements the spec pretty well, and I have
come across applications which (for reasons of compliance with the spec)
only run on two embedded VMs; J9 and one other. Since my company markets
the other VM, I'd love to be able to say that J9 sucks, but it ain't so.

Then answer one question: has J9 passed the TCK and is it a certified VM? If
your answer is "no" then whether it's the greatest thing for Java since
sliced bread is irrelevant; client companies make decisions based on more
than just peformance and stability (remember Windows?).
IMO, insisting on the use of only Sun-certified VMs and Sun-certified
terminology is Horrible Advice.

You would rather than each person just use whatever word they want for
whatever they're talking about?
Both the certification process and the
"official" terminology are heavily coloured by Sun's perception of their
own commercial interests, and do not adequately reflect the technical
issues.

Can you cite some examples of this?
 
D

Darryl L. Pierce

huy said:
I don't mean to press your technology sensitivy buttons,

The only button being pushed is the one triggered when someone is asked a
question about technology and knowingly gives incorrect information, who
knows they're doing so but doesn't care enough about the exchange to give
the right information.
but as a user
of the technology, I am only trying to explain how I think people who
have not come across J2ME will find it most easy to understand (not the
subject heading "Lost in J2ME" not "I am a java expert who wants to know
the specifics of J2ME implementation".

And when you give them incorrect information, they are going to build their
further understanding *on* that incorrect information. You tell them that X
is the predecessor to Y (when X only predated Y and the two are otherwise
unrelated), then they might end up wasting cycles to understand X first
before going to Y. Or, if you tell them that the Personal or Personal Basis
Profile runs on the JVM, they might spend alot of time trying to figure out
why certain features of the JVM aren't available to them, time they
wouldn't have wasted had you told them up front that it's not the JVM but
the *CVM* and that the VM has a *different* specification.

The point is, if someone asks a question about technology, you don't have to
dump the entire world on their shoulders in order for them to understand.
You can give them enough information as they need. But, if you give them
the *wrong* information, regardless of your intentions, you have done them
a DISservice in that you have *confused* their understandings.
I do not doubt your own expertise in this area as I will be the first to
agree that you probably know more than me about J2ME technology.
However, my own experiences with J2ME has been like Sebastien i.e
"Lost", and I have to say that it's partly because of the Sun
documentation as well as other information I have found on the net (I
have read your J2ME FAQ, and point 1 of your J2ME FAQ already confuses
me after reading your first reponse; something about CVMs not being
JVMs). It's just aimed at the wrong audience. Who isn't going to be
confused about all the J2[A-Z]E, Configurations, Profiles and [A-Z]VM.

The question is, who *is* going to be confused *more*, someone who is asking
a question and got a partial answer that contained accurate information or
someone who is asking a question and got a partial answer that contained
inaccurate information? Try thinking beyond the immediate, since someone
asking a question now is going to have 10 more questions tomorrow based on
the answer they receive today. If you gave them incorrect information
today, them tomorrow you're going to have to spend time *fixing* that
mistake and *then* answering new questions. Why not just avoid the problem
and either 1) give the right information the first time or 2) just don't
answer and avoid confusing them with the wrong information?
Can you tell me how my answer can hurt people reading this thread ?

Why don't you tell me how it helped them to have the wrong information? I'm
talking beyond this little thread to answering questions in general, but
using this particular one as an example.
How
have I construed the information so much that people will totally
misunderstand what J2ME is, and how to use it ?

That's quite an attempt at context switching. I didn't say "totally
misunderstand". I said you gave incorrect information to answer a question,
and in this case it was something that wasn't so unbelievably complex that
giving the right answer would have confused anybody. The problem is that if
you're inexact on such little subjects, how far off the mark are you if
someone asks a more detailed or technical question?
I do really want to
further my own understanding of J2ME so your help will seriously be
appreciated (if it turns out to be really helpful) ?

If you want to further your own understanding, read the specifications, work
with the reference implementations, join an expert group, work on a real
project using one of the many J2ME technologies. But, you further
*nobody's* understanding if you give out incorrect answers to questions.
You may have made the person go away thinking they've gotten what they
wanted, but when they try to build on that foundation they'll find it's
only sand...
I have been extremely disappointed in recent years of software
technology.

I'm very sorry to hear that.
All the money spent in marketing crap technology instead of
improving it has been such a waste. I can name many a technology
including J2ME which in my opinion is all just marketing crappy older
technologies and making a much bigger deal about it then it really is
(don't get me wrong, it does achieve somethings, but it's not rocket
science). Instilling confusion and complexity into the problem space
where I feel none is needed.

And your answer to that confusion is to compound it by giving out your own
incorrect information in answer to someone's question? I'm sorry you're so
disappointed with with Sun's marketing department, but that disappointment
is irrelevant to the point here.

If you're trying to get this to support or rationalize your claim that
Personal Java is a predecessor to the J2ME technologies (which is, again,
misleading, since in order to be a predecessor J2ME technologies would have
to be built *on* PJava, not just built after and for related markets)
you're rather falling short of the mark.
Maybe you should try answering the question instead just telling me I'm
wrong.

What question? The original? I *DID*, and I gave the *right* information in
answer to the OP's question. I didn't see anything that needed to dumbed
down to keep from confusing him in the first place. The OP was already
confused by the requirements for the CLDC, etc., and as such the last thing
he needed was more confusing information. Why do you assume he couldn't
handle the right information?
If I read something useful from yourself which persuades me that
I'm wrong, I'll tell the world myself that "I am giving incorrect
answers" and stop posting responses.

That's quite dramatic and over the top, don't you think? So, your only
answer is to stop posting? There's no chance you might reconsider giving
out dumbed down and/or incorrect information and instead just give good
information instead?
Until that time, I am only trying
to help my fellow developers strive towards giving the world some
working software.

And you don't see the problem in giving out incorrect information in
response to someone's question? You don't see anything wrong with giving
someone who's already confused answers that don't fix their confusion and
will instead confuse them more when they understand better the problem
domain?

For example, look at the curve of a parabola. It looks like a kind of like a
logarithmic curve. If someone who has only studied logarithms asks you "how
do I draw that curve?" would you tell them "use logarithms" to avoid
"confusing" them or would you say "use square roots" and point them in the
*right* direction?

The point is, you may have solved one immediate need (that of an answer) but
you have not solved the *real* need (that of a *correct* answer). I'm sorry
you don't see the difference.
If you would rather lock yourself to AWT, go for it. I am not stopping
you.

Where did I say that?
From my own experiences, I hate it. It's ugly, slow, limited.

And you're letting your own personal opinion color the information you give
to someone else.
To
advise people to use because it's some sort of standard is IMO "great
advice if you want to go through what I went through".

The advice to go with the standard is supported when the requirement is to
target as many platforms as are available. If you target the standard, then
you will run on any platform that supports the standard.

When you target *one implementation* then guess what? You will only run on
that *one* implementation. If that was your intention, then telling someone
to target that one implementation is good advice. If that was *not* your
intention, then it's *very bad* advice.

It would be like someone asking, "I want to write a killer MIDP game, how do
I do it?" If you answered, "download the Nokia SDK and check out their
FullCanvas class, you can write killer games with it!" would that be good
advice or bad? It would be good if they were targeting only Nokia phones.
It would be *HORRIBLE* if they were targeting all MIDP phones, since nobody
other than Nokia (and, at that, Series 40) supports the API.

The point is, you don't know what the OP's requirements are, so how could
you tell him to avoid writing to the specification and to instead target a
single implementation?
In terms of
standard environments, Java has a long way to go before you can write a
PDA application which runs on multiple hardware platforms out there
without a fair bit of changes.

And even that doesn't justify giving someone misleading information.
Hope I can learn something from this thread.

Me too.
 
H

huy

I think there is now enough said on both sides for others to decide
whether what I have said is wrong or not. I apologise if I have added to
anyones confusion but my intention was to help.

All the *correct* information available about J2ME can be found on the
SUN J2ME site and also Darryl's J2ME FAQ. If you don't understand it
after reading all that stuff, and want a dumb downed yet possibly
misleading version of my understanding of J2ME, please feel free to
peruse this thread to see if it helps any with your understanding.

Darryl, I take your point about the effects of inaccurate information
regarding JVM vs CVM if you are talking about low level VM features
(which I admittedly know almost nothing about). However, if you are
talking about features in terms of API's, I stand by *my* understanding
of J2ME.

One other point I just have to make (it's an itch), before you continue
lecturing me about *predecessors*, maybe you should look up a dictionary
on the meaning of the word. I generally respect all constructive
criticism, but not when it's basic premise is incorrect.

In terms of giving advice, I can only share my own experiences and
*colorised* as they are, like any information you get from the Internet
you should make your own decisions about it's relevance and helpfulness.
See it as pointers and not the be all and end all answers you wish them
to be (well that's at least how I see it).

Cheers

Huy Do
 
D

Darryl L. Pierce

huy said:
I think there is now enough said on both sides for others to decide
whether what I have said is wrong or not. I apologise if I have added to
anyones confusion but my intention was to help.

Facts are not determined by popularity. Your answers were factually wrong.
All the *correct* information available about J2ME can be found on the
SUN J2ME site and also Darryl's J2ME FAQ. If you don't understand it
after reading all that stuff, and want a dumb downed yet possibly
misleading version of my understanding of J2ME, please feel free to
peruse this thread to see if it helps any with your understanding.

You gave to the OP several "dumb downed" answers that were factually
incorrect:

1. "J2ME CDC/PP is J2SE with some missing APIs"

The CDC/PP is *not* J2SE. The CDC is the C Virtual Machine with a core set
of APIs, most of which were taken from the core Java APIs for compatibility
and to make for an easier learning curve. But, it is *not* J2SE.

2. "Stay away from the Jeode JVM as it only supports  PersonalJava, which is
the predecessor to J2ME and limits you to Java 1.1 APIs."

PersonalJava is *not* a predecessor to any J2ME technology. The closest
relationship between any aspect of J2ME and PJava is the migration path
from PJava to the Personal Profile. That's it. PJava *predated* J2ME.

3. "Stay away form AWT if your application requires many windows/frames, try
SWT (Eclipse project) instead."

SWT is not available in any profile. It's available on one non-standard VM
implementation. You state later that you personally don't like AWT, but
that's not quite justifiable as support for the advice you gave, which was
effectively "avoid the standard, go with a non-standard".
Darryl, I take your point about the effects of inaccurate information
regarding JVM vs CVM if you are talking about low level VM features
(which I admittedly know almost nothing about). However, if you are
talking about features in terms of API's, I stand by *my* understanding
of J2ME.

Then why don't you try next time saying "Personal Profile is a subset of the
*CORE JAVA APIS*"? That's alot more accurate and not in the least
misleading. What you said was that Personal Profile was "J2SE with some
some missing APIs" which is a completely *different* statement and
factually wrong.
One other point I just have to make (it's an itch), before you continue
lecturing me about *predecessors*, maybe you should look up a dictionary
on the meaning of the word. I generally respect all constructive
criticism, but not when it's basic premise is incorrect.

Ancestor, indicates a direct relationship. There is no direct relationship
between PJava and Personal Profile. This topic can be debated since
"predecessor" can also mean one who takes the place of another, but even
that's not entirely accurate with regards to PJava and Personal Profile.
In terms of giving advice, I can only share my own experiences and
*colorised* as they are, like any information you get from the Internet
you should make your own decisions about it's relevance and helpfulness.
See it as pointers and not the be all and end all answers you wish them
to be (well that's at least how I see it).

Then I have one piece of advice for you, and you can do with it as you wish:

Rather than taking my responses as being nothing but personal attacks on
you, why not take what I'm saying and think about it. Instead of defending
your laissez faire "that's the best I'm willing to try" attitude towards
answering a question, why not consider "I'll answer with some degree of
accuracy when I answer a question" as a goal?

What is the purpose of answering someone's questions? Is it to help *them*
or to help *you*? And how do you help someone when you don't give them the
right answer? What is better, good or good enough?
 
C

chris

Darryl said:
The CDC/PP is *not* J2SE. The CDC is the C Virtual Machine with a core set
of APIs, most of which were taken from the core Java APIs for
compatibility and to make for an easier learning curve. But, it is *not*
J2SE.

Darryl,

You are making a categorical error which is even worse than the factual
inaccuracies of which you accuse others.

CDC/PP is a _specification_. Better still, it is two specifications. :)
(One for CDC, one for PP). The CVM (known this week as the CDC HotSpot
Implementation) is -surprise - an _implementation_. Other implementations
may comply with the specification, and a Technology Compatibility Kit
exists for this purpose. The TCK is available from something called the
Java Partner Engineering group.

This is perfectly clear on <http://java.sun.com/products/cdc/index.jsp>. I
don't see why you're trying to make it unclear.
 
C

chris

Darryl said:
[...] The byte codes that execute on the KVM and the CVM
are *not* the same as will execute on the JVM, since they must be
preverified.

The CVM requires preverification? Hm, I'd missed that. So I've learnt
something after all, out of all this flamage. :)
 
D

Darryl L. Pierce

chris said:
You are making a categorical error which is even worse than the factual
inaccuracies of which you accuse others.

I'll be glad to see where you show me the categorical error, since CDC/PP
are J2*M*E (category 1) and J2*S*E is a separate category of Java
technology.
CDC/PP is a _specification_. Better still, it is two specifications. :)
(One for CDC, one for PP). The CVM (known this week as the CDC HotSpot
Implementation) is -surprise - an _implementation_.

An implementation of *what*? A *J2ME specification*. Is such a specification
a part of Java 2 Standard Edition? *No*. Therefore, no category error has
been made on my part. The category error was in Huy's referring to the CVM
as "the JVM".
Other implementations
may comply with the specification, and a Technology Compatibility Kit
exists for this purpose. The TCK is available from something called the
Java Partner Engineering group.

None of that was in dispute. However, none of that shows where I've made a
categorical mistake. Can you show me where I've done so?
This is perfectly clear on <http://java.sun.com/products/cdc/index.jsp>. I
don't see why you're trying to make it unclear.

It seems that the unclearness is in your understanding of the differences
between J2SE and the various J2ME technologies and, apparently, what
constitutes a categorical mistake.

An example of a category error is the "body/mind" assertion; i.e., there is
the body, and there is the mind, and these are two completely separate
entities. The error is in thinking that when one looks solely at the body,
one cannot be seeing the source for the mind because it is a "separate
category of object", ignoring the possibility that the body *is* the source
of the mind.

I have made no such error in this debate, unless you're going to say that
"J2SE" refers to *all* Java technologies, including the CDC/PP, etc. Only
in *that* case would I be wrong for saying the CDC/PP are not part of J2SE
(which was the basis of Huy's assertion when he said the CDC/PP was "the
J2SE with some APIs missing"). But, as I'm sure you realize, *that is not
true*. J2SE refers to a VM (the JVM) *AND* the core Java APIs. CDC/PP does
*not* refer to the JVM, it refers to a *different VM entirely*. Although
that VM is very similar to the JVM, it is *not* the *same* VM and to claim
it *is*, as Huy did, is to make a huge error in assertion.

I stand by what I have said. It is completely supported by Sun's website,
the technology itself and the specifications. Huy's errors were pointed out
and the errors corrected. If you dispute the facts, then please quote
relevent texts from Sun's website that show that CDC/PP is a subset of J2SE
(which would be necessary for Huy's statement to be true), that J9 is a
standard (it's not, it's a *VM implementation* and not of any standard but
instead of collection of different standards into a non-standard form) or
that Personal Java is a predecessor to CDC/Personal Profile (which it's
not; it only predated it and was replaced with a different technology that
is a better technological solution).

Until you produce such answers, you're making nothing but unsupported
assertions that do not show my *supported* assertions to be in any way
wrong.
 
C

chris

Darryl said:
chris said:
[chris]
SWT is available wherever it is installed. It's not part of any profile,
but then nor are a lot of things.

And as such is not going to be present on all platforms that support a
profile. The minute you target a non-standard API, you have effectively
cut your potential market considerably. SWT would have to be implemented
*in* the CVM/KVM in order for you to access it, so there's no way to just
add it to a platform.

Why not? It's just a library, after all.
Then answer one question: has J9 passed the TCK and is it a certified VM?
If your answer is "no" then whether it's the greatest thing for Java since
sliced bread is irrelevant; client companies make decisions based on more
than just peformance and stability (remember Windows?).

So far as I am aware, of IBM's three Java implementations only their (J2SE)
JRE is certified. The terms on which they obtained the J2SE TCK probably do
not allow them to test the others for compatibility (of course I am
guessing, because I have never seen these terms. But I am pretty sure that
the Jikes RVM team do not have access to the J2SE TCK, and I see no reason
why any part of IBM should have access to the J2ME TCKs).

I prefer not to remember Windows, but will agree to do so if you will
remember JBoss.
You would rather than each person just use whatever word they want for
whatever they're talking about?


Can you cite some examples of this?

There are reasons why groups like JConsortium exist.
<http://www.j-consortium.org/faq.shtml>
I could say more, but I fear we've wandered too far into c.l.j.advocacy
territory already.
 
H

huy

PersonalJava is *not* a predecessor to any J2ME technology. The closest
relationship between any aspect of J2ME and PJava is the migration path
from PJava to the Personal Profile. That's it. PJava *predated* J2ME.

Straight from the horses mouth: http://java.sun.com/j2me/faq.html

What happens to PersonalJava and EmbeddedJava technologies?
The PersonalJava application environment was the *first Micro Edition
technology*.......

Take that how you like it, but I'll take it as *predecessor*.

3. "Stay away form AWT if your application requires many
windows/frames, try
SWT (Eclipse project) instead."

SWT is not available in any profile. It's available on one non-standard VM
implementation. You state later that you personally don't like AWT, but
that's not quite justifiable as support for the advice you gave, which was
effectively "avoid the standard, go with a non-standard".

I have a much different view on *standard* vs *non-standard* in terms of
making decisions on implementations. I don't use things just because
they are *standard*. I use things because they work best for me, and in
this particular case, SWT worked better for me on the Pocket PC then
AWT, hence my advice. This may cause fragmentation in the java
community, but this is not my area of concern.
Then why don't you try next time saying "Personal Profile is a subset of the
*CORE JAVA APIS*"?

I agree. I like this defintion. I will use it in future. Thanks. It
might stop me from future dialogs like this, but I don't think it has
helped me understand J2ME any better then my original thoughts.

Rather than taking my responses as being nothing but personal attacks on
you, why not take what I'm saying and think about it. Instead of defending
your laissez faire "that's the best I'm willing to try" attitude towards
answering a question, why not consider "I'll answer with some degree of
accuracy when I answer a question" as a goal?

When you care about something, it's always slightly personal. I'm not
sure also who made you Judge, Jury and Executioner in the trial of my
intentions/attitude on trying to help on c.l.j.p
What is the purpose of answering someone's questions? Is it to help *them*
or to help *you*? And how do you help someone when you don't give them the
right answer? What is better, good or good enough?

I use whatever means necessary to explain things as simple as I can to
people who admit to being *Lost* with the current available information
(meaning those authors have failed; with all their exactness, this
audience). However, I would accept my failing if Sebastian tells me I
did not help him what so ever and made him worse off (short or long term).


Huy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Lost in a sea of code 1
Lost in J2ME, please help me! 4
J2ME? 2
Eclipse and J2ME 0
wma api in j2me 1
J2ME Developer in Boston,MA 0
J2ME on PDA/cellphones 0
J2ME GUI map component 1

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,274
Latest member
JessMcMast

Latest Threads

Top