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
Contributor
Posts: 10
Registered: ‎02-13-2010
My Device: 8820
My Carrier: T-Mobile

Re: Sharing my library with a business partner

Web Service is an interesting idea, but connectivity from the device is not always reliable.  

Developer
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: Sharing my library with a business partner

Very true. As I said, it's not a perfect solution by any means. I'm not sure what IPC is, so I'm afraid I have no insight on that particular matter. I'm fairly new to all of this.

 

Good luck,

~Dom

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Sharing my library with a business partner

[ Edited ]

IPC would rely on the correct permissions being set for both applications, and it would have to be fully event driven... which could be fine, you just need to make sure there are sanity checks incase a global event fails (lost or throws exception).

Developer
Posts: 77
Registered: ‎01-27-2010
My Device: Bold 9000
My Carrier: AT&T

Re: Sharing my library with a business partner

 


rcmaniac25 wrote:

If you send the JAR that gets packaged for BlackBerry it will have java files that have been stripped of code. Something like:

public static void main(String[] args)
{
     System.out.println("Hello World");
}

 Will show up in a decompiler as:

public extern static void main(String[] args);

 So you you don't need to worry as long as you send the correct JAR.


 

Not true.  Javap, the program that comes with the JDK will only give you the method headers and fields for a class.  A real decompiler could get the code in a JAR file.

 

Contributor
Posts: 10
Registered: ‎02-13-2010
My Device: 8820
My Carrier: T-Mobile

Re: Sharing my library with a business partner

 


DAquilina wrote:

Very true. As I said, it's not a perfect solution by any means. I'm not sure what IPC is, so I'm afraid I have no insight on that particular matter. I'm fairly new to all of this.

 

Good luck,

~Dom


@Dom- 344 messages, 140 kudos and you claim you are new?  Your modesty deserves another kudos.  I have to learn this  quality from Canadians Smiley Wink

 

 

Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Sharing my library with a business partner

[ Edited ]

@Adama:

I was using examples from a "real" decompiler, not javap.

 

Also I have written my own Java decompiler myself and the only place where bytecode exists is the constructor. Otherwise there is no bytecode for functions.

 

I said to use the JAR file from "deliverables" because it contains class files that have their non-constructor functions stripped of code and the compiled COD file.

 

Unless you have a COD decompiler or can figure out how an entire class works based on the constructor then you are pretty much safe from those trying to steal your code.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: Sharing my library with a business partner

No Blackberry-level permissions are needed for IPC, but both applications must be written with certain IDs shared between applications. You can implement your own ACLs on top of this yourself if required.

Developer
Posts: 77
Registered: ‎01-27-2010
My Device: Bold 9000
My Carrier: AT&T

Re: Sharing my library with a business partner

[ Edited ]
@rcmaniac25
Okay but "stripped of code" is the wrong phrase.  It still has code it's just not Java bytecode and that code can be decompiled even if your decompiler couldn't do it.  I've seen one cod file decompiler online.  Any program that can be run can be decompiled* it could be in a format (like RIMs) that isn't that common but someone will always be able to figure out a way to decompile it.
*Okay it could be an interpreted language that wasn't compiled in the first place but that's just getting pedantic.  

 

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Sharing my library with a business partner

Yes, I agree with you on that.

 

The point that the starter of this post was that he was worried about a partner company getting the source code. It digressed to decompiling which was where I made my post about the bytecode.

 

I have seen a COD decompiler online but it doesn't work all the time. Even when it does it produces some non-standard bytecode. I don't understand all the different codes but if you go through the effort of trying to understand them and make it work all the time then nothing other then not giving out your compiled code is going to stop them from decompiling it.

 

So to summarize, if the company is going to go through that much trouble then there is nothing you can do. Otherwise your not going to get any useful code out of the previously specified JAR file.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 141
Registered: ‎02-10-2010
My Device: 9500
My Carrier: Airtel

Re: Sharing my library with a business partner

There are three ways to accomplish this:

1. The most straight forward way looks to provide the jar and the second company can bundle the jar and use its interface for the desired functionality.

2. Somewhat indirect but better way than 1 is to provide your library as a separate COD installer and the second company should use IPC to communicate and use its functionality. This promises the decompiling risk, offers a potential chance where the library can be used by multiple other applications if required.

3. Using web service. This is unreliable and may eat network bandwidth if the library involves lots of data interchange with the callee application.