[josm-dev] Building JOSM with NetBeans
Stuart
stuart.srsm at blueyonder.co.uk
Wed Mar 19 09:44:11 GMT 2008
Reusing the Ant file did the trick. Thanks Karl.
Out of interest for others here is what I did.
Create a 'New Project with Existing Ant Script' this results in a Wizard where you select the folder containing the code (and hence the build.xml).
I then have this odd page for Build and Run Actions. New to Ant etc so don't really get this bit but basically there are clean, compile, dist, init options against Build Project, Clean, Run, Test etc. I just stuck with defaults.
You then need to identify the Source Package Folders - this needs to be set to src\org\openstreetmap\josm ie the folder containing the src action, gui etc folders.
Next is Java Sources Classpath - I left this at the default (same path as packages). Finish
In the Projects folder clicking on build.xml results in the Navigator showing Ant Targets clean, compile, dist, init. All a bit confusing to me.
However, to prove it had worked I changed the MainApplication.java JFrame mainFrame line to create a different Titlebar name for the project.
Then it all gets a bit confusing. The normal Clean and Build, Run etc on the Project do not appear to do what I expect.
Instead, select the build.xml giving access to dist etc in the Navigator window and Right Click Run Target (on dist).
This creates the josm-custom.jar in the dist folder. Remember to Refresh the Window as I was sitting watching for it to appear and nothing appeared to be happening. All a bit confusing - I'm sure it makes sense to Ant users.
Running the jar showed my new Title Banner text as I'd hoped.
Ideally, I want to develop the code in a 'normal' NetBeans project - partly out of curiosity but also Ant seems to use a very different mechanism and I worry that it may be a compromise in some way. So the floor is still open for any more advice.
Stuart
----- Original Message -----
From: Karl Newman
To: Stuart
Sent: Tuesday, March 18, 2008 6:03 PM
Subject: Re: [josm-dev] Building JOSM with NetBeans
On Tue, Mar 18, 2008 at 10:25 AM, Stuart <stuart.srsm at blueyonder.co.uk> wrote:
Hi
New to JOSM Development. I just want to mess around with a local copy of JOSM to help learn Java within the NetBeans environment.
I've downloaded the trunk folder using SVN so have build.xml, src folder etc. I've looked for help on building josm using any tool (eclipse etc) for hints but I can't find anything (must be a secret society ;-) ). I'm fairly new to NetBeans and Java but had a bash at creating a new project with sources - kind of messed around and tried a Build but got 100 errors when it packed in. Obviously something fundamentally wrong.
Any links to a Help page?
Cheers
Stuart
I've never played with Netbeans, but I've had success getting it to build with Eclipse. I don't remember having to do anything special to get it to work, but maybe check the .classpath file for clues in getting it to build in NetBeans. Note that there's also an Ant build file (build.xml) which may or may not work better for you.
Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20080319/874c517f/attachment.html>
More information about the josm-dev
mailing list