Skip to main content

Glassfish 3.1.2.x and JDK 7

No replies
andreas_ernst
Offline
Joined: 2003-06-20
Points: 0

Hi,

i try to run Glassfish with Java 7 code, ie. switch with strings, but i get this error:

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6197: An error occurred at line: 4 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
strings in switch are not supported in -source 1.5
(use -source 7 or higher to enable strings in switch)

It is a NetBeans Maven basend web project, attached as zip. I tested this on different machines: Mac OS X 10.8.2, openSuse 12.2.

Glassfish JVM report on bundled Glassfish with NetBeans 7.2.1:

java.version = 1.7.0_10
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.7
java.vm.vendor = Oracle Corporation
java.vm.version = 23.6-b04
os.arch = x86_64
os.name = Mac OS X
os.version = 10.8.2

Glassfish JVM report on openSuse:

java.version = 1.7.0_10
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.7
java.vm.vendor = Oracle Corporation
java.vm.version = 23.6-b04
os.arch = amd64
os.name = Linux
os.version = 3.4.11-2.16-desktop

The pom file shows as source and target 1.7.

Any hints?

Thanks
Andreas

AttachmentSize
Test.zip87.9 KB