<legend id='9hkOt'><style id='9hkOt'><dir id='9hkOt'><q id='9hkOt'></q></dir></style></legend>
    <bdo id='9hkOt'></bdo><ul id='9hkOt'></ul>
    1. <small id='9hkOt'></small><noframes id='9hkOt'>

      <i id='9hkOt'><tr id='9hkOt'><dt id='9hkOt'><q id='9hkOt'><span id='9hkOt'><b id='9hkOt'><form id='9hkOt'><ins id='9hkOt'></ins><ul id='9hkOt'></ul><sub id='9hkOt'></sub></form><legend id='9hkOt'></legend><bdo id='9hkOt'><pre id='9hkOt'><center id='9hkOt'></center></pre></bdo></b><th id='9hkOt'></th></span></q></dt></tr></i><div id='9hkOt'><tfoot id='9hkOt'></tfoot><dl id='9hkOt'><fieldset id='9hkOt'></fieldset></dl></div>
    2. <tfoot id='9hkOt'></tfoot>

        java注释中的私有字段

        时间:2023-09-28

        <legend id='OaqGH'><style id='OaqGH'><dir id='OaqGH'><q id='OaqGH'></q></dir></style></legend>

        <small id='OaqGH'></small><noframes id='OaqGH'>

        • <tfoot id='OaqGH'></tfoot>

            <tbody id='OaqGH'></tbody>

              <bdo id='OaqGH'></bdo><ul id='OaqGH'></ul>

                <i id='OaqGH'><tr id='OaqGH'><dt id='OaqGH'><q id='OaqGH'><span id='OaqGH'><b id='OaqGH'><form id='OaqGH'><ins id='OaqGH'></ins><ul id='OaqGH'></ul><sub id='OaqGH'></sub></form><legend id='OaqGH'></legend><bdo id='OaqGH'><pre id='OaqGH'><center id='OaqGH'></center></pre></bdo></b><th id='OaqGH'></th></span></q></dt></tr></i><div id='OaqGH'><tfoot id='OaqGH'></tfoot><dl id='OaqGH'><fieldset id='OaqGH'></fieldset></dl></div>

                1. 本文介绍了java注释中的私有字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  My jboss seam application compile in eclipse without error. When I try to compile manually I have had a error

                  STATE_QUERY has private access

                  @NamedQueries({
                      @NamedQuery(name = CurrentModuleState.FIND_MODULE_STATE,
                           query = CurrentModuleState.STATE_QUERY)
                  })
                  public class CurrentModuleState implements java.io.Serializable {
                          ...
                          private static final String STATE_QUERY = "...";
                  

                  ant:

                  <javac encoding="cp1251" srcdir="${src-dir}" destdir="${compile-dir}"
                              executable="${javac-path}"
                              compiler="javac1.6">
                      <classpath refid="lib.classpath" />
                      <classpath refid="jboss-lib.classpath" />
                  </javac>
                  

                  How I can compile that? p.s. sorry for my engish )

                  解决方案

                  It is an odd thing, But I would suppose it is because the field is private but is accessed using the class name in front. The compiler should realize it is referred from the same class, but it obviously doesn't.

                  So, change the private to protected (not elegant, but should work)

                  You can also try upgrading the JDK (and hence javac). Note that eclipse uses its own compiler (not javac)

                  这篇关于java注释中的私有字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将注释值设置为 Class<?> 时出错从一个常数, 下一篇:Struts 2 Convention Plugin 定义多个父包

                  相关文章

                  最新文章

                2. <i id='5PhIA'><tr id='5PhIA'><dt id='5PhIA'><q id='5PhIA'><span id='5PhIA'><b id='5PhIA'><form id='5PhIA'><ins id='5PhIA'></ins><ul id='5PhIA'></ul><sub id='5PhIA'></sub></form><legend id='5PhIA'></legend><bdo id='5PhIA'><pre id='5PhIA'><center id='5PhIA'></center></pre></bdo></b><th id='5PhIA'></th></span></q></dt></tr></i><div id='5PhIA'><tfoot id='5PhIA'></tfoot><dl id='5PhIA'><fieldset id='5PhIA'></fieldset></dl></div>
                  <tfoot id='5PhIA'></tfoot>

                      <bdo id='5PhIA'></bdo><ul id='5PhIA'></ul>

                    <small id='5PhIA'></small><noframes id='5PhIA'>

                      <legend id='5PhIA'><style id='5PhIA'><dir id='5PhIA'><q id='5PhIA'></q></dir></style></legend>