• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSR 82, WTK2.1 and WTK2.2 issues

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the things do i need so that i can develop bluetooth programs on a mobile phone(NOKIA)?

I have downloaded WTK2.1 but it says it does not have JSR-82 support..
But i have the JSR-82 source files, so i was wondering if i could just compile those source files and i can get bluetooth up and running with my program just like that.

Now there is WTK2.2 beta and it has JSR-82 support in it already.. But the problem is i'm using EclipseMe plugin for Eclipse but it doesn't have WTK2.2 support yet..

So can i just compile the java source files of JSR-82 and i can use bluetooth already in my programs? I tried to compile the source files but then when i run the program, with bluetooth functions in it, it caughts an exception: "NoClassDefFoundError"..

Or should I have to use WTK2.2 and change to another IDE?
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JSR 82 "source code" is only the interface to bluetooth. It does not contain any implementation. So, it is completely useless to compile them. To use bluetooth with WTK, you have to upgrade to v2.2 and above.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put the JSR-82 stub files you have into the class path and compile. You should be able to run it then on your Nokia mobile phone. But please remember - currently only these two Nokia mobile phones Nokia 6600 and Nokia 6230 support JSR-82 and do not include these stubs into the JAR. There are not muc more which do at the moment (Siemens SX1, Sony Ericsson P900 both with latest firmware) but there are coming a lot more this year.

You do not need any Bluetooth implementation within these stubs. But then you have to do all your testing on a real device. If you want to test your Bluetooth application, I recommend either the WTK 2.2 or a J2ME emulator from Nokia. Personally I work with the Nokia 6230/6600/9500 Concept SDKs under Linux and EclipseME successfully.

The Windows version from Nokia allow even more features.

In my small experince EclipseME is great for the start but it makes not very good real MIDP apps in the output. In my case I had to enable Java 1.1 compatible class generation, manually redoing the preverifying and package the JAR correctly. Even the outputed MANIFEST.MF is wrong according to MIDP 1.0 specification. Anyway I use it. :roll:
[ July 10, 2004: Message edited by: Alexander Traud ]
 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks alot for the info guys..

neways i just got a 6230 SDK from Nokia, and it has JSR-82 already..so i think thats just what i need..

to alex: what do you mean EclipseMe does not produce very good MIDP applications?

Do you mean like an MIDP app compiled on a Netbeans will be much better than EclipseMe?
 
Alexander Traud
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EclipseME makes not very good JAR files. The classes are not preferified sometimes (have not figured out why yet), it is not compiled with Java 1.1 compatible byte code (can be fixed via the project settings or better via the preferences of Eclipse) and the JAR is filled with unnecessary files (I see no possible solution for this). I read the full documentation - perhaps I am too stupid. Anyway the JAD and the MANIFEST file need fine tuning, so I have to repackage it anyway.

EclipseME is great for the developing and debugging phase but when it comes to the final release, you'll have to go over it manually.

But I think my next (very) big J2ME project will be made within a text editor and the command line utilities. Eclipse is too slow here and sometimes the behaviour is obscure.
[ July 11, 2004: Message edited by: Alexander Traud ]
 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okei dude.. thanks for the heads up..

so how do i go over it manually? Would u suggest also that i compile my MIDP apps on a different IDE, say for example, Netbeans?
 
Alexander Traud
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Javac is javac. The classes won't get better in an IDE nor do they get worse. It depends on the javac options. Compiling was no problem yet.

How to do it manually? You know the command prompt and "jar" and "preverify"? These command line utilities are your way. Look at their parameters and you will find it. "preverify" does not need an option, just the file and your classpath. "jar" needs several options. Just look for a reference on the net or look into their help pages. I can't give a "general" rule here - it is just passing the right paramters to these apps.
 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tnx dude!!

one last question though..

dude, how do you install a midlet on a 6230 phone? i tried to copy the jar file thru bluetooth... but when i open it from the phone, it says, "file format not supported"..
 
Alexander Traud
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either over the air or the Nokia Content Copier (came on the Nokia 6230 CD-ROM). The Nokia SDK allows it to.
 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So i cant do it thru bluetooth huh?

OTA, meaning thru SMS?
 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alex,

Dude i have another question to you since you are using EclipseMe also.. and noone is answering my post regarding this topic.. hehe

Ahm, im trying out the Series40 SDK(Nokia) with EclipseMe.. I made a simple HelloWorld MIdlet, it supposed to display a "hello world" text.. When I tried to run it thru the Run menu of Eclipse, the 6230 emulator appears, but after a while the emulator will give an error message "Invalid File".. and the midlet doesn't run..

What does this mean?

I tried to run this midlet using a different wireless toolkit(Suns J2ME wireless toolki) and its runs ok..
 
Alexander Traud
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recommend to buy a book about Java 2 Micro Edition (J2ME) and CLDC/MIDP. Over the air is done via WAP/HTTP connection. With the Nokia Content Copier you can load your MIDlet via cable, infrared and Bluetooth to your phone. The Nokia SDK even contains this application - it was installed while it installed the emulator...

Nokia Forum has a lot and extremly good documentation about J2ME, too.

Your other question is too "generic". It could be nearly everything. You read the outstanding EclipseME documentation? You have the latest version(s)?
 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dude!

I just posted to the EclipseMe mailing list and apparently its a bug when integrating EclipseMe and Series40 SDK.. What i'm doing now is im just compiling with EclipseMe, and then i'm emulating it and creating a package with Nokia Developer Suite..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic