Re: a little confused about packages...




<jon23d@xxxxxxxxx> wrote...
Bjorn's solution worked just fine, though the IDE doesn't
seem to take care of this on its own. The errors that in
a console are the same errors that I get in the ide...

It's been ages since I used JBuilder, but I think that you can set specific
directories only when dealing with "projects". I.e. that you in the project
can setup both for where to find source code, where to put compiled code,
and consequently which classpath to use for the specific project.

I'm sure there's just a setting somewhere that needs
changing, but perhaps I am better off learning
this way anyways!

Probably, but in the next step you might want to look into how to use the
directing switches for "javac" and "java", in order to get more control of
what you produce. This is what the IDE's can do for you with the above
mentioned settings, but it'll always help to understand them outside the IDE
as well.

Somewhat like this should be more likely that you end up with in larger
projects:

Let's say that you have the directories:

~/devel/java/src/
~/devel/java/classes/

You have all the source code files in the "src" directory, and you want to
use the "classes" directory for the compiled code. When executing the
commannds you will be in the directory:

~/devel/java/

There you can e.g. compile with...

javac src/*.java -d classes/

....and e.g. run it with:

java -cp classes/ TestPkg.TestPkg

This was just an example, but as you'll see, it will create the directory
structure for you, corresponding to the package names, when compiling.

I believe that it will simplify things for you in the long run.

Thanks for all your help.

You're welcome.

/// Bjorn A



Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php
.



Relevant Pages

  • Re: Are they obligued to give me the source code?
    ... Michael Schnell a écrit: ... Thus if the compiled code can be downloaded the source code needs to be downloadable from the same site. ... Did you get that from the German ruling? ...
    (comp.os.linux.embedded)
  • Re: Destructive Functions
    ... >>> I believe you are thinking of coalescing here. ... >>> COMPILEd code are required to reference (as in eql) the literals ... >>> in the source code. ... > corresponding objects in the compiled code are eql. ...
    (comp.lang.lisp)
  • Re: Problems creating subform
    ... The result is that the next time you run the file, the source code is re-compiled, while you have gotten rid of any executable code rubbish that were left behind during development (deleting the source code for a procedure, or a whole module, doesn't remove its compiled code, I believe). ...
    (microsoft.public.access.forms)
  • Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]
    ... I don't recall if there is a compiled code ... >>source code that was being evaluated. ... I don't think MIT Scheme tracks macro expansions. ... > line in the definition of bar which invokes baz, ...
    (comp.lang.lisp)
  • Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]
    ... I don't recall if there is a compiled code ... >>source code that was being evaluated. ... I don't think MIT Scheme tracks macro expansions. ... > line in the definition of bar which invokes baz, ...
    (comp.lang.python)