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
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

how to make jar file in blackberry

Hello can you please tell me how to modified (insert java file)the jar file .
 
and again make jar file
 
Thanks

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to make jar file in blackberry

Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: how to make jar file in blackberry

actually i a already one jar file .i want to add some java file in that as a plugin .

 

https://github.com/phonegap/phonegap-plugins/tree/master/BlackBerry/BarcodeScanner

 

so i read from this but not able to do that there is some problem in making jar file

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to make jar file in blackberry

I think the usual process would be to include jar an class files in your app, not attempt to add files to the jar file.  In fact I can't think of a situation where I would want to add to an existing jar. 

 

So why are you trying to add files to the jar? 

 

In this case you have access to all the source, so you don't need to use the jar file at all. 

 

Perhaps it would be best if you explained what you are trying to actually achieve and perhaps we can suggest a better alternative to adding files to the jar file? 

Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: how to make jar file in blackberry

HELLO

 

sir i think you not understant my problem, actually i am working with phonegap in blackberry , i want to add barcode scanner plugin .in phonegap there is a  file cordova.jar i want to add barcode scanning plugin in that jar file used that as this write in this link..

 

https://github.com/phonegap/phonegap-plugins/tree/master/BlackBerry/BarcodeScanner 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to make jar file in blackberry

[ Edited ]

You are probably right, I don't understand.  

 

I think the following is supposed to explain what you are trying to do:

"in phonegap there is a  file cordova.jar i want to add barcode scanning plugin in that jar file used that as this write in this link.."

But I'm sorry, this doesn't make sense to me.   So it is hard for me to figure out what you want, when I don't understand your explanations. 

 

And then should you be asking a phonegap question in the Java forum?  phonegap is HTML5 isn't it?  So perhaps you should be asking here:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/bd-p/browser_dev

 

Anyway, if you think this is the right forum, can you explain what you are trying to achieve and why? 

a) If you are trying to make a jar, then the initial link that I gave you should help

b) If you are trying to add a file to a jar, then you need to explain why you need to do this because from a Blackberry Java perspective, i can not think of a situation where that would be needed. 

 

Remember we need to know why you are trying to do this, not what you are trying to do.  For example, say there was a forum that was about cars.  I might post a Thread which complains that my car won't start.   So what I am trying to do is start my car.  But in fact, I need to go to the supermarket - so why I am trying to start my car is so that I can go to the supermarket. 

 

I would like to understand why, not what you are doing.  I hope this is clear. 

 

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: how to make jar file in blackberry

this tells you how to update a jar:
http://docs.oracle.com/javase/tutorial/deployment/jar/update.html

what you want to do won't work though, you cannot modify and use a jar like that.

if you want to add functionality to a webworks application you can write a native extension. better ask in the appropriate forum about that, though:
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/bd-p/browser_dev
----------------------------------------------------------
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