如果找到了对您有用的资料,烦请点击右手边的Google广告支持我继续共享知识,谢谢! http://dengpeng.spaces.live.com/

2008年7月16日星期三

Run SPOT Host application without ant 2

This blog is a supplementary of previous entry: http://pauldeng.blogspot.com/2008/03/run-spot-host-application-without-ant.html

1. Execute ant host-run –v, you should get the print out similar to text below:
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_16\jre
Detected OS: Windows XP
parsing buildfile C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/Demos/TelemetryDemo/Telemetry-onDesktop/build.xml
Project base dir set to: C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
[property] Loading C:\Documents and Settings\tkob\.sunspot.properties
Importing file C:\Program Files\Sun\SunSPOT\sdk\build.xml from C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\build.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/build.xml
[property] Loading C:\Documents and Settings\tkob\.sunspot.properties
Override ignored for property "spotselector.basestation.lastport"
Override ignored for property "sunspot.lib"
Override ignored for property "spot.library.name"
Override ignored for property "sunspot.home"
parsing buildfile jar:file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/ant-contrib.jar!/net/sf/antcontrib/antlib.xml with URI = jar:file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/ant-contrib.jar!/net/sf/antcontrib/antlib.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\clean.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\clean.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/clean.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\compile.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\compile.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/compile.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\find-spots.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\find-spots.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/find-spots.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\sysadmin.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\sysadmin.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/sysadmin.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\run-spotclient.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\run-spotclient.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/run-spotclient.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\find-spots.xml from C:\Program Files\Sun\SunSPOT\sdk\ant\run-spotclient.xml
Skipped already imported file:
C:\Program Files\Sun\SunSPOT\sdk\ant\find-spots.xml

Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\echo.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\echo.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/echo.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\find-spots.xml from C:\Program Files\Sun\SunSPOT\sdk\ant\echo.xml
Skipped already imported file:
C:\Program Files\Sun\SunSPOT\sdk\ant\find-spots.xml

Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\debug-proxy.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\debug-proxy.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/debug-proxy.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\deploy.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\deploy.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/deploy.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\jar-app.xml from C:\Program Files\Sun\SunSPOT\sdk\ant\deploy.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\jar-app.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/jar-app.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\help.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\help.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/help.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\host-compile.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\host-compile.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/host-compile.xml
Already defined in main or a previous import, ignore -post-host-compile
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\host-run.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\host-run.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/host-run.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\init.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\init.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/init.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\library.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\library.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/library.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\preverify.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\preverify.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/preverify.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\run.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\run.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/run.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\suite.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\suite.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/suite.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\jar-app.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
Skipped already imported file:
C:\Program Files\Sun\SunSPOT\sdk\ant\jar-app.xml

Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\sdk-info.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\sdk-info.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/sdk-info.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\upgrade.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\upgrade.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/upgrade.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\socket-proxy.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\socket-proxy.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/socket-proxy.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\networktools-run.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\networktools-run.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/networktools-run.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\spotworld.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\spotworld.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/spotworld.xml
Importing file C:\Program Files\Sun\SunSPOT\sdk\ant\spotworldextension.xml from C:\Program Files\Sun\SunSPOT\sdk\build.xml
parsing buildfile C:\Program Files\Sun\SunSPOT\sdk\ant\spotworldextension.xml with URI = file:/C:/Program%20Files/Sun/SunSPOT/sdk/ant/spotworldextension.xml
Build sequence for target(s) `host-run' is [-pre-init, -do-init, -post-init, init, -set-selector-for-host-run, -override-warning-find-spots, -prepare-conditions-for-find-spots, -find-shared-basestation, -run-spotfinder, -decide-whether-to-run-spotselector, -run-spotselector, -collect-spotselector-result, -clean-up-spotselector-output-file, -spotselector-fail, -decide-whether-to-start-basestation-manager, -start-new-basestation-manager, -do-find-spots, -pre-host-compile, -do-host-compile, -post-host-compile, host-compile, -pre-host-run, -do-host-run, -post-host-run, host-run]
Complete build sequence is [-pre-init, -do-init, -post-init, init, -set-selector-for-host-run, -override-warning-find-spots, -prepare-conditions-for-find-spots, -find-shared-basestation, -run-spotfinder, -decide-whether-to-run-spotselector, -run-spotselector, -collect-spotselector-result, -clean-up-spotselector-output-file, -spotselector-fail, -decide-whether-to-start-basestation-manager, -start-new-basestation-manager, -do-find-spots, -pre-host-compile, -do-host-compile, -post-host-compile, host-compile, -pre-host-run, -do-host-run, -post-host-run, host-run, -pre-library, -set-properties, -combine-manifests, create-manifest, -do-library-new, -unjar-utility-jar, -pre-compile, -do-compile, -post-compile, compile, preverify.-unjar-utility-jars, library.-combine-manifests, Telemetry-onDesktop.-failIfRemote, library.-append-manifest-contents, deploy.-do-deploy, -find-manifest, -set-jar-name, -check-for-jar, -remote-echo, find-spots.-decide-whether-to-start-basestation-manager, Telemetry-onDesktop.compile, -failIfSerial, getallappsstatus, -do-suite-new, -do-suite-old, suite.-do-suite, hello, run.-pre-run, help.-help, Telemetry-onDesktop.deletepublickey, -do-run, getsleepinfo, Telemetry-onDesktop.selectnothing, -do-debug, debug, Telemetry-onDesktop.debug-run, Telemetry-onDesktop.-set-selector-for-nonbasestation, -check-run-spotclient-parameters, Telemetry-onDesktop.system-properties, run-spotclient.-check-run-spotclient-parameters, jar-app.-pre-jar-app, Telemetry-onDesktop.disableota, -failIfRemote, -do-upgrade, Telemetry-onDesktop.upgrade, compile.-do-compile, -echo-progress-for-local-runs, -post-library, getappstatus, upgrade.-conditionally-deploy-selftest, init.-do-init, jar, SpotWorldExtensions.getallappsstatus, library.-do-library-old, socket-proxy.-set-selector-for-socket-proxy-run, SpotWorldExtensions.startapp, -echo-progress-for-remote-runs, -do-jar-app, deploy.-pre-deploy, startbasestation, suite.-post-suite, compile.-do-compile-single, -set-basestation-sharing, SpotWorldExtensions.stopapp, Telemetry-onDesktop.blink, getsuitemanifest, upgrade.-conditionally-upgrade-pctrlfirmware, find-spots.-run-spotselector, -pre-clean, -do-clean, -post-clean, clean, -pre-preverify, -make-preverify-directory, -unjar-utility-jars, -do-preverify, -post-preverify, preverify, -pre-jar-app, -post-jar-app, jar-app, -pre-suite, -do-suite, -post-suite, Telemetry-onDesktop.suite, preverify.-unjar-utility-jar, -set-selector-for-socket-proxy-run, -pre-socket-proxy-run, -do-socket-proxy-run, -post-socket-proxy-run, Telemetry-onDesktop.socket-proxy, debug-run, -do-debug-proxy-run, -run-spotclient-for-one-remote-id, debug-proxy.-do-debug-proxy-run, spotworldextension-help, socket-proxy, find-spots.-start-new-basestation-manager, resumeapp, delete-system-property, info, Telemetry-onDesktop.slots, Telemetry-onDesktop.settime, javadoc, run-spotclient.-echo-progress-for-local-runs, -pre-debug-proxy-run, -post-debug-proxy-run, Telemetry-onDesktop.debug-proxy, Telemetry-onDesktop.make-host-jar, selectnothing, sysadmin.-pre-sysadmin, disableota, run.-post-run, sysadmin.-post-sysadmin, SpotWorldExtensions.getsuitemanifest, -set-selector-for-nonbasestation, Telemetry-onDesktop.host-run, host-compile.-do-host-compile, -do-networktools-init, suite.-do-suite-old, -run-spotclient-once-with-remote-id, flashconfig, deploy.-post-deploy, echo.-local-echo, -do-library-old, -do-library, library, Telemetry-onDesktop.flashconfig, blink, Telemetry-onDesktop.selectbasestation, host-run.-set-selector-for-host-run, Telemetry-onDesktop.resetfat, selectbasestation, -pre-run, -post-run, run, base, suite, -local-echo, -check-port, echo.-do-echo, -post-sysadmin, Telemetry-onDesktop.library, -do-sdk-info, -pre-sysadmin, -test-ant-version, -unable-to-sysadmin, -really-do-sysadmin, -do-sysadmin, sysadmin, selectdummyapp, jar-app.-do-jar-app, run-spotclient.-run-spotclient-for-one-remote-id, system-properties, -do-deploy, slots, -do-networktools-run, tracert, -do-socket-proxy-gui-run, Telemetry-onDesktop.socket-proxy-gui, SpotWorldExtensions.pauseapp, preverify.-do-preverify, flashbootloader, Telemetry-onDesktop.flashbootloader, run-spotclient.-run-spotclient-once-locally, -post-compile-single, compile.-pre-compile, host-run.-pre-host-run, flashbootstrap, find-spots.-override-warning-find-spots, Telemetry-onDesktop.tracert, -set-flag-for-fork, sdk-info.-do-sdk-info, -pre-compile-single, deletepublickey, Telemetry-onDesktop.selectmeshrouter, SpotWorldExtensions.getpowerstats, -help, run-spotclient.-run-spotclient-once-with-remote-id, host-run.-do-host-run, startapp, Telemetry-onDesktop.debug, find-spots.-run-spotfinder, fork, run.-do-run, debug-proxy.-post-debug-proxy-run, find-spots, host-run.-post-host-run, Telemetry-onDesktop.start-shared-basestation, Telemetry-onDesktop.selectapplication, networktools-run.-do-networktools-run, init.init, suite.-pre-suite, clean.-pre-clean, Telemetry-onDesktop.resetlibrary, Telemetry-onDesktop.preverify, -do-compile-single, socket-proxy.-do-socket-proxy-run, upgrade.-conditionally-upgrade-demosensorboardfirmware, echo.-remote-echo, help, SpotWorldExtensions.spotworldextension-help, preverify.-make-preverify-directory, -conditionally-deploy-selftest, library.-post-library, SpotWorldExtensions.resumeapp, debug-proxy, -set-basestation-not-required, -do-run-spotworld, Telemetry-onDesktop.spotworld, find-spots.-decide-whether-to-run-spotselector, -run-spotclient-multiple-times-with-remote-id, -run-spotclient-once-locally, -run-spotclient-multiple-times-locally, -run-spotclient, socket-proxy.-pre-socket-proxy-run, setserialnumber, networktools-run.-do-networktools-init, Telemetry-onDesktop.setserialnumber, Telemetry-onDesktop.selectdummyapp, echo.-check-port, -check-for-manifest, -pre-deploy, -post-deploy, jar-deploy, Telemetry-onDesktop.deploy, socket-proxy-gui, Telemetry-onDesktop.setpublickey, Telemetry-onDesktop.-set-jar-name, -user-help, clean.-do-clean, Telemetry-onDesktop.-set-basestation-sharing, Telemetry-onDesktop.find-spots, SpotWorld.-do-run-spotworld, Telemetry-onDesktop.sysadmin, debug-proxy.-do-debug, run-spotclient.-run-spotclient-multiple-times-locally, pauseapp, find-spots.-collect-spotselector-result, find-spots.-spotselector-fail, setpublickey, Telemetry-onDesktop.host-compile, find-spots.-prepare-conditions-for-find-spots, Telemetry-onDesktop.flashbootstrap, jar-app.-post-jar-app, compile.-post-compile, selectmeshrouter, Telemetry-onDesktop.clean, init.-post-init, jar-app.-find-manifest, sysadmin.-do-sysadmin, Telemetry-onDesktop.enableota, library.-do-library-new, run-spotclient.-echo-progress-for-remote-runs, sysadmin.-really-do-sysadmin, compile.-post-compile-single, stopapp, selectapplication, flashapp, run.-set-flag-for-fork, library.-do-library, Telemetry-onDesktop.fork, flashvm, -do-echo, echo, make-host-jar, start-shared-basestation, library.create-manifest, preverify.-pre-preverify, socket-proxy.-do-socket-proxy-gui-run, library.-set-properties, help.-user-help, Telemetry-onDesktop.flashvm, sysadmin.-test-ant-version, -conditionally-upgrade-pctrlfirmware, getavailablesuites, getmemorystats, upgrade.-do-upgrade, clean.-post-clean, Telemetry-onDesktop.flashlibrary, compile-single, enableota, Telemetry-onDesktop.help, flashlibrary, suite.-do-suite-new, host-compile.-post-host-compile, deploy.-check-for-jar, upgrade, Telemetry-onDesktop.sdk-info, find-spots.-find-shared-basestation, resetlibrary, -append-manifest-contents, Telemetry-onDesktop.jar-deploy, sdk-info, SpotWorldExtensions.getsleepinfo, run-spotclient.-run-spotclient, SpotWorldExtensions.getmemorystats, compile.-pre-compile-single, sysadmin.-unable-to-sysadmin, deploy.-check-for-manifest, run-spotclient.-run-spotclient-once, preverify.-post-preverify, SpotWorldExtensions.getappstatus, Telemetry-onDesktop.set-system-property, find-spots.-do-find-spots, Telemetry-onDesktop.run, Telemetry-onDesktop.delete-system-property, init.-pre-init, socket-proxy.-post-socket-proxy-run, settime, host-compile.-pre-host-compile, Telemetry-onDesktop.info, Telemetry-onDesktop.-set-basestation-not-required, getpowerstats, Telemetry-onDesktop.startbasestation, set-system-property, find-spots.-clean-up-spotselector-output-file, run-spotclient.-run-spotclient-multiple-times-with-remote-id, library.-pre-library, Telemetry-onDesktop.hello, spotworld, Telemetry-onDesktop.flashapp, Telemetry-onDesktop.echo, -run-spotclient-once, Telemetry-onDesktop.jar-app, Telemetry-onDesktop.-failIfSerial, -conditionally-upgrade-demosensorboardfirmware, deploy, resetfat, debug-proxy-run, Telemetry-onDesktop.debug-proxy-run, debug-proxy.-pre-debug-proxy-run, SpotWorldExtensions.getavailablesuites, , Telemetry-onDesktop.compile-single]

-pre-init:

-do-init:
[property] Loading C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build.properties
[property] Loading C:\Program Files\Sun\SunSPOT\sdk\default.properties
Override ignored for property "sunspot.lib"
Override ignored for property "user.import.paths"
Override ignored for property "main.class"
Override ignored for property "host.java.version"
Override ignored for property "spot.library.name"
Override ignored for property "user.properties.file"
[property] Loading Environment env.
[available] Found: C:\Program Files\Java\jdk1.5.0_16\jre\bin\client\jvm.dll
Override ignored for property "do.set.jvmdll"
Override ignored for property "JVMDLL.KEY"
Override ignored for property "JVMDLL.VALUE"
Property "remoteid" has not been set
Property "remoteID" has not been set

-post-init:

init:

-set-selector-for-host-run:

-override-warning-find-spots:
Skipped because property 'port' not set.

-prepare-conditions-for-find-spots:

-find-shared-basestation:
Skipped because property 'spotselector.findsharedbasestation' not set.

-run-spotfinder:
[exec] Current OS is Windows XP
[exec] Error redirected to property: spotfinder.portlist
[exec] Executing 'C:\Program Files\Sun\SunSPOT\sdk\bin\spotfinder'
[exec] The ' characters around the executable and arguments are
[exec] not part of the command.
Property "basestation.not.required" has not been set

-decide-whether-to-run-spotselector:

-run-spotselector:
Override ignored for property "spottype"
Override ignored for property "querytype"
Property "spotport" has not been set
Override ignored for property "spotselector.preferred.port"
[mkdir] Skipping C:\Program Files\Sun\SunSPOT\sdk\temp because it already exists.
Property "spotclient.verbose" has not been set
[java] Executing 'C:\Program Files\Java\jdk1.5.0_16\jre\bin\java.exe' with arguments:
[java] '-Djava.library.path=C:/Program Files/Sun/SunSPOT/sdk/lib'
[java] '-Dspotselector.inhibit.full.basestation.check=false'
[java] '-Dverbose=${spotclient.verbose}'
[java] '-classpath'
[java] 'C:\Program Files\Sun\SunSPOT\sdk\lib\spotselector.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\multihoplib_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\transducerlib_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotworldext_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotlib_host.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotlib_common.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\squawk_classes.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\RXTXcomm.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotclient.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\desktop_signing.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotworldext_spotclient.jar;C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop'
[java] 'com.sun.spot.spotselector.CommandLineSpotSelector'
[java] 'COM7 (00144F0100004BFD)'
[java] '2'
[java] 'COM7'
[java] 'C:\Program Files\Sun\SunSPOT\sdk\temp\spotselector-999496015'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] Please wait while connected Sun SPOTs are examined...
Property "basestation.not.required" has not been set

-collect-spotselector-result:
[loadfile] loading C:\Program Files\Sun\SunSPOT\sdk\temp\spotselector-999496015 into property port
[loadfile] loaded 4 characters
[echo]
[echo] Using Sun SPOT basestation on port COM7

-clean-up-spotselector-output-file:
[delete] Deleting: C:\Program Files\Sun\SunSPOT\sdk\temp\spotselector-999496015

-spotselector-fail:
Skipped because property 'spotselector.spotselector.failed' not set.

-decide-whether-to-start-basestation-manager:

-start-new-basestation-manager:
Skipped because property 'spotselector.should.start.shared.basestation' not set.

-do-find-spots:
Override ignored for property "port"

-pre-host-compile:

-do-host-compile:
[mkdir] Skipping C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build because it already exists.
[javac] org\sunspotworld\demo\AccelerometerListener.java omitted as C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build\org\sunspotworld\demo\AccelerometerListener.class is up to date.
[javac] org\sunspotworld\demo\GraphView.java omitted as C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build\org\sunspotworld\demo\GraphView.class is up to date.
[javac] org\sunspotworld\demo\PacketTypes.java omitted as C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build\org\sunspotworld\demo\PacketTypes.class is up to date.
[javac] C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\src\org\sunspotworld\demo\TelemetryFrame.form skipped - don't know how to handle it
[javac] org\sunspotworld\demo\TelemetryFrame.java omitted as C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build\org\sunspotworld\demo\TelemetryFrame.class is up to date.
[javac] C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\src\org\sunspotworld\demo\package.html skipped - don't know how to handle it
[javac] C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\src\org\sunspotworld\demo\racecar.gif skipped - don't know how to handle it

-post-host-compile:
[copy] org\sunspotworld\demo\racecar.gif omitted as C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build\org\sunspotworld\demo\racecar.gif is up to date.
[copy] No sources found.

host-compile:

-pre-host-run:

-do-host-run:
[java] Executing 'C:\Program Files\Java\jdk1.5.0_16\jre\bin\java.exe' with arguments:
[java] '-Djava.library.path=C:/Program Files/Sun/SunSPOT/sdk/lib;'
[java] '-DSERIAL_PORT=COM7'
[java] '-Dremote.channel=26'
[java] '-Dremote.pan.id=3'
[java] '-Dspot.mesh.route.logging=false'
[java] '-Dspot.log.connections=true'
[java] '-Dspot.basestation.sharing=false'
[java] '-Dspotclient.addin.classes=com.sun.spot.client.command.spotworld.SpotWorldSpotClientExtension,'
[java] '-classpath'
[java] 'C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build;C:\Program Files\Sun\SunSPOT\sdk\lib\multihoplib_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\transducerlib_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotworldext_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotlib_host.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotlib_common.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\squawk_classes.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\RXTXcomm.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotclient.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\desktop_signing.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotworldext_spotclient.jar;C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop'
[java] 'org.sunspotworld.demo.TelemetryFrame'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] [radiogram] Adding: Server on port 42
[java] [radiogram]Removing: Server on port 42
[java] Accelerometer Reader Thread Started ...
[java] [radiogram] Adding: Broadcast on port 43
[java] [radiogram]Removing: Broadcast on port 43
[java] [radiogram] Adding: Server on port 42
[java] Received request from: 0014.4F01.0000.4D86
[java] [radiogram]Removing: Server on port 42
[java] [radiogram] Adding: Output to 0014.4F01.0000.4D86 on port 43
[java] [radiogram] Adding: Input from 0014.4F01.0000.4D86 on port 43
[java] Accelerometer scale is set to 2G
[java] Accelerometer zero offsets:
[java] 2G: 465.0, 465.0, 465.0
[java] 6G: 465.0, 465.0, 465.0
[java] Accelerometer gains:
[java] 2G: 186.0, 186.0, 186.0
[java] 6G: 62.0, 62.0, 62.0
[java] Accelerometer rest offsets:
[java] 2G: 465.0, 465.0, 651.0
[java] 6G: 465.0, 465.0, 527.0
[java] Accelerometer scale is set to 2G
[java] Accelerometer zero offsets:
[java] 2G: 465.0, 465.0, 465.0
[java] 6G: 465.0, 465.0, 465.0
[java] Accelerometer gains:
[java] 2G: 186.0, 186.0, 186.0
[java] 6G: 62.0, 62.0, 62.0
[java] Accelerometer rest offsets:
[java] 2G: 465.0, 465.0, 651.0
[java] 6G: 465.0, 465.0, 527.0
[java] Accelerometer rest offsets:
[java] 2G: 475.0, 471.0, 638.0
[java] 6G: 468.0, 469.0, 526.0

-post-host-run:

host-run:

BUILD SUCCESSFUL
Total time: 34 seconds

2. Beware of the red text area, it contains key information we need to execute Sun SPOT host side application without ANT. What we need to do is re-construct the parameters to a command. Finally, We get:

java -Djava.library.path="C:/Program Files/Sun/SunSPOT/sdk/lib"; -DSERIAL_PORT=COM7 -Dremote.channel=26 -Dremote.pan.id=3 -Dspot.mesh.route.logging=false -Dspot.log.connections=true -Dspot.basestation.sharing=false -Dspotclient.addin.classes=com.sun.spot.client.command.spotworld.SpotWorldSpotClientExtension, -classpath "C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop\build;C:\Program Files\Sun\SunSPOT\sdk\lib\multihoplib_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\transducerlib_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotworldext_rt.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotlib_host.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotlib_common.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\squawk_classes.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\RXTXcomm.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotclient.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\desktop_signing.jar;C:\Program Files\Sun\SunSPOT\sdk\lib\spotworldext_spotclient.jar;C:\Program Files\Sun\SunSPOT\Demos\TelemetryDemo\Telemetry-onDesktop" org.sunspotworld.demo.TelemetryFrame

3. Or, maybe you want to invoke the application from another Java application. Please use the command below:

"java -Djava.library.path=\"C:/Program Files/Sun/SunSPOT/sdk/lib\"; -DSERIAL_PORT=COM7 -Dremote.channel=26 -Dremote.pan.id=3 -Dspot.mesh.route.logging=false -Dspot.log.connections=true -Dspot.basestation.sharing=false -Dspotclient.addin.classes=com.sun.spot.client.command.spotworld.SpotWorldSpotClientExtension, -classpath \"C:/Program Files/Sun/SunSPOT/Demos/TelemetryDemo/Telemetry-onDesktop/build;C:/Program Files/Sun/SunSPOT/sdk/lib/multihoplib_rt.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/transducerlib_rt.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotworldext_rt.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotlib_host.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotlib_common.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/squawk_classes.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/RXTXcomm.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotclient.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/desktop_signing.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotworldext_spotclient.jar;C:/Program Files/Sun/SunSPOT/Demos/TelemetryDemo/Telemetry-onDesktop/\" org.sunspotworld.demo.TelemetryFrame"

4. This is the source code of Java invoker which invokes the Sun SPOT host side application without ant:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package simpleinvoker;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
* @author pdeng
*/

public class Main {

/**
* @param args the command line arguments
*/

public static void main(String[] args) {
try {
// TODO code application logic here
String line;
Process p = Runtime.getRuntime().exec("java -Djava.library.path=\"C:/Program Files/Sun/SunSPOT/sdk/lib\"; -DSERIAL_PORT=COM7 -Dremote.channel=26 -Dremote.pan.id=3 -Dspot.mesh.route.logging=false -Dspot.log.connections=true -Dspot.basestation.sharing=false -Dspotclient.addin.classes=com.sun.spot.client.command.spotworld.SpotWorldSpotClientExtension, -classpath \"C:/Program Files/Sun/SunSPOT/Demos/TelemetryDemo/Telemetry-onDesktop/build;C:/Program Files/Sun/SunSPOT/sdk/lib/multihoplib_rt.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/transducerlib_rt.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotworldext_rt.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotlib_host.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotlib_common.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/squawk_classes.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/RXTXcomm.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotclient.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/desktop_signing.jar;C:/Program Files/Sun/SunSPOT/sdk/lib/spotworldext_spotclient.jar;C:/Program Files/Sun/SunSPOT/Demos/TelemetryDemo/Telemetry-onDesktop/\" org.sunspotworld.demo.TelemetryFrame");
BufferedReader input =
new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
}
input.close();
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
}

没有评论: