Help with Java JAR file opbfuscation.

I am looking for a free (no $) for use on commercial java code
code obfuscation program, which can beat the Jode decompiler.
I have tried Proguard, and I have tried Joga
(using Jode itself for obfuscation is too complex for my purposes).
Is there a simple way to beat decompilers like Jode and DJ,
without a financial outlay if possible,
given how easy it is to decompile Java bytecode?

All interesting remarks, everyone!
Proguard doesn't prevent decompilation on something very small, like a jar
with one or two classes.
Proguard is free(no money) for use over commercial java code,
and is itself a java jar, so it will run on Windows,
Mac and Linux platorfms.
It also correctly obfuscates and links external java libraries
and references to the man jar/class in a very systematic way.
I'm just wondering if there is something similar to proguard on licensing arrangements,
working over small amounts of code, and beating
the decompilers (like Jode).
I have used the code obfuscation that Dr.Java performs on it's classes during compilation.
And while the resulting class file tested does confound Jode,
JD-Gui ("Java decompiler") instantly beats the results of Dr.Java.
Considering how easy it is to break class files, I was figuring that either Sun
or another would offer a free/open source/cheap way to secure these class files,
without resulting to Zelix Klassmaster, and instead of leaving a mess
of decompiled source code, prevent decompilation of java byte
code even happening at all?
Any ideas?
Edited by: Zac1234 on Jul 5, 2009 10:55 PM

Similar Messages

  • Oracle 9i: Help with loadjava jar files to call out web service from pl/sql

    I'm trying to build a web service client using dbws_callout_utility.zip (version used for prio 10g database). I followed the articles in oracle site to loadjava jar files (soap.jar, dms.jar, ejb.jar, jssl-1_1.jar, mail.jar, servlet.jar) into Oracle DB 9i before invoke jpub to gen stub class and wrappers in oracle 9i but i have many errors such as ora-29534 and ora-29521. As consequence i could not invoke jpublisher to generate code.
    Pls. help my with detail guide to overcome these errors, thanks in advance! My DB is Oracle 9.2.0.5

    Dear,
    I have read your article, it is useful for me. But I cannot Apply to my case. Please kindly help me. Thank you.
    When running, the error occurs:
    1:39:31 Execution failed: ORA-20000: soapenv:Server.userException - org.xml.sax.SAXParseException: Attribute name "password" associated with an element type "user" must be followed by the ' = ' character.
    My webservice Url: http://abc.com.vn:81/axis/ABC_WS_TEST.jws?wsdl
    I make PL/SQL (similiar as your example)
    FUNCTION INVOKESENDMT
    RETURN VARCHAR2
    AS
    l_request soap_api.t_request;
    l_response soap_api.t_response;
    l_return VARCHAR2(32767);
    l_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_method VARCHAR2(32767);
    l_soap_action VARCHAR2(32767);
    l_result_name VARCHAR2(32767);
    p_zipcode VARCHAR2(160);
    BEGIN
    --p_zipcode:='''TEST'' ; ''TEST'';''84912187098'';''84912187098'';''0'';''8118'';''1'';''000001'';''ThuNghiem'';''''';
    p_zipcode:='TEST';
    -- Set proxy details if no direct net connection.
    --UTL_HTTP.set_proxy('myproxy:4480', NULL);
    --UTL_HTTP.set_persistent_conn_support(TRUE);
    -- Set proxy authentication if necessary.
    --soap_api.set_proxy_authentication(p_username => 'TEST',
    -- p_password => 'TEST');
    l_url := 'http://abc.com.vn:81/axis/ABC_WS_TEST.jws';
    l_namespace := 'xmlns="' || l_url || '"';
    l_method := 'sendMT';
    l_soap_action := l_url || '#sendMT';
    l_result_name := 'sendMTResponse';
    l_request := soap_api.new_request(p_method => l_method,
    p_namespace => l_namespace);
    soap_api.add_parameter(p_request => l_request,
    p_name => 'user password sender receiver chargedflag servicenumber messagetype messageid textcontent binarycontent',
    p_type => 'xsd:string',
    p_value => p_zipcode);
    l_response := soap_api.invoke(p_request => l_request,
    p_url => l_url,
    p_action => l_soap_action);
    l_return := soap_api.get_return_value(p_response => l_response,
    p_name => l_result_name,
    p_namespace => l_namespace);
    RETURN l_return;
    END;

  • Help with creating jar file and running it ?

    Hey guys,
    I have a program with a package called classes and a sub-package called classes.mainLib.
    I am trying to create a JAR file of the class files in mainLib. There is only one class file in classes and that contains the main method. So this is what i am doing:
    1. create a manifest file with: Main-Class: classes.Cars
    2. from within the mainLib directory (./program_name/classes/mainLib/) i do this:
    jar cvf mainLib.jar manifest ./*.class
    3. Then i move this jar file to ./program_name/lib and change directory to ./program name/
    4. try to do this: java -jar ./lib/mainLib.jar
    But it errors with:
    gary@linuxbox:~/java/cars$ java -jar ./lib/mainLib.jar
    Failed to load Main-Class manifest attribute from
    ./lib/mainLib.jar
    Any ideas why this is happening. the manifest is included in the jar'ing
    Thanks.

    At a glance, it looks like you are placing only the
    class files in the jar and trying to navigate your
    classpath to run it. Instead, you have to place ALL
    the package folders into the jar from the root of
    your package hierarchy and the jar runs anywhere, in
    any folder. The packages are INSIDE the jar.
    also I see cars/classes in a path you describe ...and
    the program seems to wnat classes/Cars ??? Could
    this be an additional issue (or am I missing seeing
    something about your package structure)?Firstly, i believe all my spelling and cases are correct.
    I have the following strcuture:
    Cars.class (contains main) : package classes in ./classes directory
    All other classes : package classes.mainLib in ./classes/mainLib
    I would like to jar ALL files in mainLib but not the class that contains the main method. Is this possible?
    I'm not sure how clear i was earlier, hope this is more understandable.

  • Help with Using JAR files

    I'm attempting to run a Java program that is contained in a .JAR file. The problem is not with that .JAR but with referencing a second .JAR for support classes. The problem is that I've created a support .JAR with two classes: Compute and Task called "Compute.jar". I've created a second class "ComputeEngine.jar" (in case you're wondering, this is the RMI example from the Sun website). I'm trying to compile this in XCode (Mac OS X IDE) which I'm not too familiar with but getting the hang of it.
    I've gotten far enough to reference the Compute.jar in the compiling and building of ComputeEngine.jar but when I run the ComputeEngine.jar, I get nothing. So I use a terminal window to run the ComputeEngine.jar with "java" command. Here's what happens:
    I enter: java -cp /Developers/Projects/Compute/build/Compute.jar -jar "ComputeEngine.jar"And I get an error: Exception in thread "main" java.lang.ClassDefNotFoundError: compute/ComputeI'm not sure why this is happening. Here is the jar tf Compute.jar output:
    META-INF/
    META-INF/MANIFEST.MF
    compute/
    compute/Compute.class
    compute/Task.classAnyone have a clue?
    Thanks
    Matt

    Thanks for the prompt response. Forgive my ignorace, but I'm new to JARs (actually wouldn't have been using it but for the fact that XCode defaults to that type of target). How do I specify the classpath in my jar? And which jar are we talking about? The Compute.jar or the ComputeEngine.jar?
    Thanks again.

  • Help with runnin JAR files

    java -cp smpp.jar:smscsim.jar com.logica.smscsim.Simulator
    Can someone explain this line. Where do the jar files have to be located for this to work. also what is the function of the com.logica.smscsim.Simulator. Does it mean that the jar files should be in com.logica.smscsim. I try it and it gives me
    Exception in thread "main" java.lang.NoClassDefFoundError: com/logica/smscsim/Simulator
    And the Simulator.java file is in the com.logica.smscsim. The class path is set.
    Here is a web site that i got this from: http://opensmpp.logica.com/CommonPart/Introduction/Introduction.htm
    Thanks!

    cp is an abbrieviation for classpath java -classpath .... is equivalent to java -cp. In your case, the jars contain the Simulator class. If you opened on with winzip or winrar you would find the Simulator class in com/logica/smscsim folder. It doesn't matter where the jar files are located. The line that you put on there, however, assumes that you are executing the java command from the same folder where the jars are.

  • Help with signing jar files

    hi,
    Iam trying to let a applet do file acces on a client. Therefore I must sign a applet so it may access the filesystem. This works, but the code keeps screaming about security violations.
    Now ive vopied the code from a example from Oracle and I found one difference.
    next to the fileUploader class that I also have in my jar file there is a
    FileUploader$1.class with the following code:
    import oracle.ewt.thread.Task;
    import oracle.ewt.thread.TaskEvent;
    final synchronized class FileUploader$1 implements Task
        private final FileUploader this$0 = fileUploader;
        private final boolean val$nf = flag;
        private final Object val$val = object;
        public void runTask(TaskEvent taskEvent)
            FileUploader.access$0(this$0, val$val, val$nf);
        FileUploader$1(boolean flag, FileUploader fileUploader, Object object)
    }but if I try to compile this code then I get all sorts of error telling me Iam missing vars and methods.
    Can anyone tell me why this class is there and what it does and if its nessesary for the fileaccess then how can I create it

    hi,
    Iam trying to let a applet do file acces on a client.
    Therefore I must sign a applet so it may access the
    filesystem. This works, but the code keeps screaming
    about security violations.
    Now ive vopied the code from a example from Oracle and
    I found one difference.
    next to the fileUploader class that I also have in my
    jar file there is a
    FileUploader$1.class with the following code:
    import oracle.ewt.thread.Task;
    import oracle.ewt.thread.TaskEvent;
    final synchronized class FileUploader$1 implements
    Task
    private final FileUploader this$0 = fileUploader;
    private final boolean val$nf = flag;
    private final Object val$val = object;
    public void runTask(TaskEvent taskEvent)
    FileUploader.access$0(this$0, val$val,
    al$val, val$nf);
    FileUploader$1(boolean flag, FileUploader
    der fileUploader, Object object)
    }but if I try to compile this code then I get all sorts
    of error telling me Iam missing vars and methods.
    Can anyone tell me why this class is there and what it
    does and if its nessesary for the fileaccess then how
    can I create it
    a Name1$Name2.class file is generated from an inner class Name2 in a class Name1.
    in your case you want to look at and compile FileUploader.java. This will then generate any inner class FileUploader$innerclass.class files necessary

  • Help with ejb-jar file

    Hello everybody;
    Have any of you read the article "HOWTO: Use a BC4J Application Module in a Stateless EJB Session Bean" ?
    Well, what I am trying to do is a Stateles CMT Session Bean with more than 1 method, and my question is what can I do in order to specify the container that I am going to use a container transaction per each method in my EJB Session bean.
    I hope you read it, because I am clueless in al this stuff!

    The EJB JAR DTD looks like this visually:
    So you can include multiple <method> element siblings as the child of a <container-transaction> element.

  • Help with running java .jar file

    Hi I just installed java with
    # pacman -S jre
    and when i try to run
    java -jar file.jar
    it says command not found. so what do i need to install to be able to run java .jar files through the CLI?

    do, what vintendo says. because it cant find the java in the default paths.

  • .jar file only works with 'java -jar'

    I have a .jar file that contains an installer. When I double click it nothing happens on my work computer (vista32). I have tried moving it to my home computer (vista64 and winXP) there it works fine when I double-click it.
    I have found a temporary solution for the work/vista32 machine. If I run it with:
    java -jar installer.jar
    it works. I have put this in the target of a shortcut to the file. But why do I need to do that manually when it works fine on my other machine by just double clicking the file?

    fedevaps wrote:
    Thing is that if I move this jar to another machine it works fine! The thing is that you are missing the point.
    It has nothing to do with the jar. Nor really java.
    Double clicking works because the OS (windows not java) understands what to do when you double click.
    If the OS (windows not java and definitely not the jar) does not understand then it doesn't work.
    So there are two independent parts.
    1. Create an executable jar.
    2. Create the correct association in windows.
    If you use the command line then you can absolutely verify that the first works. If it works then it means, absolutely (no other possibility) that if double clicking fails then the association, not the jar, is wrong.
    If it doesn't work then it means absolutely (no other possibility) that the jar, not the association, is wrong.

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Opening a java jar file through a labview program

    Hello,
    I need to open a java jar file in labview........this jar file is a GUI with multiple frames and has buttons on each frame help navigate through between frames....i just require the program to open it and close it based on some signals so then i won't have to do it manually

    LabVIEW doesn't have any control over what happens in a system exec, as you give the control to the system. You can, however, check the process list through .NET commands and kill the process (You should be able to stop it through "taskkill /F /im java.exe"). Not the prettiest solution, but should work.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Traversing the Java Jar file

    Hi,
    This might sound like a weird question, but I need to traverse the Java Jar file and create respective Java objects into objects in some other language using reflection.
    Is it possible to find the path for the class files located in any jar file? Does Java supports traversing or reading and finding jar contents?
    Thanks

    I found a way to traverse the Jar, using java.util.zip, one can create a zip file for the given jar file and using ZipEntry it is possible to findout the properties associated with the jar/zip entries.

  • Why will my java.jar file not open

    Why will my java.jar file not open

    This is the iPod touch forum. Do you have a question concerning an iPod touch? The iPod touch does not run Java.
    If you have a new Mac you have to download the Java program to run Java on a Mac. It no longer comes with the iOS.

  • The Java JAR file "minecraft.jar" could not be launched.

    I just downloaded a new version of this game called Minecraft and it says: The Java JAR file "minecraft.jara" could not be launched. Check the console for possible error messages. I have checked the Console and it says: 
    15/10/2011 23:11:08 [0x0-0x1d01d].com.apple.JarLauncher[191] Failed to load Main-Class manifest attribute from
    15/10/2011 23:11:08 [0x0-0x1d01d].com.apple.JarLauncher[191] /Users/sabi1110/Desktop/minecraft.jar/minecraft.jar
    Help?

    How to Diagnose Jar File Problems
    Open Applications > Utilities > Terminal.app, and then type in the following:
    java -version
    java -jar <drag the minecraft.jar file here>
    Then press Enter. Copy and paste whatever error message appears.

  • Ovi messes around with my .jar files

    Hmm, been unable to find info about this elsewhere.
    When i install the Ovi suite (2.0.1.36) it decides that it is the best default program for my java .jar files which i use on my computer, not my phone.
    Everytime i try to pick the appropriate program for my jar files, it either has errors or doesent show any gui.
    Is there anyway to use the phone tethering without the ovi software or is there a fix to this?

    Yes, this is completely ridiculous. Nokia PC Suite did the same, I expected newer software to stop messing around with something that is a de facto standard: .jar files are Java Archive files. OVI installation should NOT mess with the settings in registry for .jar files.
    Run regedit, and look at the key HKEY_CLASSES_ROOT\.JAR (note the dot befor JAR)
    This is where OVI has messed with things... You will see that the value OVI has set on that key is Nokia Ovi SuiteApplicationInstaller_JAR
    If you have a key on your system that is HKEY_CLASSES_ROOT\jarfile Change the setting on
    HKEY_CLASSES_ROOT\.JAR to jarfile.
    H.

Maybe you are looking for