Java 如何使用build.xml文件编译ResourceBundle类

Java 如何使用build.xml文件编译ResourceBundle类,java,java-me,resourcebundle,j2mepolish,Java,Java Me,Resourcebundle,J2mepolish,我已经开发了J2ME应用程序。 当我试图通过build.xml文件编译我的应用程序时,我得到以下错误 “D:\sakina\TTMF\u Project\TTMFMobileClient\src\ConfigurationUtil.java:3:找不到符号 [javac]符号:类ResourceBundle [javac]位置:包java.util [javac]导入java.util.ResourceBundle; [javac]^” 有人能告诉我是否需要在build.xml文件中添加任何内容

我已经开发了J2ME应用程序。 当我试图通过build.xml文件编译我的应用程序时,我得到以下错误 “D:\sakina\TTMF\u Project\TTMFMobileClient\src\ConfigurationUtil.java:3:找不到符号 [javac]符号:类ResourceBundle [javac]位置:包java.util [javac]导入java.util.ResourceBundle; [javac]^”

有人能告诉我是否需要在build.xml文件中添加任何内容吗


您需要在ConfigurationUtil.java中检查代码
在生成期间,此文件中发生编译。修复错误并重建它应该可以工作。

谢谢您的回答。但是ConfigurationUtil.java类没有问题,因为同一个文件在没有j2me的情况下也可以工作。我想我需要修改build.xml文件
<!-- 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>
public class ConfigurationUtil {
    private static ResourceBundle objResourceBundle = ResourceBundle.getBundle("ApplicationResources");
    public static String getConfigValue(String configName){ 
        String configValue = objResourceBundle.getString(configName);

        return configValue;
    }
}