Java-Version of WAR product [message #929099] |
Mon, 01 October 2012 08:10 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
S. Schulz![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=s.schulz%40qualitype.de) Messages: 72 Registered: September 2011 |
Member |
|
|
Hi everyone!
I've got a problem concerning the creation of a WAR. I created it using a warproduct-file, but when I deploy it, I get the following message:
java.lang.Error: Unresolved compilation problem:
'<>' operator is not allowed for source level below 1.7
I took a look at the class-file with the error, and instead of compiled code it just contains the stack trace of above exception. Then I checked the plug-in in question: Both the build path and the manifest state it's a Java 7 project.
So my question is: Why would the WAR product export wizard assume the project to be anything other than a Java 7 project? How do I change it? And is there a way to tell the export wizard to just show an error message and stop exporting when a error like this happens, instead of ignoring it?
Thanks in advance,
S. Schulz
|
|
|
Re: Java-Version of WAR product [message #931521 is a reply to message #929099] |
Wed, 03 October 2012 09:26 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Ivan Furnadjiev![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ivan%40eclipsesource.com) Messages: 2429 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi,
check your project properties - "Java Compiler" settings. What are your
"JDK Compliance" settings?
Best,
Ivan
On 10/1/2012 11:10 AM, S. Schulz wrote:
> Hi everyone!
>
> I've got a problem concerning the creation of a WAR. I created it
> using a warproduct-file, but when I deploy it, I get the following
> message:
>
> java.lang.Error: Unresolved compilation problem: '<>' operator is
> not allowed for source level below 1.7
>
> I took a look at the class-file with the error, and instead of
> compiled code it just contains the stack trace of above exception.
> Then I checked the plug-in in question: Both the build path and the
> manifest state it's a Java 7 project.
> So my question is: Why would the WAR product export wizard assume the
> project to be anything other than a Java 7 project? How do I change
> it? And is there a way to tell the export wizard to just show an error
> message and stop exporting when a error like this happens, instead of
> ignoring it?
>
> Thanks in advance,
>
> S. Schulz
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
|
Re: Java-Version of WAR product [message #934125 is a reply to message #933664] |
Fri, 05 October 2012 17:26 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
I verified that PDE and the WAR Product Tooling are able to build plugins using Java 7 source.
I think you are probably missing the OSGi Execution Environment. Open the plugin's manifest editor and verify that JavaSE-1.7 is listed under Execution Environments like this:
![index.php/fa/11760/0/](index.php/fa/11760/0/)
With JavaSE-1.7 listed there it was able to build properly, but when I removed it the build failed with the same error you described.
Hope that helps,
Cole
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03930 seconds