Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: can't find in classpath, but only when running from the jar file Date: Mon, 15 Oct 2012 13:00:11 -0400 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: <4a7b7c26-806b-4a3d-8fed-f56e35ba8d76@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 15 Oct 2012 16:53:55 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="6a6a291fa7e9c0bd872c1a9cbe2b371d"; logging-data="9709"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R2flYTM1QUDqQhcMcZUx3rKPAfGRuisc=" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120925 Icedove/3.0.11 In-Reply-To: Cancel-Lock: sha1:w8h0ze8IWdW+t51W9R5YkDRaKJ8= Xref: csiph.com comp.lang.java.programmer:19364 On 10/15/2012 11:51 AM, Jeff Higgins wrote: > On 10/15/2012 11:22 AM, Jeff Higgins wrote: >> On 10/15/2012 10:56 AM, Stryder wrote: >>> but when I try to run the jar, with the environment exactly as it was >>> when I ran the class separately, using this command... >>> >>> java -jar PartnerAPI-test-client.jar > > or a classpath option > java -jar -cp pathtomyaxis2clientjar PartnerAPI-test-client.jar > I've supplied misinformation here. Quoting from the java - The Java Application Launcher manual -jar [snip] "When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. " [snip] Thanks to Nigel and Lew for catching this.:)