I want to obfuscate my source code using java obfuscators. I used proguard as it was the most suggested one. I configured my build.xml as follow
<target name="-post-jar">
<property name="proguard.jar.path" value="D:/pro/proguard.jar" />
<taskdef resource="proguard/ant/task.properties"
classpath="${proguard.jar.path}" />
<echo message="Obfuscating ${dist.jar}..."/>
<mkdir dir="${build.dir}/obfuscated"/>
<proguard printmapping="${build.dir}/obfuscated/${application.title}.map"
renamesourcefileattribute="SourceFile" ignorewarnings="true">
<injar file="${dist.jar}" />
<outjar file="${build.dir}/obfuscated/${application.title}.jar" />
<libraryjar path="${javac.classpath}" />
<libraryjar file="${java.home}/lib/rt.jar" />
<libraryjar file="${java.home}/lib/jce.jar" />
<keepattribute name="InnerClasses" />
<keepattribute name="SourceFile" />
<keepattribute name="LineNumberTable" />
<keepattribute name="Deprecated" />
<keepattribute name="*Annotation*" />
<keepattribute name="Signature" />
<keepattribute name="Exceptions" />
<keep access="public">
<field access="public protected" />
<method access="public protected" />
</keep>
<keepclassmembernames access="public">
<method type ="java.lang.Class"
name ="class$"
parameters="java.lang.String" />
<method type ="java.lang.Class"
name ="class$"
parameters="java.lang.String,boolean" />
</keepclassmembernames>
<keepclasseswithmembernames>
<method access="native" />
</keepclasseswithmembernames>
<keepclassmembers extends="java.lang.Enum">
<method access="public static"
type="**[]"
name="values"
parameters="" />
<method access="public static"
type="**"
name="valueOf"
parameters="java.lang.String" />
</keepclassmembers>
<keepnames implements="java.io.Serializable"/>
<keepclassmembers implements="java.io.Serializable">
<field access ="final"
type ="long"
name ="serialVersionUID" />
<field access ="!static !transient"
name ="**"/>
<field access ="!private"
name ="**"/>
<method access ="!private"
name ="**"/>
<method access ="private"
type ="void"
name ="writeObject"
parameters="java.io.ObjectOutputStream" />
<method access ="private"
type ="void"
name ="readObject"
parameters="java.io.ObjectOutputStream" />
<method type ="java.lang.Object"
name ="writeReplace"
parameters="" />
<method type ="java.lang.Object"
name ="readResolve"
parameters="" />
</keepclassmembers>
</proguard>
<copy file="${build.dir}/obfuscated/${application.title}.jar" tofile="${dist.jar}" overwrite="true"/>
<delete dir="${build.dir}/obfuscated"/>
</target>
But it results in following error :
java.lang.UnsupportedOperationException: Method must be overridden in [proguard.optimize.peephole.ClassMerger] if ever called
at proguard.classfile.util.SimplifiedVisitor.visitAnyClass(SimplifiedVisitor.java:47)
at proguard.classfile.util.SimplifiedVisitor.visitLibraryClass(SimplifiedVisitor.java:59)
at proguard.classfile.LibraryClass.accept(LibraryClass.java:301)
at proguard.classfile.ProgramClass.subclassesAccept(ProgramClass.java:433)
at proguard.optimize.peephole.VerticalClassMerger.visitProgramClass(VerticalClassMerger.java:83)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:125)
at proguard.optimize.Optimizer.execute(Optimizer.java:565)
at proguard.ProGuard.optimize(ProGuard.java:307)
at proguard.ProGuard.execute(ProGuard.java:116)
at proguard.ant.ProGuardTask.execute(ProGuardTask.java:316)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:285)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Instead of using the option -ignorewarnings, you should try solving the warnings that you get. You don't mention warnings in your question, but chances are that you have specified library classes (with -libraryjars) that depend on program classes (with -injars), which is not allowed. Cfr. ProGuard manual > Introduction.
Related
I'm at my wit's end with this.
I have a VERY simple installation descriptor for izpack for a two-package Java app on Windows. Everything works as intended EXCEPT for the shortcut creation. The shortcut panel doesn't seem right, for a start. The label "ShortcutPanel.regular.startup" is displayed instead of "run at startup" or anything of the sort in the startup execution checkbox.
After running the installer, the shortcuts simply aren't created. Here's what my install.xml looks like, it's pretty straightforward:
<izpack:installation version="5.0"
xmlns:izpack="http://izpack.org/schema/installation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">
<info>
<appname>application_name</appname>
<appversion>2.0.0</appversion>
<appsubpath>myapp</appsubpath>
<javaversion>1.8</javaversion>
</info>
<locale>
<langpack iso3="bra" />
</locale>
<resources>
<res src="shortcutSpec.xml" id="shortcutSpec.xml"/>
</resources>
<variables>
<variable name="TargetPanel.dir.windows" value="C:/Sistemas"/>
</variables>
<guiprefs width="800" height="600" resizable="no">
<laf name="substance">
<os family="windows" />
<os family="unix" />
<param name="variant" value="mist-silver" />
</laf>
<modifier key="useHeadingPanel" value="yes" />
</guiprefs>
<panels>
<panel classname="HelloPanel" />
<panel classname="DefaultTargetPanel" />
<panel classname="ShortcutPanel" />
<panel classname="InstallPanel" />
<panel classname="FinishPanel" />
</panels>
<natives>
<native type="izpack" name="ShellLink.dll">
<os family="windows"/>
</native>
<native type="izpack" name="ShellLink_x64.dll">
<os family="windows"/>
</native>
</natives>
<packs>
<pack name="Pack1" required="yes">
<description>one of the packs it's a jar</description>
<file src="lib/pack1.jar" targetdir="$INSTALL_PATH/pack1subdir"
override="true">
</file>
<file src="imagens/logo.ico" targetdir="$INSTALL_PATH/pack1subdir/imagens/"
override="true" />
<executable targetfile="lib/pack1.jar" type="jar"
stage="never"></executable>
</pack>
<pack name="Pack2" required="yes">
<description>the other pack</description>
<file src="lib/pack2.jar" targetdir="$INSTALL_PATH/pack2subdir"
override="true">
</file>
<file src="imagens/update.ico" targetdir="$INSTALL_PATH/pack2subdir/imagens/"
override="true" />
<executable targetfile="lib/pack2.jar" type="jar"
stage="never"></executable>
</pack>
</packs>
Then there's the shortcutSpec.xml. My pom moves it to my staging directory:
<izpack:shortcuts version="5.0"
xmlns:izpack="http://izpack.org/schema/shortcuts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">
<lateShortcutInstall />
<shortcut name="pack1" programGroup="false"
desktop="true" applications="false" startMenu="no" startup="true"
target="java -jar $INSTALL_PATH/pack1subdir/pack1.jar"
workingDirectory="$INSTALL_PATH/pack1subdir/">
<createForPack name="pack1" />
</shortcut>
<shortcut name="pack2" programGroup="false"
desktop="true" applications="false" startMenu="no" startup="true"
target="java -jar $INSTALL_PATH/pack2subdir/pack1.jar"
workingDirectory="$INSTALL_PATH/pack2subdir/">
<createForPack name="pack2" />
</shortcut>
The installer simply doesn't create any shortcuts anywhere. It finishes with no error messages no logs no stack traces no nothing.
Help.
I fixed that by going into the izPack/lib/izpack-core-5.0.9.jar and opening the /com/izforge/izpack/bin/langpacks/installer/ folder in it. Then editing the bra.xml file and adding the following line:
<str id="ShortcutPanel.regular.startup" txt="Iniciar com o Windows"/>
Then save and update the file in the jar and rebuild your instalation.
i've had edited my ANT build process. Here is my working list:
create a copy of the src folder and a selfwritten AntTask Obfuscated all Strings
ANT creates an JAR with <jar>
the JAR will be Obfuscated by ProGuard
An additional file will must be copied to the JAR
JAR will be signed
The bodled step is my Question. How i can copy a single file to the root directory of the JAR. I must make this step here! Before or after won't work: Before: ProGuard will be try to obfuscate this file and gives Exceptions. After cant work, the file must be signed.
Anyone have an smart idea?
Here a minified version of my ANT build script:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<project basedir="." default="default" name="DEMO">
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.7" />
<property name="source" value="1.7" />
<!-- Applet Informationen -->
<property name="version" value="1.0.0" />
<!-- Start Build process -->
<target name="default">
<echo message="Copy source" />
<delete dir="builds/temp/" />
<mkdir dir="builds/temp/" />
<copydir src="src" dest="builds/temp/" />
<echo message="Obfuscate Strings" />
<taskdef resource="task.properties" classpath="libs/MyStringHelper.jar" />
<mystringhelper dir="builds/temp/" name="_X.class" decoder="MyClass.myMethod" imports="import test.MyClass;" />
<javac srcdir="builds/temp/" destdir="bin" />
<sleep seconds="1" />
<echo message="Create JAR Archive with Version ${version}" />
<jar destfile="builds/${name}${version}.jar" basedir="bin">
<manifest>
<attribute name="Application-Name" value="${name}" />
<attribute name="Application-Library-Allowable-Codebase" value="*.domain.com localhost" />
<attribute name="Caller-Allowable-Codebase" value="*.domain.com localhost" />
<attribute name="Codebase" value="*.domain.com localhost" />
<attribute name="Permissions" value="all-permissions" />
<attribute name="Author" value="Adrian Preuss" />
<attribute name="Main-Class" value="main.Run" />
</manifest>
</jar>
<echo message="Obfuscate the Archive" />
<taskdef resource="proguard/ant/task.properties" classpath="libs/proguard.jar" />
<proguard printmapping="proguard.map" overloadaggressively="off" repackageclasses="" renamesourcefileattribute="SourceFile">
<injar file="builds/${name}${version}.jar" />
<outjar file="builds/__${name}${version}.jar" />
<libraryjar file="${java.home}/lib/rt.jar" />
<libraryjar file="libs/ant.jar" />
<libraryjar file="libs/gradle-plugins-1.3.jar" />
<libraryjar file="libs/gradle-base-services-1.3.jar" />
<libraryjar file="libs/gradle-core-1.3.jar" />
<libraryjar file="libs/groovy-all-1.8.6.jar" />
<libraryjar file="libs/kenv.zip" />
<keeppackagename name="main" />
<keep access="public" name="main.Run">
<method access="public" type="void" name="changeLanguage" parameters="java.lang.String" />
</keep>
</proguard>
<delete file="builds/${name}${version}.jar" failonerror="false" />
<move file="builds/__${name}${version}.jar" tofile="builds/${name}${version}.jar" />
<!--
##
## ADD the File "builds/temp/_XA.class" to the JAR
##
## Info: the _XA.class is'nt an Java-Class file!
-->
<echo message="Roll up the code signing" />
<signjar jar="builds/${name}${version}.jar" alias="${name}" keystore="${name}.keystore" storepass="${password}" preservelastmodified="true" />
<echo message="Verify code signing" />
<verifyjar jar="builds/${name}${version}.jar" alias="${name}" storepass="${password}"/>
<echo message="Copy applet to local environment" />
<copy file="builds/${name}${version}.jar" tofile="C:/devsrv/htdocs/${name}${version}.jar" failonerror="false" />
<echo message="Cleanup,..." />
<!-- .... -->
</target>
</project>
This is a part from my ant build file including all xml, jpg, gif and png:
<!-- ============================================================== -->
<!-- Build application -->
<!-- ============================================================== -->
<target name="build" depends="make-bin-dir" description="Build application">
<javac srcdir="${src.dir}" destdir="${bin.dir}" debug="on" classpathref="javac.classpath" />
<copy todir="${bin.dir}">
<fileset dir="${src.dir}">
<include name="**/*.xml" />
<include name="**/*.jpg" />
<include name="**/*.gif" />
<include name="**/*.png" />
</fileset>
</copy>
</target>
To only include one file just put the full name in include name= "fullnamehere" />
Sorry...haven't seen your part to add...
Try it like this:
include name= "builds/temp/_XA.class" />
Since a Jar is really a Zip file, you could unzip the jar to a temp directory after proguard does its thing, add the _XA.class file where you want in in that temp dir, and re-create the jar file before signing.
My data-config.xml is as follows and I have kept in the the Conf folder along with the solrconfig.xml :-
<dataConfig>
<dataSource name="Sample" driver="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/Sample" user="postgres" password="P#ssword">
<document name="oneDocs">
<entity dataSource="Sample" name="entity1" query="select FirstName from Employee">
<field column="EmpId" name="EmpId" />
<field column="FirstName" name="FirstName" />
<field column="LastName" name="LastName" />
</entity>
</document>
</dataSource>
</dataConfig>
And my solrconfig.xml is as follows :-
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</requestHandler>
I have also tried to add the libraries in the following ways :-
<lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
<lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
<lib dir="../../../contrib/dataimporthandler/lib/" regex=".*\.jar" />
<lib dir="../../dist/" regex="solr-dataimporthandler-\d.*\.jar" />
<lib dir="../../dist/" regex="postgresql-9.2-1002.jdbc3-\d.*\.jar" />
<lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
<!-- If a 'dir' option (with or without a regex) is used and nothing
is found that matches, it will be ignored
-->
<lib dir="/total/crap/dir/ignored" />
I am getting the same error constantly :-
org.apache.solr.handler.dataimport.DataImportHandlerException: Data Config problem: DataImportHandler configuration file must have one <document> node.
at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:226)
at org.apache.solr.handler.dataimport.DataImporter.maybeReloadConfiguration(DataImporter.java:124)
at org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:168)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:365)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: DataImportHandler configuration file must have one <document> node.
at org.apache.solr.handler.dataimport.DataImporter.readFromXml(DataImporter.java:250)
at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:223)
... 32 more
Please help to resolve this.This is eating away most of the time. Thanks
NOTE: I am using Postgres and Apache Tomcat 7 and Java 7 .
Your data-config.xml is flawed. You have wrapped the document elment into the datasource element. Both need to be on the same level as direct child of the dataConfig element.
This is why the exception you posted states:
Data Config problem: DataImportHandler configuration file must have
one node.
The XML parser does not find the document element as child node of dataConfig.
Try it like this:
<dataConfig>
<dataSource name="Sample" driver="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/Sample" user="postgres" password="P#ssword" />
<document name="oneDocs">
<entity dataSource="Sample" name="entity1" query="select FirstName from Employee">
<field column="EmpId" name="EmpId" />
<field column="FirstName" name="FirstName" />
<field column="LastName" name="LastName" />
</entity>
</document>
</dataConfig>
In your data-config.xml the document element should be a sibling to the dataSource element, not a child.
ie it should look like this;
<dataConfig>
<dataSource>
..
</dataSource>
<document>
..
</document>
</dataConfig>
I have a webapp to be ran on Tomcat6/JbossAS 5 and, for versioning purposes, I have several AND targets that will perform a set of operations to define a constant with version number and build datetime.
The targets perform the following:
Delete the Release.java
Copy the Release.template to Release.java with the versioning info properly set as a constant (public static final String)
The thing is that, the constant references are replaced on the code before compilation. For instance, where I have
log.debug("Release: " + Release.info);
I can see, using java decompiler, the following (let's assume that "TO_BE_DEFINED" is the initial value for Relase.info):
log.debug("Release: TO_BE_DEFINED");
The targets are the following:
<target name="build-config" >
<!-- config -->
<property name="project.name" value="MY PROJECT" />
<property name="release.prefix" value="MPROJECT" />
<property name="release.num" value="1.0" />
<property name="release.info.file.path" value="org/my/project/Release" />
<tstamp>
<format property="release.date" pattern="yyyy-MM-dd HH:mm:ss z" />
</tstamp>
<!-- end config -->
<property name="release.version" value="${release.prefix}-${release.num}" />
<property name="release.info" value="${release.version} ${release.date}" />
</target>
<target name="build-replace">
<filter token="release.info" value="${release.version} ${release.date}" />
<delete file="${src.dir}/${release.info.file.path}.java" />
<copy file="${src.dir}/${release.info.file.path}.template" tofile="${src.dir}/${release.info.file.path}.java" filtering="true" />
</target>
<target name="build-myproj-1.0.jar" depends="init,buil-config,build-replace,compile">
<mkdir dir="${dist.dir}"/>
<jar compress="true" jarfile="${dist.dir}/MPROJECT-1.0.jar">
<fileset dir="${build.classes.dir}"
excludes="META-INF/*.*, WEB-INF/classes/*.xml"
includes="**/*.class"
/>
<manifest>
<section name="${project.name}">
<attribute name="Release-Version" value="${release.version}" />
<attribute name="Release-Date" value="${release.date}" />
</section>
</manifest>
</jar>
</target>
and my class is defined as
public abstract class Release {
/** Release info */
public static final String INFO = "TO_BE_DEFINED";
}
I understand that this may be a little bit confusing and if I'm missing some information please feel free to ask
Compile-time constants are replaced in client code when the client code is compiled.
To get the client code to pick up the new value of the constant, either recompile everything, replace the field with a getter, or use one of the strategies from this question
I have developed J2ME application.
When I try to compile my application via build.xml file I get below error
"D:\sakina\TTMF_Project\TTMFMobileClient\src\ConfigurationUtil.java:3: cannot find symbol
[javac] symbol : class ResourceBundle
[javac] location: package java.util
[javac] import java.util.ResourceBundle;
[javac] ^"
Can anyone tell me if I have to add anything in my build.xml file
<!-- define the installation folder of J2ME Polish -->
<property name="polish.home" location="C:\Program Files\J2ME-Polish" />
<!-- define the installation folder of the WTK -->
<property name="wtk.home" location="C:\WTK2.5.2_01" />
<property name="device" value="Generic/midp2cldc11" />
<property name="devices" value="${device},Generic/AnyMsaPhone,Nokia/Series40E3,Nokia/Series60E3,Sony-Ericsson/JavaPlatform7,Sony-Ericsson/JavaPlatform8"/>
<!-- define the J2ME Polish task, classpath on one line please -->
<property name="polish.client.source" value="${polish.home}/j2mepolish-src/j2me/src/" />
<taskdef
name="j2mepolish"
classname="de.enough.polish.ant.PolishTask"
classpath="${polish.home}/lib/enough-j2mepolish-build.jar:${polish.home}/lib/jdom.jar" />
<!-- start the build with J2ME Polish -->
<target name="j2mepolish" depends="init">
<j2mepolish>
<info license="GPL" name="TTMFMobile" version="1.0.0" jarname="TTMFMobile.jar" deletenotify="Do you really want to exit?" />
<deviceRequirements>
<requirement name="Identifier" value="${device}" />
</deviceRequirements>
<build usePolishGui="true" fullscreen = "yes">
<midlets>
<midlet name="TMF" class="TTMFMobile" />
</midlets>
<libraries>
<!--<library file="${polish.home}/import/BlackBerry-5.0.0.jar" />-->
<library file="${polish.home}/import/json-1.0.jar" />
</libraries>
<variables includeAntProperties="true" >
<variable name="polish.TextField.showInputInfo" value="false"/>
<variable name="polish.TextField.useDirectInput" value="false" />
<variable name="polish.TextField.suppressDeleteCommands" value="false"/>
<variable name="polish.TextField.suppressClearCommands" value="true"/>
</variables>
<obfuscator name="ProGuard" unless="test or polish.blackberry" />
<resources dir="${resource.dir}" defaultexcludes="yes" excludes="readme.txt">
</resources>
<jad>
<attribute name="MIDlet-Icon" value=""/>
</jad>
</build>
<emulator />
</j2mepolish>
</target>
<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target>
<target name="init">
<property name="resource.dir" value="res" />
<property name="path.deploy" value="deployed"/>
</target>
ConfigurationUtil.java file::
public class ConfigurationUtil {
private static ResourceBundle objResourceBundle = ResourceBundle.getBundle("ApplicationResources");
public static String getConfigValue(String configName){
String configValue = objResourceBundle.getString(configName);
return configValue;
}
}
You need to check your code in ConfigurationUtil.java
There is a compilation occuring in this file during the build . Fix the error and rebuild it should work .