2 Replies Latest reply: Feb 3, 2014 12:40 AM by gimbal2 RSS

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

192cad78-0538-4298-8244-66571291c70b Newbie
Currently Being Moderated

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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points