久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

    1. <small id='spcd9'></small><noframes id='spcd9'>

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

      1. 為什么javac在@Override注釋上失敗

        Why is javac failing on @Override annotation(為什么javac在@Override注釋上失敗)
      2. <tfoot id='fUVym'></tfoot>

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

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

            • <bdo id='fUVym'></bdo><ul id='fUVym'></ul>

                <legend id='fUVym'><style id='fUVym'><dir id='fUVym'><q id='fUVym'></q></dir></style></legend>
                    <tbody id='fUVym'></tbody>
                  本文介紹了為什么javac在@Override注釋上失敗的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當我實現(xiàn)接口的方法時,Eclipse 正在添加 @Override 注釋.Eclipse 似乎對此沒有任何問題.而我們來自 Cruise Control 的自動化構建過程似乎對此沒有任何問題.但是當我從命令行構建時,ant 運行 javac,我得到了這個錯誤:

                  Eclipse is adding @Override annotations when I implement methods of an interface. Eclipse seems to have no problem with this. And our automated build process from Cruise Control seems to have no problem with this. But when I build from the command-line, with ant running javac, I get this error:

                  [javac] C:pathprojectsrccomusMyClass.java:70: method does not override a method from its superclass
                  [javac]     @Override
                  [javac]      ^
                  [javac] 1 error
                  

                  Eclipse 在 Java 1.6 下運行.Cruise Control 正在運行 Java 1.5.無論我使用哪個版本的 Java,我的 ant 構建都會失敗.

                  Eclipse is running under Java 1.6. Cruise Control is running Java 1.5. My ant build fails regardless of which version of Java I use.

                  推薦答案

                  @Override 注釋規(guī)范在 Java 1.6 中發(fā)生了變化.在 Java 1.5 中,編譯器不允許在實現(xiàn)的接口方法上使用 @Override 注釋,但在 1.6 中卻允許.我找到的第一個搜索結果是 博客文章..沒有很好的文檔記錄,但它確實發(fā)生了變化.

                  The @Override annotation spec changed in Java 1.6. In Java 1.5, the compiler did not allow the @Override annotation on implemented interface methods, but in 1.6 it does. First search result I found is a blog post here.. It was not well documented, but it did change.

                  Eclipse 正在添加它,因為您的 Eclipse 設置為符合 1.6.您應該嘗試將您的構建和 Eclipse 環(huán)境保持在相同版本的 Java 上.我不清楚您指定 Cruise Control 是否正在運行 Java 5 是否使用單獨的 JDK6 進行編譯.

                  Eclipse is adding it because your Eclipse is set for 1.6 compliance. You should try to keep your build and eclipse environments on the same version of Java. It's unclear to me by your specifying Cruise Control is running Java 5 on whether or not it is compiling using a separate JDK6 or not.

                  與上面的1.5 vs 1.6 @Override注解規(guī)則分開,記住Eclipse有自己的編譯器實現(xiàn)(不是javac),偶爾會有不同的行為.每當某些東西在 Eclipse 中編譯,而不是在 Ant 或 Maven 中編譯時,您都需要找到一種方法讓兩個編譯器都滿意.

                  Separate from the above 1.5 vs 1.6 @Override annotation rules, remember that Eclipse has its own compiler implementation (not javac) and will occasionally have different behavior. Whenever something compiles in Eclipse, but not Ant or Maven, you will need to find a way to make both compilers happy.

                  這篇關于為什么javac在@Override注釋上失敗的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  quot;Char cannot be dereferencedquot; error(“Char 不能被取消引用錯誤)
                  Java Switch Statement - Is quot;orquot;/quot;andquot; possible?(Java Switch 語句 - 是“或/“和可能的?)
                  Java Replace Character At Specific Position Of String?(Java替換字符串特定位置的字符?)
                  What is the type of a ternary expression with int and char operands?(具有 int 和 char 操作數(shù)的三元表達式的類型是什么?)
                  Read a text file and store every single character occurrence(讀取文本文件并存儲出現(xiàn)的每個字符)
                  Why do I need to explicitly cast char primitives on byte and short?(為什么我需要在 byte 和 short 上顯式轉換 char 原語?)
                • <i id='2O8W1'><tr id='2O8W1'><dt id='2O8W1'><q id='2O8W1'><span id='2O8W1'><b id='2O8W1'><form id='2O8W1'><ins id='2O8W1'></ins><ul id='2O8W1'></ul><sub id='2O8W1'></sub></form><legend id='2O8W1'></legend><bdo id='2O8W1'><pre id='2O8W1'><center id='2O8W1'></center></pre></bdo></b><th id='2O8W1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2O8W1'><tfoot id='2O8W1'></tfoot><dl id='2O8W1'><fieldset id='2O8W1'></fieldset></dl></div>
                    <bdo id='2O8W1'></bdo><ul id='2O8W1'></ul>
                      <tbody id='2O8W1'></tbody>

                    <legend id='2O8W1'><style id='2O8W1'><dir id='2O8W1'><q id='2O8W1'></q></dir></style></legend>
                  • <tfoot id='2O8W1'></tfoot>

                    <small id='2O8W1'></small><noframes id='2O8W1'>

                            主站蜘蛛池模板: 婷婷久| 日本久久一区二区 | 欧美日韩亚洲天堂 | 免费在线观看黄 | 精品国产一区二区三区久久久蜜月 | 亚洲无人区一线二线三线 | 欧美综合久久 | 欧美日韩综合网 | 精品国产999久久久免费 | 精品国产一区二区在线观看 | 亚洲欧美天堂 | 狠狠干狠狠插 | 午夜在线免费观看 | 亚洲福利专区 | 国产视频一 | 色哟哟一区二区 | 午夜影院免费 | 国产午夜三级一区二区三 | 欧美一区二区三区在线播放 | 伊人精品 | 欧美黄色一级大片 | 一区二区免费视频 | 九九久久免费视频 | 国产一二区 | 一区二区三区日韩 | 真实的国产乱xxxx在线 | 91精品久久久久久久久 | 欧美影院一区 | 黄色免费毛片 | 国产精品一区二区av | 亚洲日本一区二区 | 视频爱爱免费视频爱爱太爽 | 国产黄色免费看 | 亚洲二区在线 | 国产视频在线播放 | 欧美成人精品欧美一级私黄 | 亚洲h片 | 成人午夜精品 | 亚洲永久免费视频 | 五月天久久| 狠狠干免费视频 |