Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!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 09:25:43 -0700 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: <08dcc4bb-ac13-4992-b576-1d4f51a28d2e@googlegroups.com> <83333a34-5a38-4199-a83b-db2c2c39658b@googlegroups.com> <734d3450-00d4-45cf-a760-f78a10613945@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 16:25:45 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="16729"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nq0FrwO4c+AjzI9qw4IqhQW2l6DU3xiU=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 In-Reply-To: <734d3450-00d4-45cf-a760-f78a10613945@googlegroups.com> Cancel-Lock: sha1:T9UDSb4BXBnjN1DYS1KanPzoCHM= Xref: csiph.com comp.lang.java.programmer:18644 On 9/11/2012 5:12 AM, clusardi2k@aol.com wrote: > On NetBeans, how do I determine what JDK I'm using. I forgot which > one I loaded. It's in your project properties. And it's not the one you have loaded, it's the one you have set for the build target. In other words, if you are using JDK 7, you can still be targeting for example Java 5 in your project, which is useful if you have users still on Java 5 who don't want to upgrade. Right-click on the project, Properties -> Sources, way down at the bottom it says "Sources/Binary Format", that's your target (I'm using NB 7.2 btw, I seem to remember a slightly different option format in NB 6). Also, you need the JRE. The JDK is for development, your users won't normally need that. All they need is the normal runtime, the JRE. You personally can use the JDK, because it contains a JRE, but anyone else will normally just have the JRE. To run, you use java -cp -jar If you need to do fancier things than that (distribute over the internet, for example) then look into Java WebStart or consider OneJar if you are going to just copy the files around.