Hi,
I am creating few java services in my package. I want to obfuscate the code of java service ie user should not be able to view the code.
How do i go about doing it?
thnx,
Poornima
Hi,
I am creating few java services in my package. I want to obfuscate the code of java service ie user should not be able to view the code.
How do i go about doing it?
thnx,
Poornima
Poornima,
If your objective is to hide the code of the service from the users, you can achieve it by assigning appropriate ACL… eg… lets say your users belong to ACL ‘USERS’, assign your java service a ‘Read’ and ‘Write’ ACL of (for example) ‘Developers’. This way, the users will not be able to view the code (or modify it - obviously). If you don’t want the users to be able to even see the service or execute it, you may change the ‘List’ and ‘Execute’ ACLs too.
HTH, Rohit
Yes changing with services ACL’s as mentioned should work…ofcourse may be WM standard java services does the same of hiding the source code not .java only class files stored in the packages.
HTH,
RMG
thanks
You can also compile the Java code as a class file and import it into a custom Java flow service. This is the wM approach to all of their public services!
fhouse,
“import into custom java flow service…”
Can you elaborate more on this process?
HTH,
RMG
When you create a custom Java service there’s a “shared” tab that has an “import” parameter. You can use this to import Java classes and then instantiate those classes from the Java flow service code. See “Building Java Services with Developer” in the Developer User’s Guide (Chapter 13) for more info.
HTH,
Fred
Sure i have used this shared tab for importing new classes loaded from jar file.
Anyways thanks for pointing.
even with ACL , its possible to get to the .class file
The nature of the java being interpreted , its relatively easy to get source code from the .class file
You could try using proguard
[url]http://proguard.sourceforge.net/[/url]
after saving the java service, locate the class file and obfuscate it using the tool. its your best bet.
HTH
Austin.
to get .java from .class use JAD