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 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> 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> <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 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