4

I am writing a Java Agent which uses parameterized collection types and enhanced-for loops. Domino Designer 8.5.3 then tells me to change the project's compliance level to 1.5 in a quick-fix action.

If I do that, the project rebuilds and nothing changes. Nothing happens if I go to the project's Java Compiler settings to set it manually, or change it in the workspace settings either. How can I get rid of this error?

Pablo
  • 652
  • 6
  • 21
  • Have you tried commenting out the offending code, saving, changing the setting, exiting out of everything (designer, notes client, admin client), restarting, opening the code and removing the comment marks? – Richard Schwartz Dec 14 '15 at 18:09
  • 1
    Thanks. I had already tried that. I just solved the problem, I'm just not sure what I did. It seems that the 1.6 JVM was not in the build path. After I added it and changed the project's compliance to 1.5 by the quick-fix action and the error is gone. What is strange is that I had tried changing the workspace's compliance and it did not solve it, so I'm not sure what happened. – Pablo Dec 14 '15 at 18:33

1 Answers1

2

There is an annoying bug in Domino Designer. The "Compiler Compliance Level" in File / Preferences will always show 1.5 after a client restart and has no affect at all on Java Agents.

To set the compliance level for an agent open the agent and open a java class. Open Menu Project / Properties -> Java Compiler. Set to "Enable Project special settings" and set "Compiler Compliance Level" to 1.6.

enter image description here

To view the compliance level for a agent open the agent view, click on a agent (don't open it) an look at Properties / Fields, the fields "$JavaCompilerSource" and "$JavaCompilerTarget" will show the information.

enter image description here

notes-jj
  • 1,437
  • 1
  • 20
  • 33