Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
ushernut
Posts: 55
Registered: 09-09-2008

Is it possible to build imported jar file into one cod file?

[ Edited ]

In this project X I have an imported  jar(A.jar)  file which is using RIM API as well. This jar file was created from blackberry project A by Eclipse plugin.  Then project X import A.jar.

Now I build project X, it will generate a cod file, x.cod, which does not contain any information of A.jar file.

 

So how can I build A.jar and X project into one cod file?

 

I have checked the forum and there are couple of threads are talking about this issue. But there is no clear answer on this.

Does anyone know the answer? Yes....or No? Thanks a lot.

 

Please use plain text.
Developer
peter_strange
Posts: 14,611
Registered: 07-14-2008

Re: Is it possible to build imported jar file into one cod file?

Can you not just build a cod from your jar, and so have two cod files?

Please use plain text.
Developer
ushernut
Posts: 55
Registered: 09-09-2008

Re: Is it possible to build imported jar file into one cod file?

[ Edited ]

After I built,  there is only one cod file named X.cod, but this one doesn't contain A.jar.  I hope to build a X.cod with A.jar inside. Then without A.jar or A.cod, X.cod can work independently.

Please use plain text.
Developer
ushernut
Posts: 55
Registered: 09-09-2008

Re: Is it possible to build imported jar file into one cod file?

any idea about this?

Please use plain text.
Developer
peter_strange
Posts: 14,611
Registered: 07-14-2008

Re: Is it possible to build imported jar file into one cod file?

[ Edited ]

Here are two KB articles that might help you:

 

How To - Compile a MIDlet into a COD file
Article Number: DB-00055
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Compi...

 

How To - Use the RAPC compiler
Article Number: DB-00066
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Use_t...

 

Using these you should be able to create an A.cod file as well as an X.cod file.  Try this to see if you can get it working. 

 

I appreciate it is not what you want (ideally you want a single cod file), but at least this works.  Once you have this working, we can think about ways of you getting this into one cod file. 

 

There are posts on this forum that discuss converting a jar  to a cod, if the KB articles are not clear..

 

Please use plain text.
Developer
ushernut
Posts: 55
Registered: 09-09-2008

Re: Is it possible to build imported jar file into one cod file?

[ Edited ]

Thanks perter. actually I was able to create seperate cod file, as A.cod and X.cod, then change alx file to make X.cod reference A.cod, it works.

 

Still, like what you said, I hope to make it as a single cod file.

 

Mark mentioned that there is a way to do this, but not that clear.


MSohm wrote:

The library JAR file needs to be added to the project itself in order to be built into a COD file.

 

 


See here. In Eclipse plugin, how to add a library jar to the project itself? I know how to import, add dependencies, but how to add to itself?

 

 

Please use plain text.
Developer
peter_strange
Posts: 14,611
Registered: 07-14-2008

Re: Is it possible to build imported jar file into one cod file?

Sorry, you will need someone more skilled in Eclipse than me to answer that question....

Please use plain text.
Developer
ushernut
Posts: 55
Registered: 09-09-2008

Re: Is it possible to build imported jar file into one cod file?

[ Edited ]

Thanks Peter.

 

If anyone knows how to do this in Eclipse plugin, please help! Thanks.

Please use plain text.