Skip to Main Content

Syntax error: annotations are only available if source level is 5.0

1979252Jan 31 2014 — edited Feb 3 2014

In eclipse, I am trying a hello world JMS tutorial.

In the code below, it doesn't like the @ sign for some reason... And I don't know how to make it happy....

It give this error:

Syntax error: annotations are only available if source level is 5.0

--------------code------------

public class MessageSender {

   @Resource(mappedName = "jms/GlassFishBookConnectionFactory")

   private static ConnectionFactory connectionFactory;

----------------------------------

Here is my path if that helps.

Path=C:\oracle\product\10.2.0\client_1\bin;C:\Program Files (x86)\Java\jre8\bin;c:\glassfish4\glassfish\bin;C:\Program Files (x86)\Java\jdk1.8.0\bin

Thanks for any leads!

Jim

Comments
Post Details
Added on Jan 31 2014
2 comments
1,535 views