Re: Help needed with NetBeans IDE so sample code will work please?



Did you put the entire piece of code in a single file or... ? Because
if you didn't split it up then I can imagine that it doesn't run.

....Still, I can't help wonder how you created the project. Did you
manually create a new package and 1 (or 2) new class files after which
you copied/pasted this code into it ?

Because thats exactly what I did (I always keep a dummy project around
in which I keep lots of test cases) and it simply worked. First I
created the package and 2 class files manually, with a second test I
simply created a class file in another package and only changed the
package name in your source and both tests work.

So I wonder if its either your NetBeans version or the way in which you
set this all up.

--
Groetjes, Peter

..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc

.



Relevant Pages

  • Re: Class cant find another class in the same directory
    ... referring to the second class when I go to build it. ... If they belong to the same package there is no need to import anything. ... necessary class files relative to your current location. ... represented by the directory hierarchy my/path. ...
    (comp.lang.java.programmer)
  • Q: Java source and directory structure - standard way ?
    ... When I compile I use the -d option on Sun's SDK... ... and places the class files into it. ... Java source. ... code directory structure has been created to mirror the package names. ...
    (comp.lang.java)
  • Re: Q: Java source and directory structure - standard way ?
    ... > the absense of a specified output directory, the class files end up ... > code directory structure has been created to mirror the package names. ... > way) of holding Java source - or are all these coders just ignorant ...
    (comp.lang.java)
  • CTAN has a new package: umthesis
    ... The package below has been put up at tug.ctan.org and should soon be ... Saint Michael's College ... The following information was provided by our fellow contributor: ... This new class file improves upon previous class files in several ways: ...
    (comp.text.tex)
  • Re: Q: Java source and directory structure - standard way ?
    ... I think this may be a difference in JDKs. ... I prefer that the package ... source be in all one place and the JDK build the tree as it compiles. ... > and places the class files into it. ...
    (comp.lang.java)