Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
DashO-Pro by preEmptive Solutions
DashO-Pro by preEmptive Solutions

I remember how I first got into Java. A friend called my attention to these neat little mini applications that could be easily embedded into HTML files. These applets provided a quick way to jazz up even the most mundane Web pages. She showed me some UseNet groups that contained huge libraries of these applets. I soon learned how to go into their code and change (dare I use the word "hack"?) them to fit my needs. Those applets were nobody's property; they were just there for the taking. Some people would come up with clever ways of making them run more efficiently, and would post their findings for all to use. When working with pubic archives, this is all well and good. The problem is many people learned how to hack Java applications that were not public domain. They would download applications, decompile the source and hack it to look like their own.

Today's complicated Java application involves many hours of hard work. Many of us do so under the employment of a company that stands to gain or lose hundreds of thousands of dollars based on the success of the application. We can't take the risk of unethical people using our code to suit their own needs. At the same time, code has to be quick and neat. What we need is a development tool that makes it literally impossible to hack source code without sacrificing speed and efficiency. What's needed is DashO-Pro from preEmptive Solutions.Obfuscation With Traditional and Advanced Methods
No program is totally safe from decompilers (to claim so would invite big trouble!), but DashO-Pro makes life as difficult as possible for them. Some of the methods used are:

  • The removal of extraneous debugging information from class files.
  • Removal of unused classes, fields and methods for maximum size reduction.
  • Renaming all possible methods, classes and fields. All methods, such as public and private, can be renamed as long as they don't override a method from a non-included class. This process does not effect methods such as init and paint. Renaming reduces all to one or two-character names. Since decompilers have the ability to rename unprintable names back to printable ones, DashO-Pro provides sophisticated renaming properties that can't be bypassed by decompilers.
  • The duplication of constant pool entries. This is a clever feature, as it won't rename multiply-used entries. Suppose the string "testing" is printed while there is a method called "testing;" the string would be printed as is but the method would be renamed.
  • The use of irreducible control flow graphs for obfuscation. These can't be produced in the Java language due to its control structure. Code is changed in such a way that it no longer has an equivalent sequence in Java at the source level.

    More Than Just an Obfuscator, It's an Advanced Optimizer, Size Reducer and Packaging System
    Anyone who has ever done programming knows the value of correct, efficient code. Traditionally, an optimizer is used to increase code performance. Optimizing tools for Java have been up until now immature at best. DashO-Pro implements many standard optimizing transforms unavailable in today's Java compilers, as well as some new transforms targeted specifically for Java bytecode.

    One classic optimization is dead code elimination. DashO-Pro takes this to the nth degree by removing all unused information in your program. preEmptive Solutions has provided the following sample code to demonstrate DashO-Pro's removal techniques:

    class MyClass {
    int Z;
    public static void main(String args[]) {
    System.out.println("Hello World");
    }

    public void doesNothing() {
    Z = 5;
    OtherClass X = new OtherClass();
    X.doOtherThings();
    }
    }

    In this example, DashO-Pro's algorithms detect that the "doesNothing" method is never called: therefore, it is removed along with "OtherClass" and the "Z" variable. DashO-Pro's output only includes the absolute minimum set of classes, methods and fields required by your application. Your code size is minimized, often a desired feature for applets and other code that needs to move around the network.

    Using DashO-Pro
    DashO-Pro can be run as a command line or GUI application. When running as a command line program there are five runtime options that can be used with DashO-Pro:
    1. -f :force execution. This option, as the name suggests, forces execution, even when your application uses dynamic class loading (e.g,. by using the Class forName method). To use this option, it is necessary to specify all dynamically loaded classes in the configuration file; alternatively, you may allow DashO-Pro to automatically detect possible dynamically loaded classes.
    2. -v :verbose output. When this option is used information is given about the progress of the execution.
    3. -i :investigate only. This option tells DashO-Pro not to create any disk files. A report will be generated which specifies the candidates for removal.
    4. -q :run quietly. In this mode, DashO-Pro runs completely without printed output. Use this option for inclusion into application build sequences. The verbose option will be overridden here.
    5. : configuration file. This allows the naming of a specific configuration file, which is required for running DashO-Pro. This is a handy option when using multiple, tailor-made configurations in DashO-Pro. Trigger methods are not entered on the command line, as they must be included in configuration file.

    When using the GUI, it is not necessary to write a configuration file, as the GUI is really a front end to the configuration file. The interface is initiated by running the DashO-ProGui class from the jar file. The Windows enthusiast will be delighted to know that double clicking the icon will run the interface. I found the GUI to be well laid out and a snap to move around in.

    DashO-Pro's triple feature of optimization, obfuscation and compression makes it an extremely valuable tool in the professional Java developer's bag of tricks. If you have a need to streamline and hide your code, it's a must have!

    About Ed Zebrowski
    Edward Zebrowski is a technical writer based in the Orlando, Florida, area. Ed runs his own Web development company, ZebraWeb

  • In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Latest Cloud Developer Stories
    Swisscom, the Swiss telecom, is going into the cloud business. Its subsidiary Swisscom IT Services AG has signed up with Red Hat as a Certified Cloud Provider and launched a public cloud Infrastructure-as-a-Service (IaaS) cloud targeting enterprise-class customers primarily in ...
    Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP)....
    In a surprise move on Tuesday, January 10, Oracle wheeled out its Big Data Appliance. That’s the one it said in October would be ready sometime in the first half. Only nobody believed it meant early in the first half. Heck, it’s not even clear anybody thought Oracle could make ...
    Rackspace Hosting, the service leader in cloud computing, on Thursday announced its acquisition of SharePoint911, an industry leader in SharePoint consulting, training, and "JumpStart" services within SharePoint. The unification of both companies provides capabilities to deliver ...
    CloudLinux, Inc., on Thursday released CafeFS 3, a virtualized file system for shared hosters that cages each customer within its own virtualized file system. CageFS becomes part of CloudLinux OS at no additional charge. CloudLinux OS, the only commercially-supported Linux OS m...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

    SYS-CON Featured Whitepapers
    ADS BY GOOGLE

    Breaking Cloud Computing News
    United Data Technologies (UDT), has developed a unique set of social media specific solutions that w...