Re: Help with -classpath and packages




"Fergus Gibson" <nospam@xxxxxxxxxxx> wrote in message news:OU0pg.109799$Mn5.2326@xxxxxxxxxxx

This term "library" is a big part of my confusion. There is no concept of a "library" intrinsic to Java. I don't know what the IDE implies when it calls this thing a "library" and that thing an "application". Java has packages and classes, which I understand quite well.

I know what the generic terminology means, but I don't know what the IDE means when it uses those words. What is a Java library? A utility package whose classes are meant to be used by many other packages ("applications") to achieve some common objectives?

I don't think the IDE applies any special behaviour to what one might call a "library" versus what one might call an "application".

I guess the idea is that each project will eventually be distributed as its own JARs. Some of these JARs have an entry point, and so when you try to run them (via "java -jar whatever.jar"), something will actually happen. These are "applications". Other jars just contain classes for applications to use, and you can't actually "run" them. Those would be the libraries.

But again, you don't mark a project as being an application or a library within Eclipse (I don't know about the other IDEs). It's just a label I apply when speaking to other humans to communicate the intent of the project.


I guess I feel a certain resistance to learning the IDE. I understand the language and packages and classes, and I don't want to learn a whole new set of semantics. I also balk at becoming totally dependent on the IDE. It seems to me there would be no easy to way to compile the "applications" and "libraries" with just the simple javac command-line compiler once they are split up into a whole bunch of isolated directory trees.

If you're working from the command line, I think you'd usually use a build tool like "make" or "ant".

- Oliver

.



Relevant Pages

  • Re: vi vs. vim vs. emacs vs. ????
    ... Java without the aid of Eclipse or Netbeans. ... packages and such without having an IDE do all the work for me. ... what's the best editor on a *nix platform? ...
    (comp.lang.java.help)
  • Re: a little confused about packages...
    ... When you use packages, the package name is a part of the full class name. ... This is because the packages in Java are used for both logical and physical ... The package name is in Java also a designator of the physical structure, ... When you compile and execute from within an IDE, ...
    (comp.lang.java.help)
  • Re: vi vs. vim vs. emacs vs. ????
    ... Java without the aid of Eclipse or Netbeans. ... packages and such without having an IDE do all the work for me. ... This won't teach you anything more about Java. ...
    (comp.lang.java.help)
  • Re: Help with -classpath and packages
    ... with common classes that I will be using among several libraries), ... packages and classes, ... I know what the generic terminology means, but I don't know what the IDE ... What is a Java library? ...
    (comp.lang.java)
  • Re: Differences between C++ and Java
    ... > are *implementation* defined and the standard also specifies the ... > "In Java, garbage collection of unreferenced objects is automatic. ... > C++, you manually manage memory. ... > provide third party libraries that work just as well, ...
    (comp.lang.java.programmer)