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


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

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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!feeder2-2.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Unable to use package...why ???
Date Tue, 25 Oct 2011 20:05:34 -0700 (PDT)
Organization http://groups.google.com
Lines 26
Message-ID <19801553.19.1319598334254.JavaMail.geo-discussion-forums@prap37> (permalink)
References <280344ac-b398-44b3-b775-e84859feb5f0@gy7g2000vbb.googlegroups.com> <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>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 173.164.137.214
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1319598334 1345 127.0.0.1 (26 Oct 2011 03:05:34 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Wed, 26 Oct 2011 03:05:34 +0000 (UTC)
In-Reply-To <90be2370-ecdc-4da7-839c-26dbeee92e9d@c1g2000vbw.googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9191

Show key headers only | 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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