Trouble building

I have trouble building plugins, everything works fine if I try ant jar, but if I try ant plugins I get these error messages

C:\Documents and Settings\Username\Desktop\jive_messenger_src\src\plugins\broadcast\src\java\org \jivesoftware\messenger\plugin\BroadcastPlugin.java:165: cannot find symbol

symbol : method getAdmins()

location: class org.jivesoftware.messenger.group.Group

group.getAdmins().contains(fromNode) ||

^

C:\Documents and Settings\Username\Desktop\jive_messenger_src\src\plugins\broadcast\src\java\org \jivesoftware\messenger\plugin\BroadcastPlugin.java:168: cannot find symbol

symbol : method getMembers()

location: class org.jivesoftware.messenger.group.Group

for (String user : group.getMembers()) {

^

2 errors

I also have trouble running the server. I am running

java version “1.5.0_05”

Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)

Java HotSpot™ Client VM (build 1.5.0_05-b05, mixed mode, sharing)

I get these error messages when I try to run messenger.bat:

Exception in thread “main” java.lang.Error: Unresolved compilation problems: The type Map is not generic; it cannot be parameterized with arguments Syntax error, parameterized types are only available if source level is 5.0 modules cannot be resolved or is not a field

Syntax error, ‘‘for each’’ statements are only available if source level is 5.0 modules cannot be resolved modules cannot be resolved or is not a field

Syntax error, ‘‘for each’’ statements are only available if source level is 5.0 modules cannot be resolved Type mismatch: cannot convert from int to Object modules cannot be resolved Syntax error, ‘‘for each’’ statements are only available if source level is 5.0 modules cannot be resolved

For the last part of your problem: Could it be that although you have Java 1.5 installed, you’‘re running JM using another version? (you might have two versions installed, for example). What’'s the output of ‘‘java -version’’?

If you’‘re using an IDE, you might need to enable Java 1.5 support. In Eclipse, you’'d need one of the following:

  • Add java5 to the installed jre’s (Window > Preferences > Java > Installed JRE’s)

  • Set the compiler compliance level to 5.0 (Window > Preferences > Java > Compiler)

In Netbeans, you can use (Tools -> Java Platform Manager) to check your default platform.

Thanks Guus, your suggestion of enabling 1.5 in eclipse solved all my problems

It works fine now as long as I run the server with java -jar startup.jar, I can’'t run messenger.bat because the -server flag causes the hotspot virtual machine to crash with an unexpected internal error for some reason.