How to protect java source code?

Hi everybody
I love Java but I think that people can decompile my class file to take my source code!Like this program
http://kpdus.tripod.com/jad.html
How to protect our source code?Even you use Jar files, they can unzip them and decompile!
Thanks in advance!

Use Java Obfuscator. Try one of these
http://preemptive.com/products/dasho/index.html
http://www.zelix.com/klassmaster/obfuscator.html
http://java-source.net/open-source/obfuscators

Similar Messages

  • How to protect JSP source code on the Server Side ?

    I am new on JSP. I Already know about various Web and Desktop technologies but is the first time on JSP. I know ASP for example.
    Well, about .NET platform, it protects my source code on the server, the source code is compiled and on the server, only the compiled file are installed, my source code stay with me...
    About JSP, how it works about ? Is possible to hide my source code too ? What the technique to hide the codes ? I need to prevent access to my source codes...
    Roberto

    roberto.novakosky wrote:
    About .exe files, do you know if a java class is more easy or dificult to do reverse engineering ?Depends on who your enemy is. If it's for example a hacker with a lot of C knowledge but zero of Java knowledge, reverse engineering .exe would be easier than .class. If one was interested, one would always take time to learn how to decompile the one or other. Making files secure is a waste of time. It's always "hackable".
    If there was a proof of concept, no one major software vendor would have had so much problems with piracy and cracks/keygens. Think about it once again. It's simply impossible. Just have a clear EULA and actually make work of it whenever you discovers if someone breaks your EULA.
    I was thinking about, the .JSP can be converted to servlet .java, and converted to .class, this way hide the source code.Once again, one could still decompile it (or reverse engineer, so you call).

  • Protecting java source code

    I heard about the possibilty of decompiling the java code and getting back the source code, is this flaw specific to java or is it common among all programming langauges?
    how is it possible to protect the source code? and how expensive is the solution?
    thank you

    Back to poster: To my knowledge, the ability tode-compile back to valid source code is unique to
    Java.
    No it's not. Any program files can be decompiledback
    to source code.
    If not their original C or C++ code, then at least
    assembly code.You cannot decompile C or C++ code to anything but
    assembler language. Which even when written by a good
    programmer is considered obfuscated by others. I
    doubt that anyone has lifted C or C++ code from
    another application using a decompiler.yes you can, all binaries can be reverse compiled, logically speaking they have to be!
    However, the readability of the output is not going to be as high as that obtained from decompiled java.
    >
    I would say that de-compilation is not a flaw in Javawhen compared to
    powerful features it has to offer. Of course it's a flaw (so I disagree with you here).
    People don't want this behavior, but it exists. As I
    stated earlier (and I'm agreeing with you on this
    one), it was an issue of priorites, and the
    developers of Java decided that it was OK because it
    allowed "powerful features"...it is a feature - whether it is a desirable feature is another argument entirely.
    >
    Here's a list of projects where the developers arenot interested in
    hiding the source code from you, in fact they let youhave it for free:
    Notice the words developers, not software companies.
    I believe in open source and participate in it when
    not bound by non-disclosure which is 99% of the time.
    But I would stand by my statement that there are no
    o software companies selling retail software that
    believe the ability to decompile Java back to Java
    source code is OK or good for them in anyway. I would
    gently suggest that providing open source code, and
    providing the ability to decompile to source code
    really don't belong in the same discussion...Protecting code is not the job of programmers, it is the job of the Law.
    rob,

  • How to beautify Java source code

    Hello!
    I'm mostly a Java developer, and I recently moved my projects to XCode. I was using jEdit previously, with a lot of plugins. I specially miss:
    * the ability to do vertical selections (jEdit, TextMate)
    * Gruntspud CVS plugin - but this can be run standalone, and I configured the default action to be /usr/bin/open so it opens the source and project files in Xcode.
    * and JavaStyle !!! This plugin "beautifies" Java source code. Sometimes, tabs are messed up and I want to clean up the code.
    Is there any JavaStyle-like plugin for XCode?

    * the ability to do vertical selections (jEdit,
    TextMate)
    Supposedly you can install 3rd party editors in Xcode. I have never done it though.
    * Gruntspud CVS plugin - but this can be run
    standalone, and I configured the default action to be
    /usr/bin/open so it opens the source and project
    files in Xcode.
    Xcode comes with a CVS plug in. Have you tried turning on SCM for your project?
    * and JavaStyle !!! This plugin "beautifies" Java
    source code. Sometimes, tabs are messed up and I want
    to clean up the code.
    I expect that a Java tool like JavaStyle would run from the command line. If so, you can probably wrap it in a script and install it in Xcode's script menu.

  • How to protect the source code?

    hello everyone,
    how can I encrypt the bean program, such that people cannot decompile and get the source code? Any link to useful reading would be very helpful too, thanks in advance!

    Just go through this query posted in the jdc forum:
    Question of the week No.160: How do you protect your code from decompilers?
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Hope this clears your doubts.
    ajit

  • How to edit Java source code of a generated Web Service?

    I generated a Jax RPC (1.4) Web Service using the JDev Wizard . Everything works fine. But now I need to make some changes in the business logic contained in the source code. The problem is there is no easy way to get to the source code - JDeveloper shows the web service but right clicking on it only lets me go to the WSDL or Mapping file - not the Java source.
    So - how do I get to the source.
    I could do a file -> open and open up the java file and edit it - but this seems like a round about way . Why doesn't JDev let me go back to the Source code easily?
    It does provide a Regeneate from Source option but there is no way (as far as I could tell) to actually jump back into the source code after I've generated the Web Service.
    Thanks!

    Hi,
    just to confirm that Jan is ight. If you seect the generated WSDL icon, which is shown in the Application Navigator, open the Structure Window and you'll see all teh generated interfaces and sourcefiles, as well as your WebService file.
    Alternatively you can use teh System navigator which will show all files in one view (ctrl+shift+N)
    Frank

  • How to protect the source code in lookout

    we are using the lookout 6.5 version for the automation. we want to protect the code from the end user, please confirm the possibility of the same.

    The .lks file is the source file. If you give the .l4p file to end user, and the end user uses the runtime only server, they cannot modify anything. But actually they can modify the process if they have development server.
    Ryan Shi
    National Instruments

  • Issue of Security about Java Source Code

    At most time Java compiler compiles the *.java source code into *.class files and then pack them in *.jar files running in the Java VM or as applet running on web pages.
    Recently I find a tool named cavaj that can decompile *.class files into *.java files. I tried it to decompile my *.class files and unvealed that the decompiled *.java files are the same of my source code!
    How to protect the source code not to be pirated? This is a big problem about the mechanism of Java. Is there any tool to compile *.java to *.exe files? Or is there any tool that can decompile *.exe to *.java in the future?

    This is a common question. If you do a search you will find many answers/solutions.
    But can it affect the performance of the program? Your program mayload slight faster, but the runtime performance is the same. It may effect your performance as it takes some time to get the obsufaction right, especially if you are using reflection.

  • How to generate Java source using clientgen WL8.1?

    Hi, does anybody know how to generate Java source code using clientgen task on WL 8.1 Sp4 or SP5? I know WL 9.0 clientgen can do this, but we are still on SP5. Basically I want to look at the source code (I was wondering why it didn't work if I initialize a service impl by passing the WSDL URL string different than the URL specified in the original WSDL file that the clientgen is run against.)
    Does anybody also know how get web service client developed on Axis work on WebLogic without conficting the web service developed on WebLgoic that is running in the same box?
    Thanks for your help!

    hi ,
    As mentioned in the Question, I am unable to find the "Java Proxy Generattion" link in the Int builder.
    Also the help doc says:
    Java proxy generation is no longer supported in subsequent releases. For new developments or when making significant changes to a service interface, use Java proxy generation in SAP NetWeaver Studio instead. More information: Creating Outside-In Web Services, SAP NetWeaver Developer Studio.
    Does that mean that I can no longer generate java proxy from Int builder?
    regards,
    Piyush

  • How to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • How to get the source code of Java Concurrent Program?

    Hi,
    How to get the source code of Java Concurrent Program?
    Example
    Programe Name:Format Payment Instructions
    Executable:Format Payment Instructions
    Execution File Name:FDExtractAndFormatting
    Execution File Path:oracle.apps.iby.scheduler
    Thanks in advance,
    Senthil

    Go on Unix box at $JAVA_TOP/oracle/apps/iby/scheduler
    You will get class file FDExtractAndFormatting.
    Decompile it to get source code.
    Thanks, Avaneesh

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How to save the user-defined Java source code

    Would you please tell me how to download all of the java source code in one software component.

    UDFs can be exported one by one as a .mte file...not at one go...

  • Protecting the source code

    I heard about the possibilty of decompiling the java code and getting back the source code, is this flaw specific to java or is it common among all programming langauges?
    how is it possible to protect the source code? and how expensive is the solution?
    thank you

    This is not a flaw!
    Java is compiled on the byte level not bit level. This is so because the same class can run on Windows, Solaris, Linux and Unix. This makes the execution a little bit slower and easier to decompile but a small price to pay for cross platform compatibilty.

  • How to get the source code in PAR file

    Hi All,
    I used the PAR migration tool to migrate from PAR to EAR file. When I imported the EAR into NWDS 7.3, I was just able to see the structure and jsp files and could not find the java source code files. I would requires the java source code to make modifications so that deprecated APIs can be replaced and to also make the code compatible with JDK 1.6.
    I think the original 7.0 PAR file itself does not contain the source code. I decided to use the "Include source code" option when exporting the 7.0 PAR.
    I have the portal application DC project in my NWDS 7.0. However, when I try to export the PAR file using Export --> PAR File -- > Next... I am unable to select any project from the list. The list appears blank with disabled Next & Finish buttons.
    I also noticed that in the portal DC application structure, there is a .sda file under /gen/default/deploy. Also there is no PAR folder under /gen/default/public.
    How do I include the source in the PAR file so that I can edit the same after migrating to EAR format ?
    Regards,
    Melwyn

    DC and PAR/EAR stuff are different formats, SC/DC is an archive type used by NWDI, if I got it right.
    How do I go about generating the PAR file (with source) ?
    In fact through including the seources while creating the PAR/EAR in NWDS, but: no need to do that, you can also depack SDA (rename it to zip). If you wanna just see the Java sources you will find them there, otherwise decompile as Vijay already sad.
    cheers

Maybe you are looking for