Best practices for Java programming (for larger projects in particular)
Hello, this is my first post to this forum. I tried looking for a thread on posting guidelines, but didn't see one... so apologies if I violate protocol or something. O:-)
I'm am not new to programming, but I am not a programmer. I have some experience with C/C++ and Java, but R is really my forte. I have a very analytical mind and approach problems logically, so I don't doubt my ability to figure out how individual functions/libraries/etc. work.
So far, my use of C/C++ and Java has been in either the context of learning the language or small projects, so the basics have served me well. Now, though, I am at the end of my knowledge and don't know even know how to begin this:
I want to modify a large project. Specifically, an interface that I use for the R language called JGR is written in Java and almost perfect... but there are a few idiosyncrasies that I would like to change. I'd ideally like to be able to contribute my eventual changes back to the project, but I would settle for just editing the program for my own use. (Later on, I want to be able to contribute more back to projects I use, particularly bug-fixes. I really want to give back to open source communities.)
Now here is my dilemma: I have no idea how to edit the program.
1.) The source code is available via SVN at http://svn.rforge.net/org/trunk/rosuda/JGR/, and I've installed SVN and downloaded a copy of the source code. Did I do that right? I did it through RapidSVN and not Netbeans, if that is even possible.
2.) In Netbeans I chose to create a new project from existing sources. I'm not sure if this is correct, or even what I should name the project. I went with "JGR". At the top of the JGR.java file is the line
Netbeans complains that this is an "Incorrect package." Throughout the file there are imports to org.rosuda.REngine, org.rosuda.ibase, and others. I know what packages do, but I've only ever used standard packages. What am I doing wrong with regard to these packages?
3.) While the two previous questions were somewhat specific, I guess my overall question is this: what is the best-practice for contributing to a larger project (or creating a larger project from scratch)? How do I get the source code in a way that allows me to build the project?
Once I can build the project myself, I can focus on learning what I need to learn to edit the functions I want to change. At this point, though, I am completely stymied. I use Netbeans 7.x, and use Windows 7, Mac OS X 10.6, and Scientific Linux 6.2 daily. I'm guessing that the answer to my questions are platform independent, but if one is easier than the others I'm open to it.
Small projects are one thing, but from all of my Googling I can't seem to find out how to make the jump to a big project.
Re: Best practices for Java programming (for larger projects in particular)
The JGR.java file will have been in the folder org/rosuda/JGR.
That is the package name.
When you created the Netbeans project it would have asked for the location of the source. That should have been the folder containing the 'org' folder.