Obfuscation with Proguard

Was just wondering if anyone has had any experience with Proguard - the Java obfuscator and shrinker. My server receives serialized objects and these object's classes have been excluded from obfuscation, however for some reason the serialversionUID gets changed resulting in an invalid class exception. I've tried to eliminate the SerialVersionUID from the being obfuscated but I still have the issue. Is there any way of preventing the serialversionUID from being changed through the obfuscation process.
I know this may be a bit off topic and I was going to post on the sourceforge forums for Proguard but the forums don't appear to be active.
If anyone out there has experience with Proguard I'd be very hopeful for some insights as I have none.
Thanks you very much.

Ah thanks ejp, I'll admit I never did read too much into how Java assigns SUIDs. I'll have to read up on that.
Turns out you were right. I had only obfuscated the client classes which obviously added confusion. It's quite hard to keep track of which jars are obfuscated, which ones are signed and obfuscated and which ones are raw jar files especially when you have a server program and several different versions of client program to compile. I think I might make a bash script for it...
If anyone has similar issues I managed to sort it out by obfuscating both the server and client but filtering out any implementation of Serializable from obfuscation and optimization. I also made sure to keep the serialVersionUID from obfuscation and I think it is essential that you declare your own serialVersionUID on all Serializable classes if you're going to obfuscate.
Thanks ejp.

Similar Messages

  • Error In Obfuscating with Proguard in KToolbar

    Hi...
    I'm using Proguard 4.2 with my Ktoolbar and even tried this with Proguard 4.0.1
    When I create an obfuscated package... it creates it properly..
    Building "MobileLocalTrains"
    ProGuard, version 4.2
    Reading program jar [C:\WTK22\apps\MobileLocalTrains\bin\MobileLocalTrains.jar]
    Reading library jar [C:\WTK22\lib\midpapi20.jar]
    Reading library jar [C:\WTK22\lib\cldcapi11.jar]
    Preparing output jar [C:\Documents and Settings\Dayson\Local Settings\Temp\MobileLocalTrains.jar]
      Copying resources from program jar [C:\WTK22\apps\MobileLocalTrains\bin\MobileLocalTrains.jar]
    Wrote C:\WTK22\apps\MobileLocalTrains\bin\MobileLocalTrains.jar
    Wrote C:\WTK22\apps\MobileLocalTrains\bin\MobileLocalTrains.jad
    Build completebut when I hit run and try to run the application, the midlet terminates after the following error...
    Running with storage root DefaultColorPhone
    java.lang.NoClassDefFoundError: b/b
         at Program.startApp(+100)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    Execution completed.
    741742 bytecodes executed
    11 thread switches
    756 classes in the system (including system classes)
    4664 dynamic objects allocated (140700 bytes)
    10 garbage collections (118228 bytes collected)i need my code to be obfuscated... the obfuscation works fine in EclipseMe with the same source code....

    EclipseME also uses Proguard for obfuscation, so the difference could either be in the java compiler (eclipse has its own) or the Proguard settings, which is more likely. You asked if it could be caused by the fact that you have some classes in the default package - well, it's possible.
    When you look at eclipse Preferences -> J2ME -> Packaging -> Obfusation, you should see the Proguard root directory and something like this:
    Arguments:
         -dontusemixedcaseclassnames -dontnote -defaultpackage ''
    Keep expressions:
         public class * extends javax.microedition.midlet.MIDlet
    You should see the same things if you look in the file YourMIDlet.pro in your MIDlet project directory in WTK. Personally I only have -dontusemixedcaseclassnames and the "keep MIDlets" thing, but I don't use default packages so I didn't notice I'm missing something.
    Or you can try to get rid of the default package, that could help too.

  • "Invalid or corrupt file" after Obfuscation with "The Marvin Obfuscator"

    Hi!
    I want to use "The Marvin Obfuscator" (www.drjava.de) to secure MY code a little bit.
    But the resulting .jar-file doesn't work. "Invalid or corrupt file".
    I think, that things, i configured in the configuration file aren't true.
    Has anyone experience with "The Marvin Obfuscator"?
    I created a .jar-file with Eclipse. My Marvin-configuration-file (config.txt) is as the following:
    // Template for a Marvin Obfuscator config file
    // Directories and jar/zip archives where your application's classes reside
    // (relative to project directory)
    classpath=("archive.jar","C:\Java\jre1.5.0_05\lib\rt.jar")
    // The name of your applet or applications's main class
    // (e.g. executable class, servlet or applet)
    // (as it would appear in <applet code=...> or in "java ...")
    // Note the double parentheses!
    mainClasses=(("control.Start"))
    // If you want your main class to be called differently after the obfuscation,
    // you can enter the new name (including package) like this:
    // mainClasses=(("myapp.Main" newName="main"))
    // You can also have more than one main class:
    // mainClasses=(("myapp.ServletA") ("myapp.ServletB"))
    // Names of methods (without class name) that are accessed via reflection.
    // The obfuscator will not change the names of these methods.
    //preserveMethodNames=("methodName1","methodName2","reflected*")
    // Classes that are accessed via reflection.
    // The obfuscator will not change the names of these classes.
    // Note: Method names within these classes will still be obfuscated.
    // (If you need to preserve method names too, what you probably want
    // is "externalClasses".)
    // Note: You can use the wildcard character (*).
    //preserveClassNames=("mypackage.SpecialClass")
    // Classes that are used by your application,
    // but should not be included in the obfuscated jar file.
    // The obfuscator also ensures that references to these classes continue to
    // work ("referencing" includes calling, subclassing and implementing).
    // Note: Any part of these libraries that is actually used must be in the
    // classpath (either system classpath or classpath= line in this file).
    //externalClasses=("com.company.externallibary.*","org.apache.*")
    // Locations of resource files.
    // If you want resource files (images, properties files, ...) to be included
    // in the jar file, specify the resource directories or archives here.
    // Do NOT specify individual resources files (these will be interpreted as
    // archives).
    // Note: Directories will be scanned recursively.
    // Note: .class files are excluded automatically.
    // Note: You will usually want to reuse entries from the classpath= line
    // (classes and resources are often bundled in the same jar files).
    //resources=("resourcedir","resources.jar")
    // Advanced obfuscation features.
    encryptStrings=true // You can try to set this to false for troubleshooting

    Why not use another obfuscator? Google for "java obfuscator". I myself
    use JShrink and it does a good job in reducing the code size.
    It always generated valid class files for me.
    As for "protection", don't count on it too much with any obfuscator, but
    yes, some may do a better job than others.

  • Having trouble with proguard and spring IoC

    My project uses spring for IoC. After obfuscation the application context fails to find the bean since it's class name has been changed. I tried to use -adaptresourcefilecontents option to get context.xml file be updated according to the class name, but it didn't work: the file wasn't changed.
    Any ideas?
    Edited by: ariel-carmi on Nov 16, 2009 6:04 AM

    Why are you using obfuscation? Are you really going to be deploying your web-app on untrusted servers?

  • Eclipse + Proguard + Ant

    Ok... I'm overwhelmed. I'm putting my game in a jar for webstard, and obfuscating it with Proguard. I use Eclipse, and I know it has Ant integrated, and I'm pretty sure it can help me here. Right now I save (Eclipse auto-compiles), I run Proguard to obfuscate my code, then I manually create a Jar file by renaming a .zip file I make with WinRAR, and move in the particular folders of obfuscated code I want. That's really tedious and time consuming to have to do that every time I make some changes to my code.
    Now... in looking up information on Ant, I feel like I'm looking at a whole new language. Even beginner's tutorials seem to make no sense. Maybe I'm just looking too hard to find a specific solution, but I don't want to just jump out into the ocean of Google with no sense of direction. Could anyone help me out with what I need to do, or give me some good resources/direction to head for so I'm not completely clueless as I learn how to work with this? Thanks!

    Ant is fairly simple. I'm sure they have a sample app build script somewhere, and I recomend you spend some time looking over the tutorials, and asking sperifc questions (either here, or might be better at [url http://forum.java.sun.com/forum.jsp?forum=54]n2j or even the [url http://ant.apache.org/mail.html]Ant User Mailing List.
    But a basic Ant file looks like:
    file system:
    |
    +- src (containing the source code)
    +- misc (Containg the mainifest)
    +- res (Containg the resouce files)
    You might have to change the above, to match however Eclipse works
    <project name="PLACE YOUR NAME HERE" default="dist">
           <property name="proguard-home" value="z:\proguard1.7.2"/>
           <property name="source" value="src"/>
           <property name="distribution" value="dist"/>
           <property name="compiled" value="compiled"/>
           <property name="misc" value="misc"/>
           <property name="resources" value="res"/>
         <target name="init">
              <echo message="Running with base dir ${basedir}"/>
              <!-- ensure some dirs exist -->
              <mkdir dir="${distribution}"/>
           </target>
          <target name="compile" depends="init">
              <javac srcdir="${source}" destdir="${compiled}" />
          </target>
         <target name="obfuscating-with-proguard" depends="compile">
                 <taskdef name="proguard" classname="proguard.ant.ProGuardTask"
              classpath="${proguard-home}/lib/proguard.jar" />
              <echo message="obfuscating with proguard"/>
              <zip destfile="in.zip" basedir="${compiled}"/>
              <delete dir="${compiled}" />
              <proguard printmapping="mapping.txt"
                        outjar="out.zip"
                     defaultpackage="">
    <!--
         SEE PROGUARD DOCS, THIS IS FOR J2ME!
    -->
                     <libraryjar name="${j2mewtk.home}/lib/midpapi.zip"/>
                     <injar name="in.zip" />
                     <!-- Preserve all public midlets. -->
                     <keep access="public"
                           extends="javax.microedition.midlet.MIDlet" />
              </proguard>
              <mkdir dir="${unverified}"/>
              <unzip src="out.zip" dest="${unverified}"/>
              <delete file="in.zip"/>
              <delete file="out.zip"/>
         </target>
         <target name="dist" depends="obfuscating-with-proguard">
              <jar jarfile="${distribution}/${appname}.jar"
                  manifest="${misc}/MANIFEST.MF">
                   <fileset dir="${compiled}"/>
                   <fileset dir="${resources}"/>
              </jar>
           </target>
    </project>

  • Obfuscation error using ANT

    Hello ,
    While Obfuscating the build.xml file with ANT build m getting the below error .
    Please help me to solve the problem..
    j2mepolish:
    [j2mepolish] info: the license attribute is no longer supported. Please place your license.key file either to ${project.home} or to ${polish.home}.
    [j2mepolish] J2ME Polish 2.0-RC4 (GPL License)
    [j2mepolish] Loading device database...
    [j2mepolish] Using locale [de_DE]...
    [j2mepolish] assembling resources for device [Generic/DefaultColorPhone].
    [j2mepolish] preprocessing for device [Generic/DefaultColorPhone].
    [j2mepolish] Warning: CSS style [title] not found, you should define it for designing the titles of screens.
    [j2mepolish] compiling for device [Generic/DefaultColorPhone].
    [j2mepolish-javac-Generic/DefaultColorPhone] Compiling 114 source files to C:\JCPolish\build\real\Generic\DefaultColorPhone\de_DE\classes
    [j2mepolish] obfuscating for device [Generic/DefaultColorPhone].
    BUILD FAILED
    java.lang.NoClassDefFoundError: de/enough/polish/util/OrderedMultipleEntriesMap
    Total time: 13 seconds Thanks in advance.

    I had the same problem using j2mepolish 2.0.4 and eclipse with mepose plugin. This error comes when obfuscating with proguard. Without obfuscation it works just fine. After a lot of work I got it to compile however.
    It seems that the 2.0.4 version installer package with option to install mepose is not working or then the current version of mepose is not compatible with j2mepolish 2.0.4.
    The solution is not to install mepose. I had it installed already so I uninstalled everything including eclipse, wtk, and j2mepolish. When reinstalling I didn't check the option to install mepose in the j2mepolish installer. And it worked!
    It seems that the mepose plugin installs an earlier version (2.0?) of enough-j2mepolish-build.jar that doesn't have OrderedMultipleEntriesMap class.
    I hope this helps...

  • Proguard Error with ant/antenna

    I get the following proguard error:
    [wtkobfuscate] java.io.IOException: The output jar is empty. Did you specify the proper '-keep' optons?
    Any idea what is wrong?
    Thanks,
    earamsey
    [wtkobfuscate] Obfuscating C:\Projects\J2ME\CellStory\bin\CellStory.jar with ProGuard
    [wtkobfuscate] ProGuard, version 3.2
    [wtkobfuscate] Reading jars...
    [wtkobfuscate] Reading program jar [C:\Projects\J2ME\CellStory\bin\CellStory.jar]
    [wtkobfuscate] Reading library zip [C:\WTK22\wtklib\devices\Series_60_MIDP_SDK_2_1\lib\kmidp20.zip]
    [wtkobfuscate] Removing unused library classes...
    [wtkobfuscate] Original number of library classes: 305
    [wtkobfuscate] Final number of library classes: 6
    [wtkobfuscate] Shrinking...
    [wtkobfuscate] Removing unused program classes and class elements...
    [wtkobfuscate] Original number of program classes: 1
    [wtkobfuscate] Final number of program classes: 0
    [wtkobfuscate] java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options?
    ^^^^^___Error that I get is here
    [wtkobfuscate] at proguard.ProGuard.shrink(ProGuard.java:474)
    [wtkobfuscate] at proguard.ProGuard.execute(ProGuard.java:86)
    [wtkobfuscate] at proguard.ProGuard.main(ProGuard.java:916)
    Here is my build.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="MIDP2.0" default="n66xx" basedir=".">
        <description>
         Build file for MyLittleProject
        </description>
        <!-- predefined antenna tasks -->
        <taskdef resource="antenna.properties"/>
        <!-- ProGuard home -->
        <property name="wtk.proguard.home" value="C:\proguard3.2"/>
        <!-- RetroGuard home -->
        <property name="wtk.retroguard.home" value="C:\retroguard-v2.0.2"/>
        <property name="midlet.name" value="MyLittleProject"/>
        <property name="midlet.home" value="C:\Projects\J2ME\MyLittleProject"/>
        <target name="build" description="Builds everything">
         <antcall target="n66xx"/>
        </target>
        <target name="n66xx" description="Builds Nokia Models 6600 and 6620">
         <ant dir="devices/nokia66xx" inheritall="true" target="build"/>
        </target>
        <target name="cellstory_init" description="Create directory structure">
         <property name="src_pp" location="${preproc_dir}"/>
         <!-- set global properties -->
         <property name="src" location="src"/>
         <property name="bin" location="bin"/>
         <property name="res" location="res"/>
         <property name="classes" location="classes"/>
         <!-- Create the timestamp -->
         <tstamp/>
         <!-- Make directories -->
         <mkdir dir="${src}"/>
         <mkdir dir="${src_pp}"/>
         <mkdir dir="${bin}"/>
         <mkdir dir="${res}"/>
         <mkdir dir="${classes}"/>
        </target>
        <target name="cellstory" depends="cellstory_init" description="Build it all">
         <wtkjad
             jadfile="${bin}/${midlet.name}.jad"
             jarfile="${midlet.name}.jar"
             name="MyLittleProject"
             vendor="Wizzards and Lizzards"
             version="1.0.0">
             <midlet
              name="${midlet.name}"
              icon="${midlet.name}.png"
              class="${midlet.name}.class"/>
             <attribute
              name="deleteConfirm"
              value="Do you really want to delete me?"/>
         </wtkjad>
         <!-- do preprocessing -->
         <wtkpreprocess
             srcdir="${src}"
             destdir="${src_pp}"
             symbols="${symbols}"/>
         <!-- Compile the code -->
         <wtkbuild
             srcdir="${src_pp}"
             destdir="${classes}"
             deprecation="on"
             target="1.4"
             source="1.4"/>
         <!-- Package the classes -->
         <wtkpackage
             jarfile="${bin}/${midlet.name}.jar"
             jadfile="${bin}/${midlet.name}.jad"
             obfuscate="false"
             preverify="false">
             <fileset dir="${classes}" includes="**/*.class"/>
             <fileset dir="${res}" includes="**"/>
         </wtkpackage>
         <wtkobfuscate
             jarfile="${bin}/${midlet.name}.jar"
             jadfile="${bin}/${midlet.name}.jad"
             tojarfile="${bin}/${midlet.name}._jar"
             obfuscator="proguard">
         </wtkobfuscate>
         <wtkpreverify jarfile="${bin}/${midlet.name}.jar"/>
         <!-- run -->
         <wtkrun jadfile="${bin}/${midlet.name}.jad" device="Series_60_MIDP_SDK_2_1"/>
        </target>
        <target name="cleanbuild" description="Cleans and builds">
         <ant dir="devices/nokia66xx" inheritall="true" target="cleanbuild"/>
        </target>
    </project>

    I figured this out - I needed a formatter tag to see the output of the test.

  • Setting ProGuard options in build.xml (SOLVED)

    Hi guys,
    I'm trying to obfuscate my MIDlet so I can use BCrypt and the bouncy castle library. I'm getting the following error and I see that I need to add '-dontskipnonpubliclibraryclasses' and/or '-dontskipnonpubliclibraryclassmembers'. I've read ProGuard's instructions on adding options to an xml file but they are incompatible with Netbeans 6.8's build.xml. How can I set these two options for ProGuard through my build.xml file? I've included the obfuscation related part of my build-imp.xml.
    NetBeans Output:
    Building jar: C:\Users\Vladimir\Documents\NetBeansProjects\SecureIM_MIDP\build\before-obfuscation.jar
    ProGuard, version 4.4
    Reading program jar [C:\Users\Vladimir\Documents\NetBeansProjects\SecureIM_MIDP\build\before-obfuscation.jar]
    Reading library jar [C:\Java_ME_platform_SDK_3.0\lib\midp_2.0.jar]
    Reading library jar [C:\Java_ME_platform_SDK_3.0\lib\cldc_1.1.jar]
    Note: duplicate definition of library class [java.io.ByteArrayOutputStream]
    Note: there were 1 duplicate class definitions.
    Warning: shared.BCrypt: can't find referenced method 'java.lang.Object clone()' in class java.lang.Object
    Warning: there were 1 unresolved references to program class members.
             Your input classes appear to be inconsistent.
             You may need to recompile them and try again.
             Alternatively, you may have to specify the options
             '-dontskipnonpubliclibraryclasses' and/or
             '-dontskipnonpubliclibraryclassmembers'.
    Error: Please correct the above warnings first.
    C:\Users\Vladimir\Documents\NetBeansProjects\SecureIM_MIDP\build.xml:94: Obfuscation failed with error code 1.
    BUILD FAILED (total time: 13 seconds)build-imp.xml's obfuscation:
    <!--proguard-->
        <target name="proguard-init" description="Up-to-date check before obfuscation.">
            <property name="obfuscation.level" value="0"/>
            <condition property="no.obfusc">
                <or>
                    <equals arg1="${obfuscation.level}" arg2="0"/>
                    <uptodate targetfile="${obfuscator.destjar}">
                        <srcfiles dir="${buildsystem.baton}"/>
                    </uptodate>
                </or>
            </condition>
            <uptodate property="obfuscation.up-to-date" targetfile="${obfuscator.destjar}">
                <srcfiles dir="${buildsystem.baton}"/>
            </uptodate>
        </target>
        <target name="skip-obfuscation" depends="proguard-init" if="obfuscation.up-to-date">
            <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
            <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
        </target>
        <target name="proguard" depends="skip-obfuscation" description="Obfuscate project classes." unless="no.obfusc">
            <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
            <fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
            <fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
            <property name="obfuscator.classpath" value=""/>
            <dirname file="${obfuscator.srcjar}" property="obfuscator.srcjar.dir"/>
            <dirname file="${obfuscator.destjar}" property="obfuscator.destjar.dir"/>
            <mkdir dir="${obfuscator.srcjar.dir}"/>
            <mkdir dir="${obfuscator.destjar.dir}"/>
            <jar jarfile="${obfuscator.srcjar}" basedir="${buildsystem.baton}"/>
            <property name="obfuscation.custom" value=""/>
            <nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/>
            <mkdir dir="${obfuscated.classes.dir}"/>
            <unjar src="${obfuscator.destjar}" dest="${obfuscated.classes.dir}"/>
            <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
        </target>
        <!--obfuscate-->
        <target name="pre-obfuscate"/>
        <target name="post-obfuscate"/>
        <target name="obfuscate" depends="compile,pre-obfuscate,proguard,post-obfuscate" description="Obfuscate project classes."/>Thanks guys,
    jangozo
    Edited by: jangozo on Jan 24, 2010 1:55 PM
    I just got rid of the BCrypt file.

    I ran into this same problem when using ProGuard 4.1 for Java obfuscation. The problem is that there is a space in the path to your JDK/JRE, for example: c:\Program Files\Java\jdk1.6.0_03. Because there is a space before the word "Files", it isn't working. The solution to to wrap quotes around that particular command-line argument. In ANT, I needed to use single-quotes (because double-quotes were already in use for the XML attribute) such as:
    <java jar="proguard.jar" fork="true" timeout="30000">
    <arg value="-libraryjars"/>
    <arg value="'${java.home}/lib/rt.jar'"/> <!-- Notice both double and single quotes used on this line. -->
    ...rest of the arguments go here...
    </java>
    Alternatively, using ProGuard's custom ANT Task, it would look something like (notice the use of double-quotes around the rt.jar location):
    <proguard>
    -libraryjars "${java.home}/lib/rt.jar"
    ...rest of the arguments go here...
    </proguard>
    Anyways, I hope this helps you or anyone else who runs into the same problem. Both of these approaches have worked for me.

  • Preverification failed with error code 1. BUILD FAILED

    Hallo Oracle,
    Am learning my first J2me application and when i build it am getting this error. can some one help me understand what it means
    Created dir: C:\Users\Dell\Documents\NetBeansProjects\watsdownapp\build\preverifysrc
    Copying 1957 files to C:\Users\Dell\Documents\NetBeansProjects\watsdownapp\build\preverifysrc
    Created dir: C:\Users\Dell\Documents\NetBeansProjects\watsdownapp\build\preverified
    Preverifying 1957 file(s) into C:\Users\Dell\Documents\NetBeansProjects\watsdownapp\build\preverified directory.
    Error preverifying class com.sun.activation.registries.MailcapFile
        VERIFIER ERROR com/sun/activation/registries/MailcapFile
    .<init>(Ljava/lang/String;)V:
    Cannot find class java/util/Map
    C:\Users\Dell\Documents\NetBeansProjects\watsdownapp\nbproject\build-impl.xml:431: Preverification failed with error code 1.
    BUILD FAILED (total time: 25 seconds)
    this is the contents of build-impx.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- *** GENERATED FROM project.xml - DO NOT EDIT *** -->
    <project name="watsdownapp-impl" default="jar" basedir="..">
        <!--load-properties-->
        <target name="pre-load-properties">
            <property file="nbproject/private/private.properties"/>
            <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
            <available property="user.properties.file.exists" file="${user.properties.file}"/>
        </target>
        <target name="exists.config.active" unless="config.active">
            <echo level="warning" message="Active configuration (config.active property) is not set - using default."/>
            <property value="" name="config.active"/>
        </target>
        <target name="exists.netbeans.user" unless="netbeans.user">
            <echo level="warning" message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically."/>
        </target>
        <target name="exists.user.properties.file" unless="user.properties.file.exists">
            <echo level="warning" message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)."/>
        </target>
        <target name="load-properties" depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file">
            <loadproperties srcfile="nbproject/project.properties">
                <filterchain>
                    <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
                    <concatfilter prepend="nbproject/project.properties"/>
                    <containsregex pattern="^platform.active=|^deployment.method=|^deployment.instance="/>
                </filterchain>
            </loadproperties>
            <property name="deployment.instance" value="default"/>
            <loadproperties srcfile="${user.properties.file}">
                <filterchain>
                    <replaceregex pattern="^platforms\.${platform.active}\." replace="platform."/>
                    <replaceregex pattern="^deployment\.${deployment.method}\.scriptfile=" replace="deployment.scriptfile="/>
                    <replaceregex pattern="^deployments\.${deployment.method}\.${deployment.instance}\.([^=]+)=" replace="\1="/>
                </filterchain>
            </loadproperties>
            <loadproperties srcfile="nbproject/project.properties">
                <filterchain>
                    <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
                    <concatfilter prepend="nbproject/project.properties"/>
                </filterchain>
            </loadproperties>
        </target>
        <!--basic-init-->
        <target name="exists.platform.active" unless="platform.active">
            <echo level="warning" message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)."/>
        </target>
        <target name="exists.platform.configuration" unless="platform.configuration">
            <echo level="warning" message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration."/>
            <property name="platform.configuration" value="CLDC-1.0"/>
        </target>
        <target name="exists.platform.profile" unless="platform.profile">
            <echo level="warning" message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile."/>
            <property name="platform.profile" value="MIDP-1.0"/>
        </target>
        <target name="basic-init" depends="exists.platform.active,exists.platform.configuration,exists.platform.profile">
            <fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-mobility-antext.jar file in the IDE installation directory.</fail>
            <fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail>
            <fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail>
            <fail unless="src.dir">Must set src.dir</fail>
            <fail unless="build.dir">Must set build.dir</fail>
            <fail unless="dist.dir">Must set dist.dir</fail>
            <fail unless="dist.jar">Must set dist.jar</fail>
            <property name="javac.source" value="1.3"/>
            <property name="javac.target" value="1.1"/>
            <property name="javac.encoding" value="${file.encoding}"/>
            <property name="deployment.number" value="0.0.1"/>
            <property name="deployment.counter" value="000002"/>
            <condition property="no.deps">
                <istrue value="${no.dependencies}"/>
            </condition>
            <condition property="no.preprocess">
                <isfalse value="${use.preprocessor}"/>
            </condition>
            <condition property="no.javadoc.preview">
                <isfalse value="${javadoc.preview}"/>
            </condition>
            <condition property="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes},**/*Test.java,**/test,**/test/**">
                <istrue value="${filter.exclude.tests}"/>
            </condition>
            <property name="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes}"/>
            <condition property="deployment.do.override.jarurl" value="">
                <istrue value="${deployment.override.jarurl}"/>
            </condition>
            <condition property="config.active.name" value="DefaultConfiguration">
                <length string="${config.active}" trim="true" length="0"/>
            </condition>
            <property name="config.active.name" value="${config.active}"/>
            <taskdef resource="org/netbeans/mobility/antext/defs.properties">
                <classpath>
                    <pathelement path="${libs.j2me_ant_ext.classpath}"/>
                </classpath>
            </taskdef>
            <condition property="skip.deployment">
                <equals arg1="${deployment.method}" arg2="NONE" casesensitive="false" trim="true"/>
            </condition>
            <condition property="app-version.autoincrement.trigger">
                <istrue value="${app-version.autoincrement}"/>
            </condition>
            <condition property="debug.timeout" value="30000">
                <or>
                    <equals arg1="${debugger.timeout}" arg2="" trim="true"/>
                    <not>
                        <isset property="debugger.timeout"/>
                    </not>
                </or>
            </condition>
            <property name="debug.timeout" value="${debugger.timeout}"/>
            <nb-overrideproperty name="buildsystem.baton" value="${src.dir}"/>
        </target>
        <!--cldc-init-->
        <target name="cldc-pre-init">
            <condition property="cldc-platform.trigger">
                <equals arg1="CLDC" arg2="${platform.trigger}" casesensitive="false"/>
            </condition>
        </target>
        <target name="cldc-init" depends="cldc-pre-init" if="cldc-platform.trigger">
            <property name="preverify.sources.dir" location="${build.dir}/preverifysrc"/>
            <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
            <property name="platform.device" value=""/>
            <property name="dist.jad.url" value="file://"/>
            <property name="run.cmd.options" value=""/>
            <condition property="evaluated.run.security.domain" value="">
                <isfalse value="${run.use.security.domain}"/>
            </condition>
            <property name="evaluated.run.security.domain" value="${run.security.domain}"/>
            <condition property="override.jarurl.trigger">
                <and>
                    <istrue value="${cldc-platform.trigger}"/>
                    <istrue value="${deployment.override.jarurl}"/>
                </and>
            </condition>
            <property name="deployment.jad" location="${dist.dir}/${dist.jad}"/>
            <property name="deployment.jar" location="${dist.dir}/${dist.jar}"/>
            <property name="deployment.dir" location="${dist.dir}"/>
            <patternset id="deployment.patternset">
                <include name="${dist.jad}"/>
                <include name="${dist.jar}"/>
            </patternset>
        </target>
        <!--cdc-init-->
        <target name="cdc-init">
            <condition property="cdc-platform.trigger">
                <equals arg1="CDC" arg2="${platform.trigger}" casesensitive="false"/>
            </condition>
            <available file="${manifest.file}" property="manifest.available"/>
            <condition property="main.class.applet">
                <equals arg1="${main.class.class}" arg2="applet" casesensitive="false"/>
            </condition>
            <condition property="main.class.xlet">
                <equals arg1="${main.class.class}" arg2="xlet" casesensitive="false"/>
            </condition>
            <condition property="manifest.available+main.class+fat.jar">
                <and>
                    <isset property="manifest.available"/>
                    <isset property="main.class"/>
                    <istrue value="${platform.fat.jar}"/>
                    <not>
                        <equals arg1="${main.class}" arg2="" trim="true"/>
                    </not>
                </and>
            </condition>
            <condition property="manifest.available+main.class">
                <and>
                    <isset property="manifest.available"/>
                    <isset property="main.class"/>
                    <isfalse value="${platform.fat.jar}"/>
                    <not>
                        <equals arg1="${main.class}" arg2="" trim="true"/>
                    </not>
                </and>
            </condition>
            <condition property="application.version.invalid" value="true">
                <equals arg1="${deployment.number}" arg2="" trim="true"/>
            </condition>
            <fail if="application.version.invalid" message="Property deployment.number must not be empty and must contain version in format %d.%d.%d!"/>
            <condition property="sign.jar.trigger" value="true">
                <and>
                    <isset property="cdc-platform.trigger"/>
                    <istrue value="${sign.enabled}"/>
                </and>
            </condition>
        </target>
        <!--semc-init-->
        <target name="semc-pre-init" if="cdc-platform.trigger">
            <condition property="semc-platform.trigger">
                <equals arg1="semc" arg2="${platform.type}" casesensitive="false"/>
            </condition>
        </target>
        <target name="semc-init" depends="semc-pre-init" if="semc-platform.trigger">
            <condition property="semc.icon.invalid" value="true">
                <or>
                    <contains string="${semc.application.icon}" substring="$${"/>
                    <equals arg1="${semc.application.icon}" arg2="" trim="true"/>
                </or>
            </condition>
            <condition property="no.certificateorkey" value="true">
                <or>
                    <isset property="no.application.uid"/>
                    <equals arg1="${semc.certificate.path}" arg2="" trim="true"/>
                    <contains string="${semc.certificate.path}" substring="$${semc.certificate.path"/>
                    <equals arg1="${semc.private.key.path}" arg2="" trim="true"/>
                    <contains string="${semc.private.key.path}" substring="$${semc.private.key.path"/>
                </or>
            </condition>
            <property name="j9.dist" location="${build.dir}/j9/${semc.application.uid}.j9"/>
            <taskdef resource="org/netbeans/modules/j2me/cdc/project/defs.properties">
                <classpath>
                    <pathelement path="${libs.cdc-ant-utils.classpath}"/>
                </classpath>
            </taskdef>
            <taskdef resource="org/netbeans/modules/j2me/cdc/project/semc/defs.properties">
                <classpath>
                    <pathelement path="${libs.semc-ant-utils.classpath}"/>
                </classpath>
            </taskdef>
            <property name="deployment.dir" location="${dist.dir}"/>
            <patternset id="deployment.patternset">
                <include name="*.sis"/>
                <include name="*.SIS"/>
            </patternset>
        </target>
        <!--savaje-init-->
        <target name="savaje-pre-init" if="cdc-platform.trigger">
            <condition property="savaje-platform.trigger">
                <equals arg1="savaje" arg2="${platform.type}" casesensitive="false"/>
            </condition>
        </target>
        <target name="savaje-init" depends="savaje-pre-init" if="savaje-platform.trigger">
            <property name="savaje.application.uid" value="TBD"/>
            <condition property="savaje.bundle.base.invalid" value="true">
                <or>
                    <equals arg1="${savaje.bundle.base}" arg2="" trim="true"/>
                    <contains string="${savaje.bundle.base}" substring="$${savaje.bundle.base"/>
                </or>
            </condition>
            <condition property="savaje.unsupported.main" value="true">
                <or>
                    <equals arg1="${main.class.applet}" arg2="true"/>
                </or>
            </condition>
            <condition property="savaje.icon.invalid" value="true">
                <or>
                    <isset property="no.application.uid"/>
                    <contains string="${savaje.application.icon}" substring="$${"/>
                    <equals arg1="${savaje.application.icon}" arg2="" trim="true"/>
                </or>
            </condition>
            <property name="jnlp.dist" value="${build.dir}/jnlp/bundle.jnlp"/>
            <property name="deployment.dir" location="${dist.dir}"/>
            <patternset id="deployment.patternset">
                <include name="bundle.jnlp"/>
                <include name="bundle.policy"/>
                <include name="lib/*"/>
            </patternset>
        </target>
        <!--sjmc-init-->
        <target name="sjmc-pre-init" if="cdc-platform.trigger">
            <condition property="sjmc-platform.trigger">
                <equals arg1="sjmc" arg2="${platform.type}" casesensitive="false"/>
            </condition>
        </target>
        <target name="sjmc-init" depends="sjmc-pre-init" if="sjmc-platform.trigger"/>
        <!--ojec-init-->
        <target name="ojec-pre-init" if="cdc-platform.trigger">
            <condition property="ojec-platform.trigger">
                <equals arg1="ojec" arg2="${platform.type}" casesensitive="false"/>
            </condition>
        </target>
        <target name="ojec-init" depends="ojec-pre-init" if="ojec-platform.trigger"/>
        <!--cdc-hi-init-->
        <target name="cdc-hi-pre-init" if="cdc-platform.trigger">
            <condition property="cdc-hi-platform.trigger">
                <equals arg1="cdc-hi" arg2="${platform.type}" casesensitive="false"/>
            </condition>
        </target>
        <target name="cdc-hi-init" depends="cdc-hi-pre-init" if="cdc-hi-platform.trigger"/>
        <!--nokiaS80-init-->
        <target name="nokiaS80-pre-init" if="cdc-platform.trigger">
            <condition property="nokiaS80-platform.trigger">
                <equals arg1="nokiaS80" arg2="${platform.type}" casesensitive="false"/>
            </condition>
        </target>
        <target name="nokiaS80-init" depends="nokiaS80-pre-init" if="nokiaS80-platform.trigger">
            <property name="j9.dist" location="${build.dir}/j9/NOKIA.j9"/>
            <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
            <condition property="nokia.icon.invalid">
                <or>
                    <contains string="${nokiaS80.application.icon}" substring="$${"/>
                    <equals arg1="${nokiaS80.application.icon}" arg2="" trim="true"/>
                </or>
            </condition>
            <property name="deployment.dir" location="${dist.dir}"/>
            <patternset id="deployment.patternset">
                <include name="${dist.jar}"/>
            </patternset>
        </target>
        <!--init-->
        <target name="pre-init"/>
        <target name="post-init"/>
        <target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,semc-init,savaje-init,sjmc-init,ojec-init,cdc-hi-init,nokiaS80-init,post-init"/>
        <!--conditional clean-->
        <target name="conditional-clean-init">
            <uptodate property="no.clean.before.build" targetfile="${build.dir}/.timestamp">
                <srcfiles dir="nbproject">
                    <include name="project.properties"/>
                    <include name="build-impl.xml"/>
                </srcfiles>
            </uptodate>
        </target>
        <target name="conditional-clean" depends="init,conditional-clean-init" unless="no.clean.before.build" description="Clean project in case its meta information has changed.">
            <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
        </target>
        <!--deps-jar-->
        <target name="deps-jar" depends="conditional-clean" unless="no.deps"/>
        <!--preprocess-->
        <target name="pre-preprocess"/>
        <target name="do-preprocess" unless="no.preprocess">
            <fail unless="preprocessed.dir">Must set preprocessed.dir</fail>
            <property name="abilities" value=""/>
            <property name="debug.level" value="debug"/>
            <mkdir dir="${preprocessed.dir}"/>
            <echo message="ignore me" file="${build.dir}/.timestamp"/>
            <nb-prep destdir="${preprocessed.dir}" preprocessfor="${config.active.name},${abilities},DebugLevel=${debug.level}" encoding="${javac.encoding}">
                <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated}"/>
            </nb-prep>
            <copy todir="${preprocessed.dir}">
                <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
            </copy>
            <nb-overrideproperty name="buildsystem.baton" value="${preprocessed.dir}"/>
        </target>
        <target name="post-preprocess"/>
        <target name="preprocess" depends="deps-jar,pre-preprocess,do-preprocess,post-preprocess" description="Preprocess project sources."/>
        <!--compile-->
        <target name="pre-compile"/>
        <target name="do-compile">
            <fail unless="build.classes.dir">Must set build.classes.dir</fail>
            <mkdir dir="${build.classes.dir}"/>
            <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" destdir="${build.classes.dir}" srcdir="${buildsystem.baton}" bootclasspath="${platform.bootclasspath}" encoding="${javac.encoding}">
                <classpath>
                    <path path="${libs.classpath}"/>
                </classpath>
            </javac>
            <copy todir="${build.classes.dir}">
                <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
            </copy>
            <nb-overrideproperty name="buildsystem.baton" value="${build.classes.dir}"/>
        </target>
        <target name="extract-libs" description="Extracts all bundled libraries.">
            <mkdir dir="${build.classes.dir}"/>
            <nb-extract dir="${build.classes.dir}" excludeManifest="true" classpath="${libs.classpath}" excludeclasspath="${extra.classpath}"/>
        </target>
        <target name="post-compile"/>
        <target name="compile" depends="preprocess,pre-compile,extract-libs,do-compile,post-compile" description="Compile project classes."/>
        <!--compile-single-->
        <target name="pre-compile-single"/>
        <target name="do-compile-single">
            <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
            <mkdir dir="${build.classes.dir}"/>
            <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" srcdir="${buildsystem.baton}" destdir="${build.classes.dir}" bootclasspath="${platform.bootclasspath}" includes="${javac.includes}" encoding="${javac.encoding}">
                <classpath>
                    <path path="${libs.classpath}"/>
                </classpath>
            </javac>
        </target>
        <target name="post-compile-single"/>
        <target name="compile-single" depends="preprocess,pre-compile-single,do-compile-single,post-compile-single" description="Compile selected project classes."/>
        <!--proguard-->
        <target name="proguard-init" description="Up-to-date check before obfuscation.">
            <property name="obfuscation.level" value="0"/>
            <condition property="no.obfusc">
                <or>
                    <equals arg1="${obfuscation.level}" arg2="0"/>
                    <uptodate targetfile="${obfuscator.destjar}">
                        <srcfiles dir="${buildsystem.baton}"/>
                    </uptodate>
                </or>
            </condition>
            <uptodate property="obfuscation.up-to-date" targetfile="${obfuscator.destjar}">
                <srcfiles dir="${buildsystem.baton}"/>
            </uptodate>
        </target>
        <target name="skip-obfuscation" depends="proguard-init" if="obfuscation.up-to-date">
            <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
            <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
        </target>
        <target name="proguard" depends="skip-obfuscation" description="Obfuscate project classes." unless="no.obfusc">
            <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
            <fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
            <fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
            <property name="obfuscator.classpath" value=""/>
            <dirname file="${obfuscator.srcjar}" property="obfuscator.srcjar.dir"/>
            <dirname file="${obfuscator.destjar}" property="obfuscator.destjar.dir"/>
            <mkdir dir="${obfuscator.srcjar.dir}"/>
            <mkdir dir="${obfuscator.destjar.dir}"/>
            <jar jarfile="${obfuscator.srcjar}" basedir="${buildsystem.baton}"/>
            <property name="obfuscation.custom" value=""/>
            <nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/>
            <mkdir dir="${obfuscated.classes.dir}"/>
            <unjar src="${obfuscator.destjar}" dest="${obfuscated.classes.dir}"/>
            <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
        </target>
        <!--obfuscate-->
        <target name="pre-obfuscate"/>
        <target name="post-obfuscate"/>
        <target name="obfuscate" depends="compile,pre-obfuscate,proguard,post-obfuscate" description="Obfuscate project classes."/>
        <!--lwuit-build-->
        <import file="lwuit.xml" optional="true"/>
        <target name="-lwuit-check">
            <condition property="lwuit.allowed">
                <and>
                    <available file="nbproject/lwuit.xml"/>
                    <isset property="is.mesdk_lwuit"/>
                </and>
            </condition>
        </target>
        <target name="-pre-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/>
        <target name="-lwuit-build" depends="-lwuit-check" if="lwuit.allowed">
            <antcall target="lwuit_build"/>
        </target>
        <target name="-post-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/>
        <target name="lwuit-build" depends="-lwuit-check,-pre-lwuit-build, -lwuit-build, -post-lwuit-build" if="lwuit.allowed"/>
        <!--preverify-->
        <target name="pre-preverify"/>
        <target name="do-preverify" if="cldc-platform.trigger">
            <fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail>
            <mkdir dir="${preverify.sources.dir}"/>
            <copy todir="${preverify.sources.dir}">
                <fileset dir="${buildsystem.baton}" includes="**/*.class"/>
            </copy>
            <mkdir dir="${preverify.classes.dir}"/>
            <nb-preverify srcdir="${preverify.sources.dir}" destdir="${preverify.classes.dir}" classpath="${platform.bootclasspath}:${extra.classpath}" configuration="${platform.configuration}" platformhome="${platform.home}" platformtype="${platform.type}" commandline="${platform.preverifycommandline}"/>
            <copy todir="${preverify.classes.dir}">
                <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
            </copy>
            <nb-overrideproperty name="buildsystem.baton" value="${preverify.classes.dir}"/>
        </target>
        <target name="post-preverify"/>
        <target name="preverify" depends="obfuscate,lwuit-build,pre-preverify,do-preverify,post-preverify" description="Preverify project classes."/>
        <!--set-password-->
        <target name="set-password-init">
            <property name="sign.enabled" value="false"/>
            <condition property="skip-sign-keystore-password-input">
                <or>
                    <isfalse value="${sign.enabled}"/>
                    <and>
                        <isset property="sign.keystore"/>
                        <isset property="sign.keystore.password"/>
                        <not>
                            <equals arg1="${sign.keystore}" arg2="" trim="true"/>
                        </not>
                        <not>
                            <equals arg1="${sign.keystore.password}" arg2="" trim="true"/>
                        </not>
                    </and>
                </or>
            </condition>
            <condition property="skip-sign-alias-password-input">
                <or>
                    <isfalse value="${sign.enabled}"/>
                    <and>
                        <isset property="sign.keystore"/>
                        <isset property="sign.alias"/>
                        <isset property="sign.alias.password"/>
                        <not>
                            <equals arg1="${sign.keystore}" arg2="" trim="true"/>
                        </not>
                        <not>
                            <equals arg1="${sign.alias}" arg2="" trim="true"/>
                        </not>
                        <not>
                            <equals arg1="${sign.alias.password}" arg2="" trim="true"/>
                        </not>
                    </and>
                </or>
            </condition>
        </target>
        <target name="set-keystore-password" if="netbeans.home" unless="skip-sign-keystore-password-input">
            <nb-enter-password keystore="${sign.keystore}" passwordproperty="sign.keystore.password"/>
        </target>
        <target name="set-alias-password" if="netbeans.home" unless="skip-sign-alias-password-input">
            <nb-enter-password keystore="${sign.keystore}" keyalias="${sign.alias}" passwordproperty="sign.alias.password"/>
        </target>
        <target name="set-password" depends="set-password-init,set-keystore-password,set-alias-password"/>
        <!--create JAD-->
        <target name="add-configuration" unless="contains.manifest.configuration">
            <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
    </nb-output>
            <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
    </nb-output>
        </target>
        <target name="add-profile" unless="contains.manifest.profile">
            <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
    </nb-output>
            <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
    </nb-output>
        </target>
        <target name="create-jad" if="cldc-platform.trigger">
            <fail unless="dist.jad">Must set dist.jad</fail>
            <mkdir dir="${build.dir}"/>
            <dirname file="${dist.dir}/${dist.jad}" property="dist.jad.dir"/>
            <mkdir dir="${dist.jad.dir}"/>
            <condition property="evaluated.manifest.apipermissions" value="${manifest.apipermissions}">
                <not>
                    <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
                </not>
            </condition>
            <condition property="evaluated.manifest.pushregistry" value="${manifest.pushregistry}">
                <not>
                    <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
                </not>
            </condition>
            <condition property="contains.manifest.configuration">
                <contains substring="MicroEdition-Configuration: " string="${manifest.others}"/>
            </condition>
            <condition property="contains.manifest.profile">
                <contains substring="MicroEdition-Profile: " string="${manifest.others}"/>
            </condition>
            <property value="" name="evaluated.manifest.apipermissions"/>
            <property value="" name="evaluated.manifest.pushregistry"/>
            <property name="manifest.jad" value=""/>
            <property name="manifest.manifest" value=""/>
            <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</nb-output>
            <nb-output file="${manifest.build.file}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</nb-output>
            <antcall target="add-configuration" inheritall="true" inheritrefs="true"/>
            <antcall target="add-profile" inheritall="true" inheritrefs="true"/>
            <property name="manifest.available" value="true"/>
        </target>
        <!--do-extra-libs-->
        <target name="do-extra-libs" if="extra.classpath">
            <property name="dist.lib.dir" value="${dist.dir}/lib"/>
            <mkdir dir="${dist.lib.dir}"/>
            <copy todir="${dist.lib.dir}">
                <path path="${extra.classpath}"/>
                <flattenmapper/>
            </copy>
        </target>
        <!--nokiaS80-manifest-->
        <target name="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger">
            <fail message="Main class is not set!">
                <condition>
                    <equals arg1="${main.class}" arg2="" trim="true"/>
                </condition>
            </fail>
            <mkdir dir="${build.dir}/j9"/>
            <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
            <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
            <copy file="${manifest.file}" tofile="${manifest.build.file}" failonerror="false"/>
            <property name="manifest.available" value="true"/>
            <loadfile property="nokia.manifest.j9" srcFile="${j9.dist}"/>
        </target>
        <target name="nokiaS80-prepare-manifest" depends="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger" unless="nokia.icon.invalid">
            <pathconvert property="logo.icon.name" pathsep=" ">
                <path path="${nokiaS80.application.icon}"/>
                <chainedmapper>
                    <flattenmapper/>
                    <globmapper from="*" to="*"/>
                </chainedmapper>
        

    The error says class file is missing, you can try to clean and build.

  • Preverification failed with error code 255

    Hello,
    I am having some problems to run a simple Hello World MIDlet application on Ubuntu (2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64 GNU/Linux). I am using Netbeans 6 Beta 2 (with Mobility Pack 2.5.2 ).
    I am getting an error in the preverification process:
    Preverifying 1 file(s) into /home/brunogh/NetBeansProjects/MobileApplication3/build/preverified directory.
    /home/brunogh/NetBeansProjects/MobileApplication3/nbproject/build-impl.xml:424: Preverification failed with error code 255.
    I am not sure if it could be a WTK problem, Mobility Pack problem or anything else... I've googled and could not find anything with the error 255, just with the error 1... any ideas/suggestions?
    The whole output is below
    pre-init:
    pre-load-properties:
    exists.config.active:
    exists.netbeans.user:
    exists.user.properties.file:
    load-properties:
    exists.platform.active:
    exists.platform.configuration :
    exists.platform.profile:
    basic-init:
    cldc-pre-init:
    cldc-init:
    cdc-init:
    ricoh-pre-init:
    ricoh-init:
    semc-pre-init:
    semc-init:
    savaje-pre-init:
    savaje-init:
    nokiaS80-pre-init:
    nokiaS80-init:
    nsicom-pre-init:
    nsicom-init:
    post-init:
    init:
    conditional-clean-init:
    conditional-clean:
    pre-clean:
    clean-timestamp:
    clean-preprocessed:
    clean-classes:
    Deleting directory /home/brunogh/NetBeansProjects/MobileApplication3/build/compiled
    clean-obfuscated:
    clean-preverified:
    Deleting directory /home/brunogh/NetBeansProjects/MobileApplication3/build/preverifysrc
    Deleting directory /home/brunogh/NetBeansProjects/MobileApplication3/build/preverified
    clean-manifest:
    clean-jar:
    clean-jad:
    clean-javadoc:
    clean-j9:
    clean-ricoh:
    clean-semc:
    clean-savaje:
    post-clean:
    do-clean:
    deps-jar:
    pre-preprocess:
    do-preprocess:
    post-preprocess:
    preprocess:
    pre-compile:
    extract-libs:
    Created dir: /home/brunogh/NetBeansProjects/MobileApplication3/build/compiled
    do-compile:
    Compiling 1 source file to /home/brunogh/NetBeansProjects/MobileApplication3/build/compiled
    post-compile:
    compile:
    pre-obfuscate:
    proguard-init:
    proguard:
    Building jar: /home/brunogh/NetBeansProjects/MobileApplication3/build/before-obfuscation.jar
    ProGuard, version 4.0.1
    Reading program jar [home/brunogh/NetBeansProjects/MobileApplication3/build/before- obfuscation.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/wma20.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr082.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/j2me-xmlrpc.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/satsa- jcrmi.jar]
    Note: duplicate definition of library class [java.rmi.Remote]
    Note: duplicate definition of library class [java.rmi.RemoteException]
    Reading library jar [home/brunogh/WTK2.5.1/lib/satsa-apdu.jar]
    Note: duplicate definition of library class [ com.sun.satsa.acl.ACEntry]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACFile]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACLFileReader]
    Note: duplicate definition of library class [ com.sun.satsa.acl.ACLPermissions]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACList]
    Note: duplicate definition of library class [com.sun.satsa.acl.APDUPermissions]
    Note: duplicate definition of library class [ com.sun.satsa.acl.AccessControlManager]
    Note: duplicate definition of library class [com.sun.satsa.acl.JCRMIPermission]
    Note: duplicate definition of library class [com.sun.satsa.acl.JCRMIPermissions]
    Note: duplicate definition of library class [ com.sun.satsa.acl.PINAttributes]
    Note: duplicate definition of library class [com.sun.satsa.acl.PINData]
    Note: duplicate definition of library class [com.sun.satsa.acl.PINEntryDialog]
    Note: duplicate definition of library class [ java.lang.UnsupportedOperationException]
    Reading library jar [home/brunogh/WTK2.5.1/lib/satsa-crypto.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr179.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/satsa- pki.jar]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACEntry]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACFile]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACLFileReader ]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACLPermissions]
    Note: duplicate definition of library class [com.sun.satsa.acl.ACList]
    Note: duplicate definition of library class [com.sun.satsa.acl.APDUPermissions ]
    Note: duplicate definition of library class [com.sun.satsa.acl.AccessControlManager]
    Note: duplicate definition of library class [com.sun.satsa.acl.JCRMIPermission]
    Note: duplicate definition of library class [ com.sun.satsa.acl.JCRMIPermissions]
    Note: duplicate definition of library class [com.sun.satsa.acl.PINAttributes]
    Note: duplicate definition of library class [com.sun.satsa.acl.PINData]
    Note: duplicate definition of library class [ com.sun.satsa.acl.PINEntryDialog]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr75.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr180.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr238.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr229.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/j2me-ws.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr234.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr226.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr184.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/mmapi.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr239.jar]
    Note: duplicate definition of library class [ java.lang.UnsupportedOperationException]
    Reading library jar [home/brunogh/WTK2.5.1/lib/jsr211.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/cldcapi10.jar]
    Reading library jar [home/brunogh/WTK2.5.1/lib/midpapi10.jar]
    Note: duplicate definition of library class [com.sun.cldc.i18n.j2me.UTF_8_Reader]
    Note: there were 29 duplicate class definitions.
    Preparing output jar [home/brunogh/NetBeansProjects/MobileApplication3/build/obfuscated.jar]
    Copying resources from program jar [home/brunogh/NetBeansProjects/MobileApplication3/build/before-obfuscation.jar]
    Created dir: /home/brunogh/NetBeansProjects/MobileApplication3/build/obfuscated
    Expanding: /home/brunogh/NetBeansProjects/MobileApplication3/build/obfuscated.jar into /home/brunogh/NetBeansProjects/MobileApplication3/build/obfuscated
    post-obfuscate:
    obfuscate:
    pre-preverify:
    do-preverify:
    Created dir: /home/brunogh/NetBeansProjects/MobileApplication3/build/preverifysrc
    Copying 1 file to /home/brunogh/NetBeansProjects/MobileApplication3/build/preverifysrc
    Created dir: /home/brunogh/NetBeansProjects/MobileApplication3/build/preverified
    Preverifying 1 file(s) into /home/brunogh/NetBeansProjects/MobileApplication3/build/preverified directory.
    /home/brunogh/NetBeansProjects/MobileApplication3/nbproject/build- impl.xml:424: Preverification failed with error code 255.
    BUILD FAILED (total time: 5 seconds)
    Thanks,
    Bruno

    pre-init:
    pre-load-properties:
    exists.config.active:
    exists.netbeans.user:
    exists.user.properties.file:
    load-properties:
    exists.platform.active:
    exists.platform.configuration:
    exists.platform.profile:
    init:
    post-init:
    pre-preprocess:
    deps-jar:
    conditional-clean:
    pre-clean:
    do-clean:
    post-clean:
    preprocess:
    Created dir: C:\prakash\sip\build\preprocessed
    Pre-processing 2 file(s) into C:\prakash\sip\build\preprocessed directory.
    post-preprocess:
    extract-libs:
    Created dir: C:\prakash\sip\build\compiled
    pre-compile:
    compile:
    Compiling 2 source files to C:\prakash\sip\build\compiled
    Copying 1 file to C:\prakash\sip\build\compiled
    post-compile:
    obfuscate-check:
    pre-obfuscate:
    obfuscate:
    Building jar: C:\prakash\sip\build\before-obfuscation.jar
    Copying jar file (C:\prakash\sip\build\before-obfuscation.jar) to C:\prakash\sip\build\obfuscated.jar.
    Created dir: C:\prakash\sip\build\obfuscated
    Expanding: C:\prakash\sip\build\obfuscated.jar into C:\prakash\sip\build\obfuscated
    post-obfuscate:
    pre-preverify:
    preverify:
    Created dir: C:\prakash\sip\build\preverified
    Preverifying 1698 file(s) into C:\prakash\sip\build\preverified directory.
    Error preverifying class com.sun.midp.jadtool.AppDescriptor
    VERIFIER ERROR com/sun/midp/jadtool/AppDescriptor.storeKeyStore(Ljava/lang/String;[C)V:
    Cannot find class java/io/FileOutputStream
    C:\prakash\sip\nbproject\build-impl.xml:269: Preverification failed with error code 1.
    BUILD FAILED (total time: 1 minute 7 seconds)
    Question:
    how can i resolve this problem?
    can anyone help me? .........

  • Filtering Spam with JavaMail

    My spam filter, ChiaraMail, has come up against some spam which it doesn't know how to deal with. Specifically, I've been getting more and more spam whose content is in HTML and obfuscated with "<...>" tags. For example,
    M<foo>ake<bar>Mo<fasdf>ney<vcbvcx>Fas<rtew>t!
    The obfuscating stuff gets filtered out by HTML readers, and therefore the "message" gets displayed OK. Is there a way for JavaMail to filter it out as well? This message obfuscation technique seems to be the state of the art in spamming technology, so I need to be able to deal with it (I get over 500 pieces of spam per day, which is why I wrote ChiaraMail). Thanks, in advance.
    Bob

    One way could be to first separate out each word,and then discard all unwanted words if any. Then in the remaining set in each word get rid of the special characters and do the above check again.
    Whatever left is fairly clean. But this is just a trivial implementation. any body could get away by introducing an extra space within each letter !!!!
    Good luck.
    cheers
    Projyal

  • Error while using jump developer desktop

    Buildfile: J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\ant\build.xml
    JumpEngineInit:
    [echo] ============================================================================
    [echo] Starting Jump for HelloWorld [SonyEricsson J300 -> RIM Blackberry 8310]
    [echo] ============================================================================
    [jump-engine-init] Jump event has been logged
    [null] Copying 1 file to J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\packagingContext
    Time: 5.72s
    [delete] Deleting 1 files from J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\weaved-src
    [copy] Copying 1 file to J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\sourceContext
    [copy] Copying 2 files to J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\sourceContext
    ResourceJumplets:
    [jumplet-execute] Import Target Device Libraries (rev 7)
    [jumplet-execute] Connected to service at: http://services.tirajump.com/
    Overriding previous definition of reference to eclipse.ant.targetVector
    init:
    build:
    [echo] building 2FA03D635AE5EC98647CD9231118FBD10DD7FEB: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98647CD9231118FBD10DD7FEB\7\build.xml
    [Import Target Device Libraries] C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98647CD9231118FBD10DD7FEB\7\TargetLib
    [Import Target Device Libraries] C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins/com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs
    [Import Target Device Libraries] Executing Import Target Device Libraries
    [Import Target Device Libraries] Jumplet: [Import Target Device Libraries], Execution SUCCEEDED, Time: 0 seconds
    [jumplet-execute] Modify Icon (rev 0)
    Overriding previous definition of reference to eclipse.ant.targetVector
    init:
    build:
    [echo] building 658C57EA51966AD0728D0660118EBB1C648720F: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\658C57EA51966AD0728D0660118EBB1C648720F\0\build.xml
    [Modify Icon] Executing Modify Icon
    [Modify Icon] Interpolation in DB: bilinear
    [Modify Icon] Jumplet: [Modify Icon], Execution SUCCEEDED, Time: 0.02 seconds
    ResourceToSourceTransition:
    SourceJumplets:
    [jump-weaver-init] Initializing Jump Weaver port: 20080 timeout: 300
    [jump-weaver-init] adding to JumpPlatform.Plugin.classpath: C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\cldc11.zip
    [jump-weaver-init] adding to JumpPlatform.Plugin.classpath: C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\midpapi20.zip
    [jump-weaver-init] adding to JumpPlatform.Plugin.classpath: C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\mmapi.zip
    [jump-weaver-init] adding to JumpPlatform.Plugin.classpath: C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\wma.zip
    [jump-weaver-init] adding to JumpPlatform.Plugin.classpath: C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\jsr184.zip
    [jump-weaver-init] Connecting to weaver attempt 1
    [jump-weaver-init] Time: 3.38s
    [jumplet-execute] Nokia sound to MIDP 2.0 Implementation (rev 6)
    Overriding previous definition of reference to eclipse.ant.targetVector
    init:
    [mkdir] Created dir: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98429F61DA110B27B63578000\6\antbin
    build:
    [echo] building 2FA03D635AE5EC98429F61DA110B27B63578000: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98429F61DA110B27B63578000\6\build.xml
    [javac] Compiling 2 source files to C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98429F61DA110B27B63578000\6\antbin
    [jar] Building jar: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98429F61DA110B27B63578000\6\2FA03D635AE5EC98429F61DA110B27B63578000.jar
    [Nokia sound to MIDP 2.0 Implementation] Executing Nokia API using Midp 2 impl
    [Nokia sound to MIDP 2.0 Implementation] Jumplet: [Nokia sound to MIDP 2.0 Implementation], Execution SUCCEEDED, Time: 0.47 seconds
    [jumplet-execute] Nokia UI to MIDP 2.0 Implementation (rev 7)
    Overriding previous definition of reference to eclipse.ant.targetVector
    init:
    [mkdir] Created dir: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98569C1795112244638067B8A\7\antbin
    build:
    [echo] building 2FA03D635AE5EC98569C1795112244638067B8A: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98569C1795112244638067B8A\7\build.xml
    [javac] Compiling 2 source files to C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98569C1795112244638067B8A\7\antbin
    [jar] Building jar: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC98569C1795112244638067B8A\7\2FA03D635AE5EC98569C1795112244638067B8A.jar
    [Nokia UI to MIDP 2.0 Implementation] Executing Nokia UI to MIDP2.0 impl
    [Nokia UI to MIDP 2.0 Implementation] Jumplet: [Nokia UI to MIDP 2.0 Implementation], Execution SUCCEEDED, Time: 0.19 seconds
    [jumplet-execute] Key Mapping (rev 12)
    Overriding previous definition of reference to eclipse.ant.targetVector
    init:
    build:
    [echo] building 2FA03D635AE5EC9855560CB4110E06C1C647FF8: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC9855560CB4110E06C1C647FF8\12\build.xml
    [Key Mapping] Executing Key Mapping
    [Key Mapping] Could not map reference device: Key_EndCall
    [Key Mapping] Could not map reference device: Key_Send
    [Key Mapping] Could not map reference device: RightSoftKey
    [Key Mapping] Could not map reference device: LeftSoftKey
    [Key Mapping] Could not map reference device: Key_2
    [Key Mapping] Jumplet: [Key Mapping], Execution SUCCEEDED, Time: 1.45 seconds
    SourceToBytecodeTransition:
    [copy] Copying 12 files to J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\weaved-src
    Overriding previous definition of reference to JumpPlatform.app.compile.classpath
    [javac] Compiling 10 source files to J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\bytecodeContext
    BytecodeJumplets:
    BytecodeToPackagingTransition:
    [jump-package] **************************************************************
    [jump-package] * Antenna 0.9.15 initialized for project "Jump" *
    [jump-package] * Using Sun Wireless Toolkit 2.5 (CLDC-1.1; MIDP-2.0) *
    [jump-package] **************************************************************
    [jump-package] Building jar: J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\packagingContext\HelloWorld-RIM-Blackberry-8310.jar
    [jump-package] Updating JAD file J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\packagingContext\HelloWorld-RIM-Blackberry-8310.jad
    [jump-package] Removing Ant-Version from manifest
    [jump-package] Removing Created-By from manifest
    [jump-package] MIDlet-Jar-URL:HelloWorld-RIM-Blackberry-8310.jar
    [jump-package] MIDlet-Jar-Size:12986
    PackagingJumplets:
    [jumplet-execute] Obfuscation (rev 10)
    Overriding previous definition of reference to eclipse.ant.targetVector
    init:
    build:
    [echo] building 2FA03D635AE5EC981A3CAF81106FCB092B7FE3: C:\Documents and Settings\Administrator\.tirawireless\jump\jumplets-cache\2FA03D635AE5EC981A3CAF81106FCB092B7FE3\10\build.xml
    [Obfuscation] Proguard Obfuscator: proguard39.jar
    [Obfuscation] Executing Obfuscation
    [exec] ProGuard, version 3.9
    [exec] Reading program jar [J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\jump.context\packagingContext\HelloWorld-RIM-Blackberry-8310.jar]
    [exec] Reading library zip [C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\cldc11.zip]
    [exec] Reading library zip [C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\midpapi20.zip]
    [exec] Reading library zip [C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\mmapi.zip]
    [exec] Note: duplicate definition of library class [javax.microedition.media.TimeBase]
    [exec] Note: duplicate definition of library class [javax.microedition.media.protocol.DataSource]
    [exec] Note: duplicate definition of library class [javax.microedition.media.control.ToneControl]
    [exec] Note: duplicate definition of library class [javax.microedition.media.control.VolumeControl]
    [exec] Note: duplicate definition of library class [javax.microedition.media.Control]
    [exec] Note: duplicate definition of library class [javax.microedition.media.Controllable]
    [exec] Note: duplicate definition of library class [javax.microedition.media.Manager]
    [exec] Note: duplicate definition of library class [javax.microedition.media.MediaException]
    [exec] Note: duplicate definition of library class [javax.microedition.media.Player]
    [exec] Note: duplicate definition of library class [javax.microedition.media.PlayerListener]
    [exec] Reading library zip [C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\wma.zip]
    [exec] Reading library zip [C:\Program Files\Tira Wireless\Jump Developer Desktop\eclipse\plugins\com.tirawireless.jumpdesktop.platform.sdk_4.1.0.142\device_stubs\jsr184.zip]
    [exec] Note: there were 10 duplicate class definitions.
    [exec] Error: You have to specify '-keep' options for the shrinking step.
    [exec] Result: 1
    [Obfuscation] Jumplet: [Obfuscation] FAILED: Obfuscator could not create a new JAR
    [Obfuscation] com.tirawireless.jumpdesktop.platform.sdk.exceptions.JumpProcessException: Obfuscator could not create a new JAR
    [Obfuscation] at com.tirawireless.jumplets.obfuscators.AbstractObfuscator.cleanup(AbstractObfuscator.java:64)
    [Obfuscation] at com.tirawireless.jumplets.obfuscators.Proguard.cleanup(Proguard.java:107)
    [Obfuscation] at com.tirawireless.jumplets.Obfuscator.jumpletExecute(Obfuscator.java:155)
    [Obfuscation] at com.tirawireless.jumpdesktop.platform.core.ant.task.JumpletExecuteTask.executeJumplet(JumpletExecuteTask.java:452)
    [Obfuscation] at com.tirawireless.jumpdesktop.platform.core.ant.task.JumpletExecuteTask.execute(JumpletExecuteTask.java:276)
    [Obfuscation] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [Obfuscation] at org.apache.tools.ant.Task.perform(Task.java:364)
    [Obfuscation] at org.apache.tools.ant.Target.execute(Target.java:341)
    [Obfuscation] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [Obfuscation] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [Obfuscation] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [Obfuscation] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [Obfuscation] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    [Obfuscation] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [Obfuscation] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    [Obfuscation] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    [Obfuscation] cleanup executed
    [Obfuscation] Jumplet: [Obfuscation], Execution FAILED: Obfuscator could not create a new JAR, Time: 1.34 seconds
    BUILD FAILED
    J:\Porting_WorkSpace\HelloWorld_jump_0\SonyEricsson J300\_default\RIM Blackberry 8310\ant\build.xml:315: com.tirawireless.jumpdesktop.platform.sdk.exceptions.JumpProcessException: Obfuscator could not create a new JAR
    Total time: 18 seconds
    Plz help me to fix this error.....
    Thanks
    MRaj

    Dear Rosrio:
    I have found my default Report Server Name by
    http://host:port/reports/rwservlet/getserverinfo
    I replace the host name with my Machine Name from where I am executing the Web Application.
    I have used following coding to invoke report on web
    DECLARE
         report_id Report_Object;
    ReportServerJob VARCHAR2(100);
    vc_rep_status VARCHAR2(100);
         vjob_id VARCHAR2(100);
         repsvr varchar2(25) := 'rep_najam-abdali_ora10g';
    BEGIN
    report_id:= find_report_object('REPORT1');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,file);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESNAME,'rpout1.html');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,'HTMLCSS');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,repsvr);
    ReportServerJob:=run_report_object(report_id);
    vjob_id := substr(reportserverjob,length(repsvr)+2);
    vc_rep_status := REPORT_OBJECT_STATUS(ReportServerJob);
    WHILE vc_rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED', null)
    LOOP
    vc_rep_status:=REPORT_OBJECT_STATUS(ReportServerJob);
    END LOOP;
    IF vc_rep_status='FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'|| vjob_id ||'?server='||repsvr,'_blank');
    ELSE
    message ('Report failed with error message '|| vc_rep_status);
    END IF;
    END;
    I think it is very similar to your coding.
    After invoking the report I found the following value appeared on the Left Top side of every report.
    ;background:#000000"
    Does anybody have idea about it.
    Best Regards,
    Hassan

  • Error in using obstication

    hey guys;
    iam making a mobile class library everything goes smothly and iam using its jar file on my main mobile application (J2ME Polish Project)but when i turn on the obstication of the liberary project to the highest level i got this eroor:-
    pre-init:
    pre-load-properties:
    exists.config.active:
    exists.netbeans.user:
    exists.user.properties.file:
    load-properties:
    exists.platform.active:
    exists.platform.configuration:
    exists.platform.profile:
    basic-init:
    cldc-pre-init:
    cldc-init:
    cdc-init:
    ricoh-pre-init:
    ricoh-init:
    semc-pre-init:
    semc-init:
    savaje-pre-init:
    savaje-init:
    sjmc-pre-init:
    sjmc-init:
    nokiaS80-pre-init:
    nokiaS80-init:
    nsicom-pre-init:
    nsicom-init:
    bdj-init:
    post-init:
    init:
    conditional-clean-init:
    conditional-clean:
    pre-clean:
    clean-timestamp:
    Deleting: E:\MyWOrk\Polish Projects\ArabicLib\build\.timestamp
    clean-preprocessed:
    Deleting directory E:\MyWOrk\Polish Projects\ArabicLib\build\preprocessed
    clean-classes:
    Deleting directory E:\MyWOrk\Polish Projects\ArabicLib\build\compiled
    clean-obfuscated:
    clean-preverified:
    Deleting directory E:\MyWOrk\Polish Projects\ArabicLib\build\preverifysrc
    Deleting directory E:\MyWOrk\Polish Projects\ArabicLib\build\preverified
    clean-manifest:
    Deleting: E:\MyWOrk\Polish Projects\ArabicLib\build\manifest.mf
    clean-jar:
    Deleting: E:\MyWOrk\Polish Projects\ArabicLib\dist\ArabicLib.jar
    clean-jad:
    Deleting: E:\MyWOrk\Polish Projects\ArabicLib\dist\ArabicLib.jad
    clean-javadoc:
    clean-j9:
    clean-ricoh:
    clean-semc:
    clean-savaje:
    clean-sjmc:
    Deleting: E:\MyWOrk\Polish Projects\ArabicLib\convert159068032
    Deleting directory E:\MyWOrk\Polish Projects\ArabicLib\build
    Deleting directory E:\MyWOrk\Polish Projects\ArabicLib\dist
    post-clean:
    do-clean:
    clean:
    deps-jar:
    pre-preprocess:
    do-preprocess:
    Created dir: E:\MyWOrk\Polish Projects\ArabicLib\build\preprocessed
    Pre-processing 39 file(s) into E:\MyWOrk\Polish Projects\ArabicLib\build\preprocessed directory.
    post-preprocess:
    preprocess:
    pre-compile:
    extract-libs:
    Created dir: E:\MyWOrk\Polish Projects\ArabicLib\build\compiled
    do-compile:
    Compiling 39 source files to E:\MyWOrk\Polish Projects\ArabicLib\build\compiled
    post-compile:
    compile:
    pre-obfuscate:
    proguard-init:
    skip-obfuscation:
    proguard:
    Building jar: E:\MyWOrk\Polish Projects\ArabicLib\build\before-obfuscation.jar
    ProGuard, version 4.2
    Reading program jar [E:\MyWOrk\Polish Projects\ArabicLib\build\before-obfuscation.jar]
    Reading library jar [C:\WTK22\lib\mmapi.jar]
    Reading library jar [C:\WTK22\lib\jsr75.jar]
    Reading library jar [C:\WTK22\lib\jsr082.jar]
    Reading library jar [C:\WTK22\lib\jsr184.jar]
    Reading library jar [C:\WTK22\lib\j2me-ws.jar]
    Reading library jar [C:\WTK22\lib\wma20.jar]
    Reading library jar [C:\WTK22\lib\midpapi20.jar]
    Note: duplicate definition of library class [javax.microedition.media.Control]
    Note: duplicate definition of library class [javax.microedition.media.Controllable]
    Note: duplicate definition of library class [javax.microedition.media.Player]
    Note: duplicate definition of library class [javax.microedition.media.MediaException]
    Note: duplicate definition of library class [javax.microedition.media.PlayerListener]
    Note: duplicate definition of library class [javax.microedition.media.Manager]
    Note: duplicate definition of library class [javax.microedition.media.control.ToneControl]
    Note: duplicate definition of library class [javax.microedition.media.control.VolumeControl]
    Note: duplicate definition of library class [javax.microedition.media.protocol.DataSource]
    Reading library jar [C:\WTK22\lib\cldcapi11.jar]
    Note: there were 9 duplicate class definitions.
    Error: The output jar is empty. Did you specify the proper '-keep' options?
    E:\MyWOrk\Polish Projects\ArabicLib\nbproject\build-impl.xml:457: Obfuscation failed with error code 1.
    BUILD FAILED (total time: 17 seconds)does anybody here have any clue about that?

    Try asking the same in proguard and j2mepolish forum..
    Also, is this observation is for only one application or any other application you are building also would it depend on device you choose to build.
    Also try with the latest proguard jars (4.4)
    Regards,
    Raja Nagendra Kumar
    Edited by: rajanag on Jul 29, 2009 10:50 PM
    Edited by: rajanag on Jul 29, 2009 10:50 PM

  • Download MIDlet to a phone

    Hi all,
    I developed my J2ME application that will connect to a remote server using GPRS on the J2ME Wireless Toolkit.
    Can someone please give me some tips on how download the MIDlet onto a phone. Do I need to download both .JAD & .JAR files?
    How do I create the .JAR file using the toolkit?
    Its an MIDP1.0 application, which type of phone do people recommend I use?
    Any tips would be much appriciated!
    Thanks
    Glenman

    To make a jar file with the wireless tool kit
    Click on project and then click on package/create package. never forget that size is crucial so you should use an obfuscutator with it. If your jar file is above 64 KB , then use an obfuscator (retroguard, proguard, etc.).
    Normaly both Yourapplication.jar and Yourapplication.jad will be stored into
    the_path_to_wireless_tookit/apps/your_project/bin/
    You need both jar and jad file to be OTA compatible.
    the JAD file contains several meta-data (including an URL pointing to the JAR file: MIDLET-URL or something)
    To install your application on a mobile phone you need two things:
    - A java/wap enabled mobile phone
    - and a configured web server.
    for the web server your need to add two new MIME types:
    for JAD and JAR.
    You should find this information over the web, I don't have it here.
    Once you have proplerly configured your web server (if you didn't the jad file will be downloaded like a text file and nothing will happen). Simply use your wap browser and type the URL of the JAD file:
    http://www.myserver.com/applications/MyApplication.jad
    Your mobile phone should download and install your application.
    It always better to test first your application with the constructor SDK. There are some problems that could occur during the "make package" process. (mainly related to the JAR properpties, NOKIA for example is more touchy about this than sonyericsson phones). Don't expect a lot of feeback from your mobile phone,for any errors you will receive "INVALID file". SDK will give you more valuable logs.
    Hope this help
    Olivier

  • WTK 2.1 and Ant

    Hi,
    I wrote the following ant build-file to create an obfusticated (with
    proguard) jar-file:
    <project name="test_biginteger" default="compile" basedir="..">
    <property name="project" value="test_biginteger" />
    <property name="WTK.dir" value="C:\Programme\WTK21"/>
    <property name="MIDP.lib" value="${WTK.dir}\lib\midpapi20.jar" />
    <property name="CLDC.lib" value="${WTK.dir}\lib\cldcapi11.jar" />
    <!-- The following property is needed only for obufscate_proguard. -->
    <property name="proguard" value="c:\Programme\proguard\lib\proguard.jar"/>
    <path id="bootclasspath">
    <pathelement path="${MIDP.lib}"/>
    <pathelement path="${CLDC.lib}"/>
    </path>
    <path id="classpath">
    </path>
    <!-- INIT - execute any tasks required for the build -->
    <target name="init">
    <tstamp/>
    </target>
    <!-- Runs the application in the emulator. -->
    <target name="run">
    <exec executable="${midp}/bin/emulator">
    <arg line="-classpath build/bin/${project}.jar"/>
    <arg line="-Xdescriptor build/bin/${project}.jad"/>
    </exec>
    </target>
    <!-- Obufscates using ProGuard. -->
    <target name="obfuscate_proguard" depends="compile, copylib">
    <mkdir dir="build/proguard" />
    <jar basedir="build/classes" jarfile="build/proguard/${project}-input.jar"
    />
    <java fork="yes" classname="proguard.ProGuard" classpath="${proguard}">
    <arg line="-libraryjars ${MIDP.lib}" />
    <arg line="-injars build/proguard/${project}-input.jar" />
    <arg line="-outjar build/proguard/${project}-output.jar" />
    <arg line="-keep 'public class * extends javax.microedition.midlet.MIDlet'"
    />
    <arg line="-defaultpackage" />
    <arg line="-dontusemixedcaseclassnames" />
    </java>
    <mkdir dir="build/obfuscated" />
    <unjar src="build/proguard/${project}-output.jar" dest="build/obfuscated" />
    </target>
    <!-- COMPILE - convert the source into class files -->
    <target name="compile" depends="init">
    <mkdir dir="build/classes" />
    <javac destdir="build/classes" srcdir="src" target="1.1">
    <bootclasspath refid="bootclasspath"/>
    </javac>
    </target>
    <!-- Unjars the library APIs in preparation for obfuscation. -->
    <target name="copylib" depends="init">
    <!-- <unjar src="libs/midp_classes.zip" dest="build/classes" /> -->
    <unjar src="${MIDP.lib}" dest="build/classes" />
    <unjar src="${CLDC.lib}" dest="build/classes" />
    </target>
    </project>
    There is a problem in the unjar process. When ant wants to unjar the file
    "midpapi20.jar" then I get the following exception:
    "D:\Programmierung\studi\test_biginteger\build\build.xml:58:
    java.lang.RuntimeException: data starting at 112 is in unknown format"
    Do you have any idea for that error?
    Thanks a lot in advance,
    Sebastian

    You don't need to unjar midp.jar and cldc.jar. Their classes don't include in your midlet, so you have not need to obfuscate them.

Maybe you are looking for