Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9191

Re: Unable to use package...why ???

From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Unable to use package...why ???
Date 2011-10-25 20:05 -0700
Organization http://groups.google.com
Message-ID <19801553.19.1319598334254.JavaMail.geo-discussion-forums@prap37> (permalink)
References (1 earlier) <9gne1vFvskU1@mid.individual.net> <02de641c-1c6a-420b-b059-c17444e1ff3e@g25g2000yqh.googlegroups.com> <9gnn4cFbaqU1@mid.individual.net> <j86i64$j5u$1@dont-email.me> <90be2370-ecdc-4da7-839c-26dbeee92e9d@c1g2000vbw.googlegroups.com>

Show all headers | View raw


PortisHead wrote:
> I tried what markspace told me....and it worked :)
> 
> Thus :
> java -cp c:\myclasses;c:\examples Showbcard
> 
> did the magic.
> But I can't understand why , beside "C:\myclasses" where my class
> files are stored , it needs the current path of Showbcard ???

How many question marks does it take to indicate an interrogative?

> Showbcard , imports Getbcard in its scripting.

There is no "scripting" involved.  Java is not a scripting language.

> So it makes pretty much good sense to include the "c:\myclasses" in
> the -cp parameter of "java" command,
> but why "C:\examples" ???

The Java tutorials have a pretty good section on packages and the "import" directive (not command).

Java finds all classes by the classpath.  If the classpath does not include the current directory ("."), then the current directory is not searched.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-25 00:06 -0700
  Re: Unable to use package...why ??? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-10-25 10:32 +0100
    Re: Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-25 04:10 -0700
      Re: Unable to use package...why ??? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-10-25 13:07 +0100
        Re: Unable to use package...why ??? markspace <-@.> - 2011-10-25 07:47 -0700
          Re: Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-25 15:03 -0700
            Re: Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-25 15:10 -0700
              Re: Unable to use package...why ??? Martin Gregorie <martin@address-in-sig.invalid> - 2011-10-26 00:06 +0000
                Re: Unable to use package...why ??? Martin Gregorie <martin@address-in-sig.invalid> - 2011-10-26 00:08 +0000
              Re: Unable to use package...why ??? Martin Gregorie <martin@address-in-sig.invalid> - 2011-10-26 00:06 +0000
          Re: Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-25 15:21 -0700
            Re: Unable to use package...why ??? markspace <-@.> - 2011-10-25 15:57 -0700
            Re: Unable to use package...why ??? Lew <lewbloch@gmail.com> - 2011-10-25 20:05 -0700
          Re: Unable to use package...why ??? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-10-26 09:55 +0100
            Re: Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-26 13:08 -0700
  Re: Unable to use package...why ??? Roedy Green <see_website@mindprod.com.invalid> - 2011-10-27 07:20 -0700
  Re: Unable to use package...why ??? Lew <lewbloch@gmail.com> - 2011-10-27 07:33 -0700
    Re: Unable to use package...why ??? PortisHead <massivetdm850@gmail.com> - 2011-10-28 12:57 -0700

csiph-web