Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Sat, 21 Jul 2012 19:56:33 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Execution using javaw differs from Windows 7 default References: <8b5bc369-00f2-48ee-b6d7-9119d08ebb41@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: Lines: 45 NNTP-Posting-Host: 2001:980:9089:1:4c47:29e1:5119:67f4 X-Trace: 1342893602 news.xs4all.nl 6876 [2001:980:9089:1:4c47:29e1:5119:67f4]:47844 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.java.programmer:16195 On 21-07-2012 18:11, 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". > on a comman-prompt try this: O:\>assoc .jar .jar=jarfile O:\>ftype jarfile jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %* O:\> (after the 'ftype' specify the output of the first command) The output of this second line is the command that is executed when you double click a jar-file. The above output show what will be executed if i do this on MY computer, repeat the steps to show what will be executed on YOUR computer.