newbie q: .java file and java project difference

X

xarora

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.
 
R

Rebecca

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.
 
?

.

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.
 
R

Roedy Green

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top