Error while launching launcher.jar

43 views
Skip to first unread message

Aashish nakra

unread,
Jul 11, 2012, 7:53:41 AM7/11/12
to Software Updater Support & Discussion
Hi,
When i try to run the launcher.jar i get the following error :
Jul 11, 2012 5:20:19 PM updater.launcher.SoftwareLauncher main
SEVERE: null
java.io.IOException: Config file not found according to the path
stated in '/config'.
at updater.util.CommonUtil.getClientScript(CommonUtil.java:483)
at updater.launcher.SoftwareLauncher.main(SoftwareLauncher.java:437)

I have placed the launcher.jar and PatchDownloader.jar in the root
folder ( folder where the project is placed in my workspace)
and placed a client.xml file in update directory created there..

Message has been deleted

cws1989

unread,
Jul 11, 2012, 9:14:51 AM7/11/12
to software...@googlegroups.com
Hi, please move the client.xml from '/update' folder to root folder 
and try again. The default place you place the client.xml should be 
the same folder you place the launcher.jar. 

To change the default path (or file name) of the client.xml, there are 
two ways: 
  1. change the file 'config' that placed in the launcher.jar 
  2. specify the path of the client.xml file as the first argument 
when launching the launcher.jar 

If there is any mistake in the wiki page that leads you to this 
misunderstanding, please tell me and I will correct it. Thanks. 

aashish於 2012年7月11日星期三UTC+8下午7時53分41秒寫道:

aashish

unread,
Jul 12, 2012, 3:32:10 AM7/12/12
to software...@googlegroups.com

Hi,
Thanks , i had misread the instructions .

When i write
<command>{java}</command> in client.xml i get the following error :

C:\Documents and Settings\User\Desktop\PatchTry>java -jar Launcher.jar
Jul 12, 2012 12:40:26 PM updater.launcher.SoftwareLauncher main
SEVERE: null
updater.launcher.LaunchFailedException: java.io.IOException: Cannot run program
"{java}": CreateProcess error=2, The system cannot find the file specified

        at updater.launcher.SoftwareLauncher.start(SoftwareLauncher.java:296)
        at updater.launcher.SoftwareLauncher.main(SoftwareLauncher.java:449)
Caused by: java.io.IOException: Cannot run program "{java}": CreateProcess error
=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source)
        at updater.launcher.SoftwareLauncher.start(SoftwareLauncher.java:294)
        ... 1 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 3 more


       
But when i write <command>c:\Program Files\Java\jdk1.5.0\bin</command>
i get a permission denied error.

C:\Documents and Settings\User\Desktop\PatchTry>java -jar Launcher.jar
Jul 12, 2012 12:46:30 PM updater.launcher.SoftwareLauncher main
SEVERE: null
updater.launcher.LaunchFailedException: java.io.IOException: Cannot run program
"c:\Program Files\Java\jdk1.5.0\bin\": CreateProcess error=5, Access is denied
        at updater.launcher.SoftwareLauncher.start(SoftwareLauncher.java:296)
        at updater.launcher.SoftwareLauncher.main(SoftwareLauncher.java:449)
Caused by: java.io.IOException: Cannot run program "c:\Program Files\Java\jdk1.5
.0\bin\": CreateProcess error=5, Access is denied
        at java.lang.ProcessBuilder.start(Unknown Source)
        at updater.launcher.SoftwareLauncher.start(SoftwareLauncher.java:294)
        ... 1 more
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 3 more



My client.xml is

<root>
  <version>1.1</version>
  <storage-path>update/</storage-path>
  <launch>
    <type>command</type>
    <command>c:\Program Files\Java\jdk1.5.0</command>
    <command>- jar</command>
    <command>C:\Documents and Settings\User\Desktop\PatchTry\Try.jar</command>
  </launch>
  <catalog>
    <url>{HTTP URL to the catalog}</url>
  </catalog>
</root>

cws1989

unread,
Jul 12, 2012, 7:52:12 AM7/12/12
to software...@googlegroups.com
Yes, there is a bug in the launcher that will not replace the "{java}" to the path of java binary. You can use c:\Program Files\Java\jdk1.5.0\bin\java for your case instead. Thanks.

aashish於 2012年7月12日星期四UTC+8下午3時32分10秒寫道:

aashish

unread,
Jul 12, 2012, 8:27:22 AM7/12/12
to software...@googlegroups.com
Yes , but i am getting a
: Cannot run program
"c:\Program Files\Java\jdk1.5.0\bin\":
CreateProcess error=5, Access is denied
in that case.

Could you give me an idea about the possible reasons ?
Thanks

On Thursday, 12 July 2012 17:22:12 UTC+5:30, cws1989 wrote:in

cws1989

unread,
Jul 12, 2012, 8:32:54 AM7/12/12
to software...@googlegroups.com
Please replace the command c:\Program Files\Java\jdk1.5.0\bin to  c:\Program Files\Java\jdk1.5.0\bin\java

aashish於 2012年7月12日星期四UTC+8下午8時27分22秒寫道:

aashish

unread,
Jul 13, 2012, 5:41:51 AM7/13/12
to software...@googlegroups.com
Hi,
With this there is no error on the screen , but there's no output.. , the Try.jar isn't launcher

cws1989

unread,
Jul 13, 2012, 5:58:41 AM7/13/12
to software...@googlegroups.com
The launcher will not read and print the output stream of the launched software when using command mode.

aashish於 2012年7月13日星期五UTC+8下午5時41分51秒寫道:

aashish

unread,
Jul 16, 2012, 5:34:07 AM7/16/12
to software...@googlegroups.com
Hi,

Thanks it works, i can run the application from Launcher.jar , also have written a patch and tested it . :)
How can i create and apply a patch when i have wrapped the jar in an exe using JSmooth ?
The tutorial doesn't specify that .
Thanks

cws1989

unread,
Jul 16, 2012, 9:10:07 AM7/16/12
to software...@googlegroups.com
You can take a look at the video example: http://code.google.com/p/software-updater/wiki/SimpleExample, at about 5:09.

aashish於 2012年7月16日星期一UTC+8下午5時34分07秒寫道:

aashish

unread,
Aug 3, 2012, 7:37:59 AM8/3/12
to software...@googlegroups.com
Hi ,
I tried to create a patch using the steps you have given .
I can download the patch but i get the following error while trying to run the update exe

C:\Documents and Settings\Desktop\PATCHES\Base\executable1.2>java -jar Launcher.jar

Aug 3, 2012 5:05:02 PM updater.launcher.SoftwareLauncher start
SEVERE: null
java.io.IOException: Add new file: destFile C:\Documents and Settings\331388\Deskto
p\PATCHES\Base\executable1.2\.\update\1.patch exist and not match with the length &
 checksum of the new file
        at updater.patch.Patcher.doOperation(Patcher.java:489)
        at updater.patch.Patcher.doPatch(Patcher.java:799)
        at updater.launcher.BatchPatcher.doPatch(BatchPatcher.java:148)
        at updater.launcher.SoftwareLauncher.start(SoftwareLauncher.java:178)
        at updater.launcher.SoftwareLauncher.main(SoftwareLauncher.java:449)

aashish

unread,
Aug 3, 2012, 7:38:44 AM8/3/12
to software...@googlegroups.com
The checksum and the file size are correct although.

cws1989

unread,
Aug 3, 2012, 8:12:52 AM8/3/12
to software...@googlegroups.com
Hi,

This exception will be thrown with the following conditions:
1. When you create the patch, this file exist in the new version but not exist in the old version
2. This file already exist in the folder being patch and the size or checksum of that existing file not match with the new file in the 'new version'

For example,
Create patch:
  old version: /abc.txt  not exist
  new version: /abc.txt  exist
Patching:
  folder being patch: /abc.txt  exist but size and checksum not match with those in new version

In this situation, we will not replace/patch the existing file with the new file because may be it is the programmer mistakenly included this file and this file is important.
For those file that may be changed, like the user setting files, file-based database, user data etc., they should not be included in the patch, see http://code.google.com/p/software-updater/wiki/AdvancedTutorial#What_kind_of_files_should_not_be_included_in_the_patch?

For more details of other cases, so far there is no wiki, but there is in-code document, see the source code updater.patch.Patcher#doOperation(...), link: http://code.google.com/p/software-updater/source/browse/trunk/SoftwareUpdaterCommon/src/updater/patch/Patcher.java#301

aashish於 2012年8月3日星期五UTC+8下午7時37分59秒寫道:
Reply all
Reply to author
Forward
0 new messages