This content has been marked as final. Show 3 replies
You write a communication layer. Two versions.
Rest of your application talks only to that layer.
During the build you build two versions of the application, picking the appropriate comm layer for each.
otherwise we need to write our own communication logic for the java SE jvmWhy can't you just use this for both?
Thanks for suggestion.
Here I need to use different API for both the JVMs, I mean we have some API available for ME version e.g. API for encryption/decryption, Random numbers, debugging and same can not work for SE version. We will going to use these API in our business logic. I mean if we need to do encryption/decryption in ME version then we need to use provided API else if we are using SE jvm then we need to use JCA API for the same. So How can I design the application?
user3516155 wrote:I believe I already answered that - use a communication layer.
So How can I design the application?
If you are asking (different than your original question) about how your communication layer might implement similar functionality using different APIs supported by the VM then the same basic idea applies - provide a layer, code to the layer and implement the layer different for each platform.
Note however that it is foolhardy to carry this to an extreme. Don't wrap trivial functionality to gain minimal gains because it increases complexity and thus maintenance costs.