This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JForum and the fly likes Import Google JForum2 source to Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Import Google JForum2 source to Eclipse" Watch "Import Google JForum2 source to Eclipse" New topic

Import Google JForum2 source to Eclipse

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
Since JForum3 is a major upgrade, a bugfix (and minor upgrade) of JForum has been posted in a Google-based svn repository,

The downloads, for several releases, have only been been binary distributions, that is to say, JForum code has been compiled to a .jar,

appBase > WEB-INF > jforum.x.x.x.jar

though users are free to build around the webApp structure.

I've found I could get a long way with this binary download. But for a couple of items, I would have been more than happy with binary and, in other circumstances, it would be all I needed. But what if I want to go for source? What do I have to do?

The svn download of trunk displays a structure I do not recognise in in the binary. It has a .war inside a .war. Also, it has a .pom file, so builds using Maven.

I'll leave others to explain, if they wish, why the nested structure, and what might be done with Maven...?

There is a double issue here, because the aim of this post is to import JForum into Eclipse. Maybe something can be done with the source code's Maven controls? But the best way I've found to get a binary JForum into Eclipse is to generate a .war then wholesale import. That will not work with this source code. Here's what I did...

Download both a binary and a source version of a chosen svn tag

Use the published site download.

check tags,
svn list

svn co

War up the binary, import into Eclipse
Navigate into the binary, then,

jar -cvf jforum-x.x.x.war *

(the name can be anything)

In Eclipse

File > import > Web > War File > Next ...

Browse for the war created earlier, and name the project, then "Finish"

Modify the new Eclipse project to work from source code
Remove this .jar from the library,

appBase > WEB-INF > jforum.x.x.x.jar

Now go into the downloaded source code, and copy the folder "net" (and all code contents) from inside source,


Using a filebrowser I pasted this into,


Then refreshed in the Eclipse File Explorer. If you trust Eclipse's copy and paste, paste the folder straight in.

Follow the usual Eclipse/JForum manual setup
Maybe check /src is set as the build folder.
Do project > build, or set to automatic.
[Right click] Server > Add/Remove
Publish the new project.

It won't work yet. Run through the steps in,

to set up a database, pre-populate the database, and set at least some basic config (now is an opportune time to change the big hash property).

Proof of accurate configuration,




my version, 2.3.4, threw an exception. It was a one line fix. In,



//Enumeration<Object> getParameterNames();
Enumeration<String> getParameterNames();

I don't want to publish this until others look at it.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

Would a screenshot fo your Eclipse directory structure help?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
Below is a screenshot of a .war wrapped *binary* imported into Eclipse. Some modifications can be seen already (the forum being constructed has users who can probably use the custom error pages, even if they are an overhead).


I agree. Here's the link:
subject: Import Google JForum2 source to Eclipse
It's not a secret anymore!