Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Blackberry, libraries and problems with eclipse-jde plugin

[ Edited ]

Hi everyone

 

Im in a stuck trying to create a "valid" blackberry library.

First of all my configuration :

Eclipse version Version: 3.5.0

Blackberry jde plugin for eclipse : Version:  1.1.2.201004161203-16

 

Problems :

 

Ive followed the next link to create the library :

 

http://www.craigagreen.com/index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html

 

It´s just nice and with no too much help and asking google no problems. I can create a separate project who uses the classes from the created library. Ok it´s alright. I mean at programming level not running level.

 

First of all I preverify with the next command : preverify -classpath "path to jde eclipse plugin\lib..." "mylibrary.jar"

 

Ive used the before preverify one and preverify -verbose - classpath "path to jde eclipse plugin\lib..." "mylibrary.jar"

 

what does it need to preverify? Ive compared both jars and I can only see 20 bytes of difference between them so I cant understand what is being doing.

 

It has nothing changed; Ok, when I try to debug, the application installs it correctly but when I open it, I can see at console "JVM: Missing native method" so , the library I think is well created, but I cant use it???? its so weird, because it works 100% and Ive tested the classes one by one for a long time ago so, please, can you tell me what Im doing wrong? is there some way to fix the problems???? please help Im totally frustrated, tired and crazy about that problem.

 

 

Kind regards

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Blackberry, libraries and problems with eclipse-jde plugin

preverify checks a jar file if it is compatible with blackberry (generally speaking).

a preverified jar can be compiled into a cod with rapc.

 

on the blackberry you have to install the library cod alongside with the application.

you can do this seperately, or, as i would suggest, add it to jad/alx file.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: Blackberry, libraries and problems with eclipse-jde plugin

[ Edited ]

Ok I understand the preverify process but I cant understand how to compile the library in a cod, etc,. I have read  lot about it but I havent seen in no place a how to which really works so, is there a way to make it easy more-less?

 

PS: Ive read almost all the links when you search for "blackberry library create" @ google and its just a hell

 

 

Kind regards

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Blackberry, libraries and problems with eclipse-jde plugin

[ Edited ]

http://supportforums.blackberry.com/t5/Java-Development/Compile-a-jar-file-into-a-BlackBerry-Library...

 

http://supportforums.blackberry.com/t5/Java-Development/Compile-a-MIDlet-into-a-COD-file/ta-p/444746

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: Blackberry, libraries and problems with eclipse-jde plugin

Hi again

 

 

About the first link, I know it perfectly and yes, I can import classes, etc,. but when Im going to debug the application I get "JVM:Missing native method" so I can see there is something wrong in the library.

About the second one... please can you mark to me a guideline or a process to follow and to get an app with an imported library running? Thx a lot

New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: Blackberry, libraries and problems with eclipse-jde plugin

Hi again

 

Please help I dont need to install a cod firstly, its not the real solution I require.

 

I just need to import a jar into a project and use it, just this anything more, please help!!!!

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Blackberry, libraries and problems with eclipse-jde plugin

to add a jar as a dependency to the project go to project properties, java build path, libraries, add JARs

(eclipse+plugin)

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: Blackberry, libraries and problems with eclipse-jde plugin

Hi again

 

Im going to explain what Ive done, maybe it can be better to understand...

 

Ive created two projects :

 

- the lib project

- the sample project

 

The lib project : Ive made it in the next way :

 

1) As a new project in eclipse with jde-plugin1.1.2, marked as LIBRARY

2) Ive added the library preverified with "preverify.exe -classpath path_to_net_rim  myLibrary.jar" (yes Ive taken the output created folder one)

 

The sample :

 

1) created as a new project, blackberry application

2) build path : myLibrary.jar from the library project created before

3) order and export -> myLIbrary.jar checked

 

 

compiles ok, everything is fine but running :

 

"JVM: Missing native method "

 

What am I doing wrong?

 

I repeat, Ive read and tried almost everything

 

help please, regards