Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: How Do I Publish My Working Project (corresponding dot jar doesn't work on other's PCs) Date: Tue, 11 Sep 2012 12:45:39 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <08dcc4bb-ac13-4992-b576-1d4f51a28d2e@googlegroups.com> <83333a34-5a38-4199-a83b-db2c2c39658b@googlegroups.com> <734d3450-00d4-45cf-a760-f78a10613945@googlegroups.com> <84caa856-f49b-4ae3-8ae8-e7c5b6579b11@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 11 Sep 2012 19:45:42 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="1919"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tBiO55u+yWC0FQFwX8zBCXoNQii+7Zns=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 In-Reply-To: <84caa856-f49b-4ae3-8ae8-e7c5b6579b11@googlegroups.com> Cancel-Lock: sha1:5XJVdGtsAHYoIkwBok0TBUgj3bI= Xref: csiph.com comp.lang.java.programmer:18646 On 9/11/2012 11:08 AM, Lew wrote: > markspace wrote: >> To run, you use java -cp -jar > > The problem with that is that the command will ignore the "-cp" parameter. > > "-cp" and "-jar" is either/or proposition. > Yes I totally forgot about that. I guess I don't actually run java from the command line very often. That leaves setting the classpath in the jar itself, which is kind of tricky if you are going to be moving the jar to other people's computers. Java WebStart and OneJar come in handy here. Classpath in a jarfile: