B4J Question Software protection (apps created with B4J) - what's available ?

agb2008

Member
Licensed User
Longtime User
I am trying to look a bit ahead - could you please advice what methods software or hardware available
to add protection for applications created with B4J ? Are there any libraries that support licensing of applications created with B4J ? Probably library that would support usage of USB licensing dongle keys - such as eToken or Keylok2 ? Probably some other solutions available that would be compatible with applications created with B4J ? Could you share you experiance with such matter ?
 

agb2008

Member
Licensed User
Longtime User
Few additional thoughts. I found following project - but was unable to convert it to B4J library: license3j
Of cause it's not exactly the same solution as with hardware key but... May be other options exist or
someone could get more luck with conversion of license3j to B4J lib ?
 
Upvote 0

agb2008

Member
Licensed User
Longtime User
Erel,
I've manage to compile license3j as a B4J library using SimpleLibraryCompiler tool. Compilation was O.K. without warnings...
But when I try to replicate simple application provided as example on license3j web site my B4J application crashes. I think issue
related to the fact that license3j library depends on a number of other third pary libs presented as jar files. I put them in libs
subfolder during compilation using SimpleLibraryCompiler tool - but how should I reference them in B4J application ? Should I
use: "#AdditionalJar :" statement in Project Attribute section ? (well I tried but without much luck) Could you please advice ?
I am still learning process of java libs conversion to suitable B4J / B4A libs.
 
Upvote 0

sonicmayne

Member
Licensed User
Longtime User
In
B4X:
@DependsOn(values={"lib1","lib2"})
have you added each of the libraries that license3j requires?

Put the required libraries into your Additional Libraries folder and in the libs folder along with license3j.
 
Upvote 0

agb2008

Member
Licensed User
Longtime User
sonicmayne:

Thank you very much for suggestion. Looks like it's working now - well at least it's compiling O.K. and basic license checks seems to working fine.
Statement "@DependsOn..." was exactly the one that I was missing. Strange that solution works for latest version of that software with different
set of libs (different versions of suggested libs) - and not working with older versions with recommended set of libs versions.
Nevertheless I've manage to progress and I would like once again to thank you for your suggestion !

In
B4X:
@DependsOn(values={"lib1","lib2"})
have you added each of the libraries that license3j requires?

Put the required libraries into your Additional Libraries folder and in the libs folder along with license3j.
 
Upvote 0

agb2008

Member
Licensed User
Longtime User
Just few additional comments on this subject - I am trying to find best available solution for my application, so I could share few findings with other B4J developers. For me Windows 32/64 bit is primary target - this review would mostly cover solutions for this platform.

First of all conversion to native platform executable format for sure that is must have option - few solutions exist for that purpose:

1. jar2exe (commercial) - one that I am using now and quite happy with results. It allows to create native executables 32/64 bit for Windows and Linux platforms
and as well got basic support for executable files for MacOS. Also it allows to encrypt and protect java classes ! In special mode generated
.exe files could be protected by other protection systems such as ASProtect or WinLicense

2. Launch4j (freeware) - another wrapper that allows to generate native .exe files from .jar files. Launch4j could be executed on Windows, Linux or MacOS platforms but
generated files (.exe) only available for Windows OS

3. JStart32 (freeware) - another wrapper that allows to generate native 32 bit .exe files from .jar files. According to information on sourceforge.net application still in beta
and last was updated in 2013.

4. JSmooth (freeware) - similar to JStart32 project. Available from sourceforge.net. Last updated in 2013.

5. JWarpper (freeware / commercial) - quite interesting project which I found just this week. Got limited experience - but according to application website it allows to
create native format executable files 32/64 bit for Windows,Linux and MacOS, with or without embedded JRE, optional online JRE repository and
online generated application updates from your website... Commercial version supports encryption using JWCrypt module...

Probably some other solutions exist for this purpose - if I missed one that you are using - please let me know and I would add it to the list or you just could share your experience.

But other important part in case of commercial software development is licensing and software protection against reserve engineering and cracking.

As for pure licensing - following solutions found so far:

1. License3j - free license management for Java. Based on my experience with it - could be converted to B4J lib for easy integration with B4J projects. Support software
licenses generated with help of gpg4win (or compatible application). Got computer hardware binding methods. Pure licensing solution.

2. License4j - (commercial) - much more advance licensing solution for java applications. Different licensing options, online licensing activation e.t.c.

3. JLicense - (free / commercial) - another licensing solution - something in between License3j and License4j. Source code available for purchase - so I think it would
be possible to convert it to B4J library.

Now lets have a look at available software protection options for generated files:

1. ProGuard (freeware) - free Java class file shrinker, optimizer, obfuscator, and preverifier. BTW - we got obfuscator option in B4J built in.

2. ASProtect (commercial) - commercial solution to add encryption to generated .exe files. Information on usage together with jar2exe available here.
Only for Windows platform.

3. WinLicense (commercial) - commercial solution for extended software protection, encryption and licensing. I've tested demo version of this software
and was able to apply protection layer to the .exe file generated by jar2exe. Solution available only for Windows platform.

Hope that this information would be of use for your B4J projects !
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

Cloud you share license3j for B4J ?
 
Upvote 0
Top