Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: How to find out if I use java.exe from a jdk, a jre or a javaEE installation? Date: Fri, 12 Aug 2011 08:20:54 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <4e45399c$0$6627$9b4e6d93@newsspool2.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 12 Aug 2011 15:21:02 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="20369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OYmZUx01UA7wynrpQQwuua4eTEzUED80=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <4e45399c$0$6627$9b4e6d93@newsspool2.arcor-online.net> Cancel-Lock: sha1:EoXU/Tv3LAREmUKzLr1hswXHKNk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7045 On 8/12/2011 7:33 AM, Robin Wenger wrote: > How can I find out (in Win) WHICH java.exe I used in detail? It's "where java" on windows, and I think whereis on *nix. If you mean programatically, just access the class/sdk component or other service. If you get an exception, it wasn't installed. Some programs (like ant) require you to set the JAVA_HOME environment variable to identify which SDK you want to use (some users have more than one). I prefer using command line arguments or cofig files; polluting the environment with lots of tedious variables is a last resort.