powered by Jive Software

Help on using eclipse to rebuild JM source code

Following instructions in ryang’'s post “Guide To Hacking Jive Messenger”, I make JM source code 2.1.5 fit in eclipse finally. However I get lots of syntax error messages. For example, in the package of org.jivesoftware.admin, file AdminConsole.java,

eclipse shows syntax error on the line 39:

private static Map<String,Element> overrideModels;

This kind of error messages are almost everywhere.

I don’'t think I am newbie to Java and eclipse, but this is really out of my knowledge. Please help

Hi chenhao,

Did you configure the Messenger project in Eclipse to use the 5.0 compiler compliance level (Project -> Properties -> Java Compiler)?

Hope that helps,

Ryan

At the location of Project -> Properties -> Java Compiler, it uses workspace settings; so I go to Window->preference->java->compiler->compliance and classfiles, which shows that Compiler compliance level: 1.4. I don’'t find your “5.0 compiler compliance level”. The only installed JRE on my laptop is jre1.5.0.

Hey chenhao,

You will need to use JDK 1.5.0 for compiling JM source code. JRE does not include a compiler. Follow url=http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk- 1.5.0_04-oth-JPR&SiteId=JSC&TransactionId=noregthis link[/url] to download the latest JDK

Regards,

– Gato

Sorry, my previous post may cause confusion. I know I need JDK 1.5.0 to compile JM source code, I promise

When I mention “the only installed JRE”, I mean it’'s a choice in eclipse preference dialog. In that dialog, I tick jdk 1.5.0_04 (the other one is jre 1.5.0_04).

What I don’'t understand is that eclipse shows syntax error messages on lines like

private List getTypeMap() throws SQLException {

return connection.getTypeMap();

} //in AbstractConnection.java

great! I’'ve got through the problem. The reason is my eclipse was 3.0.2. After I upgrade it to 3.1 (released today!), the problem sovled.

Thank you ryang and dombiak_gaston

Cheers,

chenhao

Oops, I thought that you were already using Eclispe 3.1. Eclipse started to support Java 1.5 from the 3.1 release. Let us know if you need further help configuring or running the server.

Regards,

– Gato

Oops, that was my fault too, I should have asked which version of Eclipse you were using.

Good to hear you managed to get everything working.

~Ryan