"package own.examples": necessary with NetBeans?

M

Mirco Novena

Hello together

I am learning java and for my beginning, I just used a simple editor to
write the example codes. Now I wanna try NetBeans, but unfortunately all my
codes aren't working! I found out, that NetBeans need at the beginning of
the source file: "package own.examples" (i.e. where the source is stored).

Of course none of the sources I've written contains this add-on (because I
didn't need it). So they don't work with NetBeans. Why? If I am adding this
small "sentence" to the source code, I can compile it with NetBeans without
any problems, -> but not any longer with the command prompt (I am using
WinXP Pro at the moment).

What am I doing wrong? Is this sentence really necessary? I am asking,
'cause I want to implement a CMS (maybe JSF or Struts) and therefore I want
to know:
1) if it is better to use Eclipse or jEdit (do they need this extra
sentence, too?),
2) and if I am using an Application Server, it always needs "package
own.examples" or not? (so that maybe it is better not to use NetBeans 'cause
of this "lack")

thanks and cheers
mirco novena
 
M

Mirco Novena

Sorry, system clock went wrong (incorrect date) and so I posted this
question twice. Please have a look at the poste from the 27. September
14:55. I posted both between a few minutes!

thank you and again sorry!
mirco
 
B

bugbear

Mirco said:
Hello together

I am learning java and for my beginning, I just used a simple editor to
write the example codes. Now I wanna try NetBeans, but unfortunately all my
codes aren't working! I found out, that NetBeans need at the beginning of
the source file: "package own.examples" (i.e. where the source is stored).

It's not (just) "where the source is stored"

http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html

BugBear
 

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,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top