newbie q: .java file and java project difference

Discussion in 'Java' started by xarora, Jul 27, 2005.

  1. xarora

    xarora Guest

    I use JCreator IDE. I can start a new project or simply start a new
    ..java file.

    I am wondering what is the difference between a project and a simply a
    single file ?

    I noticed that when I create a java project, options such as "project
    properties , classpath etc." become available. But they are not
    available during a simple file.

    Can anyone enlighten me about this ?

    Thanks.
     
    xarora, Jul 27, 2005
    #1
    1. Advertising

  2. xarora

    Rebecca Guest

    You should create a project and then create files/classes within that
    project. A project is just a collection of all files related to your
    program. As you become more proficient in JAVA you will see that one
    program may require multiple files. You may create an object which gets
    used by your program. So all the files will go into your project. For
    now - Create a project, and then create a file in your project and play
    around with that. Then as you go on you may add additional files. Also,
    by setting up a project the IDE will handle all the classpath settings
    and all that so that when you run your program, you don't have to deal
    with any of that.
     
    Rebecca, Jul 27, 2005
    #2
    1. Advertising

  3. xarora

    Guest

    Thanks Rebecca.
     
    , Jul 27, 2005
    #3
  4. xarora

    xarora Guest

    Thanks Rebecca.
     
    xarora, Jul 27, 2005
    #4
  5. xarora

    . Guest

    On Wed, 27 Jul 2005, xarora wrote:

    > I use JCreator IDE. I can start a new project or simply start a new
    > .java file.
    >
    > I am wondering what is the difference between a project and a simply a
    > single file ?
    >
    > I noticed that when I create a java project, options such as "project
    > properties , classpath etc." become available. But they are not
    > available during a simple file.
    >
    > Can anyone enlighten me about this ?


    If I have a large application with hundreds of files building that project
    would be tedious from the command line. I'd have to compile each file into
    a class file. When I run it, I might have to specify -classpath options
    and other things. If I create a 'project' in JCreator, the IDE will take
    care of all that work for me. I set it up once and then I can build
    everything with just one click of a button.

    --
    Send e-mail to: darrell dot grainger at utoronto dot ca
     
    ., Jul 27, 2005
    #5
  6. xarora

    Roedy Green Guest

    On 27 Jul 2005 09:15:40 -0700, "xarora" <> wrote or
    quoted :

    >I am wondering what is the difference between a project and a simply a
    >single file ?


    A package is a group of related classes. Each class goes in a
    separate Java file. A group of related packages is called a project.

    A group of related projects is called a workspace.

    Classes in the same package can see each other's default scope methods
    and variables.

    The nice thing about using a more advanced IDE is you can move classes
    around between packages and projects fairly easily as the structure
    evolves.


    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
     
    Roedy Green, Jul 28, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,405
  2. Damon Getsman
    Replies:
    2
    Views:
    413
    Chris Riesbeck
    Sep 17, 2008
  3. Amarpal
    Replies:
    2
    Views:
    880
    harsha
    Dec 31, 2011
  4. Nick Timkovich
    Replies:
    0
    Views:
    73
    Nick Timkovich
    Feb 25, 2014
  5. Skip Montanaro
    Replies:
    0
    Views:
    71
    Skip Montanaro
    Feb 25, 2014
Loading...

Share This Page