How to make a j2me project in Intellij 5.0?

I find it is also not good supported in version 5.0.
Some function is poor. Just like
Image temp = Image.createImage("/g");
Temp will be null unless write as
Image.createImage("/g.png");
And
InputStream in_files =this.getClass().getResourceAsStream(nameOfSprite);
inf_files will always be null.

I think it should do more on resource loading. I wish Intellij Group will be more better,though it is so good now.

Now I am working with intellij 4.5.4, using Ant +antenna as tools for developing j2me . I find it is good supported for j2me. But the build.xml is difficult to write if the project must use not standard ApI like nokia.Can someone tell me how to write ? Give me a example,Thanks. lichengwen@gmail.com

4 comments
Comment actions Permalink

Hi,
you can visit http://www.jetbrains.com/idea/features/j2me.html to overview
J2ME support for IDEA 5.0.

Thank you.

--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


"lichengwen" <no_mail@jetbrains.com> wrote in message
news:7712552.1122962489172.JavaMail.javamailuser@localhost...

I find it is also not good supported in version 5.0.
Some function is poor. Just like
Image temp = Image.createImage("/g");
Temp will be null unless write as
Image.createImage("/g.png");
And
InputStream in_files =this.getClass().getResourceAsStream(nameOfSprite);
inf_files will always be null.

>

I think it should do more on resource loading. I wish Intellij Group will

be more better,though it is so good now.
>

Now I am working with intellij 4.5.4, using Ant +antenna as tools for

developing j2me . I find it is good supported for j2me. But the build.xml is
difficult to write if the project must use not standard ApI like nokia.Can
someone tell me how to write ? Give me a example,Thanks.
lichengwen@gmail.com


0
Comment actions Permalink

lichengwen wrote:

Some function is poor. Just like Image temp =
Image.createImage("/g"); Temp will be null unless write as
Image.createImage("/g.png");


That is the way it's supposed to work. This has little to do with IDEA,
and everything with J2ME - if you think it should be improved, write to
Sun ;)

And InputStream in_files
=this.getClass().getResourceAsStream(nameOfSprite); inf_files will
always be null.


Check your resource path (the 'nameOfSprite'). Make sure it matches the
directory/package structure, otherwise neither the emulator, nor the
'real' device will be able to find your images. getResourceAsStream and
Image.createImage follow the same rules. Check the J2ME documentation -
it explains how resource names/paths work.

build.xml is difficult to write if the project must use not standard
ApI like nokia.Can someone tell me how to write ? Give me a
example,Thanks. lichengwen@gmail.com


That's definitely not IntelliJ related. Anyway, it looks more
complicated than it really is - I'll send you an example by email.

Regards,
Edwin

0
Comment actions Permalink

Thanks.
I am sure the directory is right. I got your example project.But I can not use it successfully.
some tag is recognized in Intellij 5.0 . I am using sdk
tools "Series60_MIDP_SDK_2_0_for_SymbianOS". In fact, I wish j2me project can do normally in intellij 5.0 directly not using ant. It is what I really need. But it can not, I can only using ant. Thanks.

0
Comment actions Permalink

lichengwen wrote:

I am sure the directory is right.


I mean, is it right in the generated jar file? The first example (with
the createImage() call) you gave was wrong and is never going to work.

I got your example project. But I
can not use it successfully. some tag is recognized in Intellij 5.0 .


What tags do you mean? The custom (antenna) ant tags? To make IDEA
recognize those tags, add the antenna.jar file to the "Additional
Classpath" in the build properties dialog - or rather, make sure that
the jar that's already there exists.

tools "Series60_MIDP_SDK_2_0_for_SymbianOS". In fact, I wish j2me
project can do normally in intellij 5.0 directly not using ant. It is
what I really need. But it can not, I can only using ant. Thanks.


Yes you can, you should be able to do j2me development directly from
IDEA 5.0, without having to use ant. I do that on a daily basis (I use
Sun WTK, and Nokia Series40 J2ME sdk).
The project I mailed you should work directly - as long as you have
configured the "Mobile SDK" correctly.

Let me know if I can help!

Regards,
Edwin


0

Please sign in to leave a comment.