Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012
    Rep Power

    Question 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, 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 file is the line

    Java Code:
    package org.rosuda.JGR;
    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.
    Last edited by ihavenomuffins; 09-09-2012 at 06:36 AM. Reason: Bolding the key part of the post to make it more clear what I am asking

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Best practices for Java programming (for larger projects in particular)

    The 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.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Several Projects & test dependencies, best practices.
    By hopey_dishwasher in forum New To Java
    Replies: 0
    Last Post: 01-19-2012, 11:15 AM
  2. Replies: 0
    Last Post: 07-21-2011, 11:06 AM
  3. Design Patterns and Programming Practices
    By macason in forum Suggestions & Feedback
    Replies: 2
    Last Post: 12-14-2009, 10:23 AM
  4. Java coding Best Practices
    By ajeeb in forum Advanced Java
    Replies: 6
    Last Post: 05-27-2009, 05:30 AM
  5. Replies: 2
    Last Post: 04-03-2009, 04:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts