源級別我的JBoss EAP 6.2.2 JDK 7,我的服務器上運行,在我的web應用程序我有一個使用JDK7的鑽石運營商一個jspJboss的JSP問題<>運營商不允許低於1.7
Map<String, String> menuItems = new LinkedHashMap<>();
我得到訪問該JSP的錯誤:
org.apache.jasper.JasperException: JBWEB004062: Unable to compile class for JSP:
JBWEB004060: An error occurred at line: 5 in the jsp file: /WEB-INF/pagecomponents/menu.jsp
'<>' operator is not allowed for source level below 1.7
是否有JBoss使用默認的源代碼兼容,如果是有沒有辦法改變它?
是你在Eclipse中看到這個嗎? –
我在某處讀到用於編譯JSP的JBoss 7的默認JDK版本是1.5。假設這是正確的,JBoss 6.2.2不可能比這更高。所以你有可能需要在你的配置中設置一個目標JDK。 – radimpe
@radimpe我看到,通過jboss文檔檢查如何改變它。令人驚訝的是似乎沒有人遇到過這個問題 - 沒有得到谷歌的任何好結果:( – 6ton