Using third party packages

I'm using NetBeans with a Nokia S60 sdk installed to write an app for a phone.

I need to use a third party math package in the app, but I am new to this, so I have no idea how to do it.

I've downloaded and unzipped the files for the third party package, but where do I put them and how to I use them in my project?

(I don't mean how do I use the new functions, but how to I access them in NetBeans ... how do I NetBeans to "see" them ... just wanted to be clear about what I was asking).

Thanks.

Message was edited by:

AlJohnJeffJoe

[579 byte] By [AlJohnJeffJoea] at [2007-11-27 11:22:54]
# 1

in your project properties there is somewhere to add new libraries to your project. use that.

or you can simply extract classes you need and use them.

etaa at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

Well if you have those class files as a jar/zip or folder then in the Project explorer right click the project to open Properties, then click the Libraries and Resources property under Build, there u will see options for adding jar/zip and folder to your project.

find_suvro@SDNa at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

I unzipped the zip file into a folder (it's MathFP in case you've seen it).

In that folder are subfolders:

bin

classes

docs

bin has a bunch of "waba" stuff which I have no idea what that is but assume it doesn't apply to me.

classes has a bunch of .class files

and docs I can handle.

I assumes somehow I need to add access to one or more of the .class files ... but how do I do that?

AlJohnJeffJoea at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Well I admit I never used that api. But if the .class files are what u need, then add the classes to your project by adding the classes folder as I told in my previous post. Click the Add Folder button in the Libraries and Resources Properties --> browse to that folder --> click Open with selecting it.

find_suvro@SDNa at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

Okay, almost there. I added the folder and was then able to use the commands.

However, when I went to compile I got a weird error:

Error preverifying class wabaMathFP

java/lang/NoClassDefFoundError: waba/ui/MainWindow

I am not using the waba stuff as far as I know, but I did see some waba class files in the same folder. Could that be the problem? It is trying to verify ALL the class files in that folder?

Any suggestions?

AlJohnJeffJoea at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6

Well I just had a look in the MathFP thing (just bit googling) and I came to know that it has two different versions for J2ME and WABA. Do u have the right one ? U can find it out here http://mywebpages.comcast.net/ohommes/jScience/download.html

I think what u need is "MathFP 1.2.2 for J2ME CLDC (8KB)" one.

find_suvro@SDNa at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 7

I downloaded 2.6 which was I thought was for both J2ME and WABA thinking it was more recent and I could just use the J2ME libs.

I can try downloading the older one for just J2ME ... by the way, I see these references to KVM ... there is a KVM sublibrary ... should I be using that one maybe?

AlJohnJeffJoea at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 8

I looked at the library you recommended ... I noticed a big difference is that that one is for systems that only support int data types and not long data types. I think my SDK (Nokia s60) supports long, which the other lib I was looking at seems to support.

Any thoughts? Or does my SDK only support int data types and not long?

AlJohnJeffJoea at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 9

Well as I said earlier, I never did used that one till now. So can't tell which one should u use. But long I think is a supported data type. You can give a try to the "MathFP 2.0.6 KVM, CLDC/MIDP and WABA" also.

find_suvro@SDNa at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 10

That's the one I have been using. I it has a "generic" mathfp class that is supposed to work wherever longs are supported, but somehow it is giving me the WABA errors for some reason. Maybe I need to delete the waba stuff to not confuse the preverifier?

AlJohnJeffJoea at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 11

I too think deleting the "wabaMathFP" class will do the job. Go ahead and give it a try.

find_suvro@SDNa at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 12

That seems to have made it compile ... that's a start anyway.

Thanks. I'll try and give you some dukes for your help.

AlJohnJeffJoea at 2007-7-29 14:57:31 > top of Java-index,Java Mobility Forums,Java ME Technologies...