Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gordon Levi Newsgroups: comp.lang.java.programmer Subject: Re: Execution using javaw differs from Windows 7 default Date: Mon, 23 Jul 2012 01:01:33 +1000 Lines: 39 Message-ID: References: <8b5bc369-00f2-48ee-b6d7-9119d08ebb41@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net 4OYf4a/1Yfq93IZIdMyt8w6uLML/iZeZj/7GFQCGyRJ9mlnW1y6ebQkNFjrru0vkmv Cancel-Lock: sha1:HWzcwoVDooYuy3r4YQPzqsI+1KA= X-Newsreader: Forte Agent 6.00/32.1186 Xref: csiph.com comp.lang.java.programmer:16217 Gordon Levi wrote: >Lew wrote: > >>Gordon Levi wrote: >>> I have an application that uses the JDBC-ODBC driver that worked in >>> the (Netbeans) IDE but failed to find the (Access) database when using >>> the default file association under Windows 7. In the hope of getting >>> some more information I ran the application in a command line window >>> using javaw and it worked. >>> >>> In summary, clicking on a shortcut to "C:\src\myapp\dist\myapp.jar" >>> file in Windows 7 failed because it did not find my database although >>> it invoked myapp. Clicking on a shortcut to >>> "C:\Windows\System32\javaw.exe -jar C:\src\myapp\dist\myapp.jar" >>> works. Can someone explain why? >>> >>> In case it is relevant, I did try the jar file's directory and the >>> database directory for the "Start in:" directory. >> >>Apparently the file association to the JAR files is not "C:\Windows\System32\javaw.exe -jar %1". >> >>What exactly is your associated command for JAR files? > >I think if I knew that "exactly" I might have been able to answer my >own question. Window 7 shows it as a pretty Java icon with a >description of "Java(TM) Platform SE binary". I was wrong! I still can't answer my own question. Thanks to "Luuk" I now know that the association is C:\Program Files (x86)\Java\jre6\bin\javaw.exe "%1" %* I am executing C:\Windows\System32\javaw.exe. The two executables are definitely different but I don't know the difference. A significant omission from my post that was that I am running a 64 bit version of Windows 7 and I suspect that my lack of understanding is because of a some incompatibility between the 32 and 64 bit executables and/or drivers.