Home

eWON Java Toolkit User guide

image

Contents

1. 1 3 Page 15 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 Build your project From the Project panel again right click on the project name and select Build Projects 4l x Files Runtime i B EWON Hello World A default pack new HelloMain Build Project REM you can also select Clean amp Build Project Build execution will take place and a build report is produced in the Output panel Bellow is a typical output Building jar C eW0N JAVA eWON Hello World dist eWON Hello World jar Generated C XeWO0N JAVA eWON Hello Waorld dist yeWON Hello World jar is 817 bytes post jar BUILD SUCCESSFUL total time O seconds The red warning reported is not relevant with eWON as already explained the eWON does not use midlet Netbeans considers this as a problem but it is not Build Successful on the other hand is required Transfer application to the eWON From the Project panel right click on the project and select Deploy Project Projects 4 x Files Runtime la HellaMain java B EWON Hello Worle s Mew Ld default pack HelloMain Build Project Clean amp Build Project Clean Project Generate Javadoc The Output panel will report the transfer status You can control the transfer of both JAR and JAD files PRI 0002 0 EN eWON Java Toolkit User
2. PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 CeWON Projects 4 x Files Runtime i eWU N Hello Worl H default packa H i HelleMain j Build Project Clean amp Build Project Clean Project Mew Generate Javadoc Deploy Project Run Project Debug Project Wn E Dir L1 n EL Project execution takes some time to start Don t worry In case there is a problem check the eWON s events txt file and the eWON s Realtime log files You should have more information about the failure reason You should also check the Netbeans Output panel for diagnosis In case all works you should end on your breakpoint public static void mainiS5tring arga 1 5 gt aystem out printlni Hello World You can inspect variables step in your program install new breakpoints Move your mouse on the debug toolbar to check all the options gt a ll d Ga 25 c VW wv E Wael WANE The emulator will lways try to restart the program in case you y launch a new debug session Yet it is always a good idea to 2 Reset a running program before you start a new one Now click on the Continue button an check the eWON Real time log You will see the System out println PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 18 31 veWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference
3. rdport 2800 rheapsize 1M ftpuser adm ftppassword adm Ti TECTA 10 0 0 53 must be replaced by your eWON IP address This example also supposes that the administrator default username and password has not been changed Explanation of the parameters for this example rclasspath usr eWON Hello World jar This is the JAR containing the application It is passed as an argument to the eWON for execution remain HelloMain This is the JAVA class containing the main function You will create it in the next step httpuser adm EWON user for remote JAVA execution adm In the eWON configuration the user must have user s right to control JAVA httppassword adm Password of the administrator see eWON Emulator reference on VveWweN PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 13 31 CeWeN PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 page 26 Deploying The deploying panel is used to configure application s FTP transfer to the eWON Select Deployment Method File Transfer Protocol FTP v Override JAR URL in JAD dist jar 4 dist jar will be replaced by the real jar name Server 10 0 100 54 Port a1 Target Directory usr Separatori User Name adm Password oon All parameters should be configured according to the eWON s user used for transfer The Target Directory selected here can be changed to any other d
4. 31 VeWweN l guide _1_ 9 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 Execute application manually using Web interface JAVA execution can be manually started through the eWON web interface by calling a specific web form This mode of operation is normally reserved to Netbeans when the Netbeans IDE needs to start or stop the application remotely You can start execution of the JVM by typing the execution URL directly in a Web browser http 10 0 0 53 rcgi bin jemcCmd zcmd start amp runcmd heapsize 1M classpath fusrfeWON Hello wor gt To run the Hello World application the following command must be typed http 10 0 0 53 rcgi bin jvmCmd cmd start amp runCmd heapsize 1M classpath usr eWON Hello World jar emain HelloMain Important 10 0 0 53 must be replaced by your eWON IP address The Web form is jvmCmd and the parameters are e cCcmdestart start the JVM e runCmd heapsize arguments to pass to the JVM as follow heapsize 1M Memory allocated to JVM classpath usr eWON Hello World jar Path to application classes repository emain HelloMain Name of class with main function This is a short summary of the JVM possible arguments please see JAVA Virtual Machine JVM arguments on page 30 for more informations on JVM parameters Configure application execution at eWON boot time During eW
5. Information Mod date 05 06 2012 Real time log ewe All sources lt lt Previous Page Next Page gt gt Time Source OS 082007 22 22 05 Jy Hello World lt lt Previous Page Next Page gt gt In the eWON s events log you can also find information about the JVM execution Event log ee All Events m Reporting Level Per Pa lt lt Previous Page Next Page gt gt Time Event 6 08 2007 14 20 38 1073774552 jemitF Jvf Stopped Jv execution time 14 sec O 6 oaf2007 14 20 24 1073774551 jemitF JvT Starting HelloMain Transfer application manually in the eWON no IDE At one time in the development cycle you will need to get rid of the IDE when the application development is finished and your application must work in production When you have executed the Build Project in Netbeans see Build your project on page 16 Netbeans has produced the 2 JAR and JAD files If you look at the directory structure produced by Netbeans you will find a dist directory in your project directory Folders Mame A ewoON JAYA Ed ewON Hello siarld jad O ew ON Hello World Bj eWwOh HelloWorld jar m nbproject 3 src E The dist for distribute directory contains the final output files of your project You can download these files manually to the eWON usr or any usr subdirectory you choose and then execute this application PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 19
6. There is no distinction between these two arguments they are proposed for compatibility with the various IDE and debug situations REM the application JAR file passed as Xdescriptor argument implied by JAD is automatically added to the proxy classpath Example arguments passed to emulator during the Hello World debug session Arg 0 C javaetk bin emulator exe Arg 1 Xdevice eWON Arg 2 Arg 3 Xdebug Arg 4 Arg 5 ewonipaddr ATqLolt 20050 53 Arg 7 t rclasspath Arg 8 usr eWON Hello World jar Arg 9 remain Arg 10 HelloMain Arg 11 httpport Arg 12 80 Arg 13 httpuser Arg 14 adm Arg 15 httppassword Arg 16 adm Arg 17 rdport Arg 18 2800 Arg 19 rheapsize Arg 20 1M Xdescriptor C eWON JAVA eWON Hello World dist nbrun6653 eWON Hello World jad Xrungdwp transportedt Socket server y csuspend y address 13356 WON Java Toolkit U id Page 29 31 VveWwWeN e ava Toolkit User guide Appendix JAVA Virtual Machine JVM arguments This appendix describes the parameters available to configure JVM execution This list of arguments is also called the JVM Run Command The JVM execution can be started by one of the following means Using the eWON HTTP server by using the jvmForm see Configure application execution at eWON boot time on page 20 By creating a jvmrun file in the eWON usr root directory see Configure application execution at eWON boot
7. cccccsecsseceeesseeseeceeceeeeeteeeeeeteeeeeeseeeeseaesseaenseaeseenersees 10 Create the Hello World project ccccccccccceeeceeeceeecececeeeceeeseeseeecaeeseeeaeeeseeegeseeseeseeaeeaeseeaeegess 10 Configure the Project ProODertleS uccisi oec ceutncauneavelbad Cava Dad edd c oaov rte caet dud ped 06s d Gud ad sei pad de 11 94 02 JEE 12 ziusliseE 13 Briefe ilio NER TOR warencaues 14 Create your JAVA Proje Ci m TT T H 14 PULO OUI DO CU raa o E E E A A 16 Transfer application to the eWON s ensnnsnnnnennennnnsrnnronrsernrsrrnrrrrsrrnrsrrsrerrerrrrsrrererrerenrerrererrerrnrne 16 SD Ul AD OC O NOE 17 Transfer application manually in the eWON no IDE cece eceecceecceeeceeeceeeeeceeeeeeeeeeeseeeeaeeaes 19 Execute application manually using Web Interface cccccccseccseceeseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeaess 20 Configure application execution at eWON boot time seseeseeseesnm 20 WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 1 31 CeWeN PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 uniri i m P 21 Create a J2ME application manually eesseeseesssssesseennenm meme nennen 21 FDIC U
8. guide 1 3 Page 16 31 VeWweN l guide _1_ 9 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 deplowy ftp Creating directory PUSE sending files transferring C eW0N JIAWVA eWON Hello World dizt eWON Hello World ja transferring C eWON JIA4WVA eWoN Hello World dist xeW N Hello World ja e files sent Updating property file C eWON JAVAeWOM Hello World nbproject ipric uar Using an FTP client you can log on the eWON and check in the usr directory that both file are present Remote Site ust Filename Filesize FileEvp D Hew Hello World jad 203 MIDP J al ew OM Hello world jar Gl Execute Debug application First place a breakpoint in the program on the System err printIn Hello World line Click in the margin to toggle the breakpoint public ztatic void mainistring args 1 O aystem out println Hello World OA EE Always place breakpoint on valid lines any remove any breakpoint y in files which are not up to date or not in your project n The system behave strangely in that case Typically the debug starts and then stop immediately with SUCCESS yet the program never starts From the Project panel right click on the program name and select Debug Project PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 17 31 VeWweN l guide _1_ 9 CeNWOeN PRI Name eWON Java Toolkit User guide
9. of defines to locate your application your java toolkit a 1 5 version is used here The lavaetk library is also located WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 22 31 veWweN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 Build library a Compile the java files JSDK Njavac target 1 4 source 1 4 g classpath CP d tHLIB bin HLIB src lib HelloPrint java Compiler here is version 5 so force 1 4 compatibility Classpath path to the javaetk library IMPNG classes eWON When building the apps we will add the HelloLibrary to this path d HLIB bin output directory unverified class binaries HLIB src lib HelloPrint java path to one java file to compile must be called for each source file b Verify the compiled class files SJAVAETK S bin preverify exe classpath CP d SHLIB S verified SHLIB bin d HLIB verified output directory This is the root to all verified class files HLIB bin root of packages to verify Please note that we do not pass bin lib The whole tree is verified c Create JAR file for library SISDKS jar cf SHLIB deployed HelloLibrary jar C SHLIB S verified lib HLIB deployed HelloLibrary jar the library we want to build C HLIB verified lib change directory to HLIB verified and add the lib directory to the jar file The output of this process is the HelloLibr
10. panels require configuration Creating JAR Running Deploying S Libraries amp Resources EZ Pt Ubfuscating Vial Creating JAR Re Signing Generating Javadoc k Running XB Deploying Creating JAR JAD File Mame ewoOM Hello World jad JAR File Mame ewon Hello World jar Compress JAR This panel does not actually requires any modification but it is interesting to see that during the project build process 2 final files will be created eWON Hello World jad and eWON Hello World jar All J2ME application contains these 2 files which need to be downoaded to the eWON for execution veWeN PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 12 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 Running This panel is used to configure the eWON Emulator The emulator is an program used by all J2ME IDE environments not only Netbeans to create an interface between the IDE and the eWON itself For more information about the eWON Emulator program see eWON Emulator reference on page 26 Regular Execution Specify the Security Domain Execute through OTA Over The Air Provisioning For this example application enter the following emulator line ewonipaddr 10 0 0 53 rclasspath usr eWON Hello World jar remain HelloMain httpport 80 httpuser adm httppassword adm
11. 6 2012 NOMS The platform name is part of the project parameters So although you can choose any name it is better to keep the same platform name favaetk so P that you don t need to reconfigure the project when moving between Netbeans installations Develop a JAVA application for eWON The Hello World application is a simple example that shows how to create build debug and execute a project We will explain step by step how to proceed in this chapter Create the Hello World project From the Netbeans IDE select File New project Then from the project Wizard select Mobile and Mobile Class Library Categories ae pen ig General i web Enterprise i eM J Netbeans Plug in Modules P Import Wireless Toolkit cl E Import Mabiliby Studio Project Samples NOMS As explain in J2ME deviations in the eWON at page 25 the eWON does 2 not use midlet this is why you need to create a Mobile Class Library and not a Mebile Application At next Wizard step select a project name and a folder to locate your project root With Netbeans all files of the project will be stored in a folder tree with the same name as the project WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 10 31 veWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 Same and Location Project Name
12. O TNS SAY C810 LERNEN TRI E 21 Build to library and ApPpliCAtiON ccc ccc cec secs ecceeceececeeeeeceecseeseeseeceeeeeceeceessecesseeeeeseeeeaeeeesenseaees 22 DUNG CMa MMOD UCI OM RENE MTM 22 PUGU y m P TTTEPE E 23 P ASAP ICO M TET EE 23 Merge multiple JAR in a single JAR ccc cec cece ceeceeec sete eeeeeceeeeeeeeeeeeeseeeaeeseeeaeeseeeseeseeeeeeseeseeaess 24 WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 2 31 veweN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 Introduction J2ME and the eWON The eWON JAVA toolkit is designed around the J2ME JAVA Micro Edition technology J2ME has been introduced for resource constrained mobility devices like GSM The eWON is such a device and the TCP IP connectivity at the heart of the JAVA technology is well suited to the eWON environment The J2ME is also very interesting for the eWON because it separates very strongly the user s application from the eWON kernel application while at the same time providing performance and flexibility for the user s application eWON JAVA development Platform Target citi D velappent System Gf NetBeans IDE 5 5 1 n javaetk TCP IP Debug Gowniead link Appkcatian FTP transicr Bl MyApplication MyApe JAR config txt SE data tar Y Per ur ere The JAVA application is cod
13. ON startup the eWON search for a file calld jvmrun in the following directories e dev e dev oem e sys WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 20 31 CeWeN PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 e usr Actually usr is the more common place as the dev are reserved for manufacturer applications and sys is normally reserved for eWON configuration jvmrun syntax The jvmrun file is a text file with one or more lines If file s line starts with a character it is considered as comment line and is skipped The file s line not starting with a is considered as the JVM Run Command and is passed for JVM execution oee JAVA Virtual Machine JVM arguments on page 30 for more informations on JVM parameters Example of jvmrun file content d jvmrun file place it in usr This file will trigger execution of the JVM at boot time watchon heapsize 1M classpath usr eWON Hello World jar emain HelloMain Create a J2ME application manually The previous paragraph has explained the normal procedure to build a JAVA project for the eWON This paragraph will explain with an example how to create a project with the SUN JDK and the javaetk only This is interesting for those who want to automate some tasks or those who want to understand the process handled internally by Netbeans Important the files described in this example are bundled in the jav
14. VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 eWON Java Toolkit User guide Summary Explains how to install the JAVA developpment environment and how to create and debug an application for the eWON with JAVA Table of content Introduction J2ME and the CWON cc ccceccecceeceeeseeeeeeeseceeceneceeeseeteeceeeeeesseeseeeeeteeteeeegetseseeeneaes 3 eWON JAVA development PlatfOrm cccccceccecceeeceeceesseeeeeteeseeeeeeceeeeeeeeeeeeetseeeneteeeeteegersenenseness 3 Typical development work flOW cccceccsceceeeeeccseceecseeceeseeteeceeeeecseeeseeseeteeteeeeseteeseeeteeeseegeneenees 5 Installing the JAVA CNVIFONMENL ccc cccecceeceeceece eee eceeeeeeseeseeseeseeseeseeceeeeeeeseeeeeeseeeeeeseseeeseseeaes 6 luc H 6 STH ING EOC STIS usstepverscsappeU A STEPS Im saint peed name UEM MM IU D M I sant PIC C M RPSL PH EU dIE T BS OLA INCU CAMS ROTE 8 Install the eWON JTK ccc ccececceeeceeceeesseceeeeseceeseeeeeeseeteeeeeeseeseeseeeeeeeaeseeeeneteeeeeteeeeeseeeneeneneees 8 Install the javaetk toolkit on your SYStOM ccc cccccc ccc eeeeeeceeceeeeeceeteeceeceeeeeeeeeseeeueseeseeteeaeeeeseaeees 8 Configure the eWON toolkit in NetBeans cc ccccccecceccseeceeeeeeeeceeeseeeeeeseeeeeeeeeaeeeseeeeeeseeess 9 Develop a JAVA application for CEWON
15. aetkprj zip file Directories layout In order to simplify the example the following directory structure has been used VveWweN PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 21 31 veWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 EHE evade I bin 9 deployed src L3 apps O verified HelloLibrary I bin 9 deployed src lib 9 verified There are 2 projects one for the library and one for the application In each project we find a number of directories e src contains the source tree The application is in an apps package The library is in a lib package e bin contains the compiled files In J2ME the files must be verified after they have been compiled So this directory contains the result of the javac tool but cannot be used directly in the device e verified contains the files produced by the preverifier The preverifier is provided with the javaetk it works on the files produced by the javac compiler and it produces files that can be used in the J2ME device e Deployed this directory will contain the JAR files these JAR files are produced by the JavaSDK JAR tool e build cmd this is an MS DOS command file that Build to library and application Build cmd introduction The build cmd is the batch file used to compile the library and the application The batch starts with a number
16. ary jar located in the deployed directory Build the application a Extend classpath set CPAPP CP SHLIB S deployed HelloLibrary jar Classpath for application must include library we created before also WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 23 31 veWweN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 b Build the application JAR JSDK Njavac target 1 4 source 1 4 g classpath CPAPP d SHEBD bin SHEBD NsrcNappsNHelloEverybody java SJAVAETK S bin preverify exe classpath CPAPPS d SHEBD S verified tHEBD bin S JSDK Njar cf SHEBD deployed HelloEverybody jar C HEBD Nverified apps The process is exactly the same as for the library The only difference is the classpath used which includes the library The output of this process is the HelloLibrary jar located in the deployed directory Merge multiple JAR in a single JAR The single jar cmd batch file shows how to bundle the HelloLibrary jar and HelloEverybody jar into a single HelloFull jar file The command file starts with the same defines defined in the build cmd file Then the batch moves to the HelloEverybody deployed directory Then the following 3 lines SJSDK Njar x HLIB NdeployedMHelloLibrary jar SJSDK Njar x lt SHEBD deployed HelloEverybody jar JSDK Njar cf HelloFull jar lib apps Will first extract both JAR file
17. d as a ZIP file with a tree of files that must be extracted at some place on your system s Local Disk C c Documents and Setting docs 7j ewonlib O lib _ Pragram Files WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 8 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 Configure the eWON toolkit in NetBeans Inside Netbeans you must install support for creating applications for the eWON This support is provided by the JAVA eWON Toolkit javaetk From the Netbeans editor select Tools Java Platform Window Help Add to Palette 1 Internationalization i I l Java Platforms N Rint namne Ml rr Then from the main dialog select installation click Add Platform button Steps Select platform type 1 Select platform type 2 Platform Folders Select platform type to install 3 Detected Platforms Java Standard Edition Custom Java ME MIDP Platform Emulator Java ME CDC Platform Emulator Then select installation of a Java ME MIDP Platform Emulator though eWON is not MIDP but IMPNG In the next step you need to browse your disk and select the folder where you have unziped the javaetk WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 9 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 0
18. e port number on which the eWON JVM will wait for a remote debugging connection During normal debugging this port is managed and defined by Netbeans but in case the user wants to for a specific port this option can be used This option is only relevant if debugger is specified Default 2800 CeWON eWON Java Toolkit User guide Rev 5 2s0 Page 30 31 JAVA Virtual Machine JVM arguments heapsize N heapsize Nk heapsize Nm N is the amount of memory allocated to JVM execution This memory will be used to store JAVA classes and user allocate variables The trailing k or m can be used to specify the heap size in kilobytes or megabytes A 1MByte size is a minimum for a normal execution Out of memory errors exceptions will be reported during JVM execution in case the heap size is too small Default 64KBytes classpath CP C is the eWON JVM classpath CP should not contain any space The classpath is a list of JAR files or class files separated by Each path must be an absolute path All paths are case sensitive Classpath maximum length is 1048 characters Example of valid classfiles usr MyApp jar usr MyApp jar usr lib MyLib jar usr MyApp class usr lib MyLib jar Default none emain MC MC This is the name of the JAVA class of the user s application containing the main function Only the name of the class must be specified and is case sensitive Default none CeWON eWON Java To
19. ed and debugged using the Netbeans IDE WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 3 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 X NetBeans Netbeans is a free project provided at www netbeans org and supported by ORACLE The Netbeans IDE support is followed at eWON and the latest version tested is version 7 1 2 at the time this document was written In case you have problems with a more recent version please contact support ewon biz The NetBeans editor will use the Java ME environment You should check the NetBeans index page to check which version of NetBeans is required to support the Java ME environment At the time this document was written the full version was required NetBeans IDE 7 1 2 Download 7 1 1 7 2 Beta Development Archive mail address optiona Lucis English x Platform Windows D Subscribe to newsletters v Monthly E Weekly Note Greyed out technologies are not supported for this platform V NetBeans can contact me at this address NetBeans IDE Download Bundles Supported technologies Java SE Java EE C C PHP All D NetBeans Platform SDK 9 amp U Java SE e a U Java FX e e U Java EE 9 amp D Java Card 3 Connected C C e Groovy D PHP e Bundled servers U GlassFish Server Open Source Edition 3 1 2 D Apache Tomcat 7 0 22 Download Download Dow
20. evelop and build your application with NetBeans e Download your application from NetBeans using FTP transfert e Debug you application with NetBeans using all facilities o breakpoint o watches o Step by step PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 5 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 O e Download your final JAR in the eWON usr partition e Create a jvmrun text file in the ewon usr directory to autorun your JAVA application at eWON boot time Installing the JAVA environment AeH Even if another JAVA JDK or Netbeans version is installed these eWON compatible versions can be installed as well Multiple versions can coexist and have their own configuration The JAVA IDE recommended and supported for developing J2ME applications on the eWON is NetBeans www netbeans org Please install the NetBeans IDE with Java ME plugin before you can start installing the eWON JAVA Toolkit When this environement is installed you will have to install the JAVA ETK itself Install JDK If you want to use the NetBeans environment you will at least need a 1 6 compliant JDK environment Launch WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 6 31 veWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 ie Java Setup Custom Custom Set
21. ewON Hello World Project Location CigWON JAVA Project Folder Cile WON JAVATewWONMN Hello world At next Wizard step select the eWON s Emulator Platform javaetk The other options are implied by this choice Default Platform Selection Emulator Platform javastk Device eiA ORN Device Configuration CLDC 1 1 Device Prafile e IMP NiG Aei eWON currently provides a CLDC 1 1 IMP NG 1 JSR 075 compatibility 2 This implies a set of JAVA libraries available for development When the project Wizard ends you will find your empty project in the Projects tree Projects 3l x Files Efe EWON Hello World PE defaulE package gt Configure the Project Properties The project properties must be setup correctly to enable download and debug of the application in the eWON From the Projects tree right click on the project name and select the Properties from the context menu WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 11 31 VveWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 Projects 0 Files Runtime 5 ewON Hello world H3 zdefault pack en Build Project Clean amp Build Project Clean Project if ss ait animate Di ha artic m ett atte U Refresh Folders LLL r as el ee ee au An m z ys d From the properties panel only 3
22. he IDE and the eWON itself Every J2ME device must have their own emulator exe program This program has a standard command line interface defined in the Universal Emulator Interface specification see also http java sun com j2me docs uei specs pdf An UEI emulator is at least defined to provide remote debugging capability between the IDE and the J2ME device An emulator program is required for remote debugging because the standard debug interface in JAVA is JPDA using the Java Debug Wire Protocol JDWP but J2ME has defined an other debug protocol for resource constrained devices called KDWP The emulator will act as a JPDA compliant server for the Netbeans IDE and will connect to the eWON JVM when required using the KDWP protocol ml NetBeans IDE 5 5 1 i C 5 Emulator exe Javaetk UE Emulator protocol KDWP protocol eVvWON JAVA Virtual Machine The javaetk emulator also provides additional functionalities like e Start remotely the JAVA application 1 UElis a standard for interaction between IDEs and device emulators IDE vendors who implement the UEI specification know that their products will work with a wide variety of device emulators Device manufacturers who implement the UEI specification in an emulator are assured that their emulator will work with a wide variety of development tools veWeN eWON Java Toolkit User guide Rev 5 2s0 Page 26 31 eWON Emulator reference e Download t
23. he application in the eWON though FTP REM in Netbeans there is a deploy tool that provides an ftp client so emulator is not used for application transfer The emulator is a command line program it has not GUI and does not produce any output when called wit no argument When emulator version is called it produces the following OF uc amp rzxlnrn G Configuration CLDC 1 1 Here are the emulator poss ible arguments EWON specific arguments are described here refer to the UEI specification also for more information about standard paramters Argument Description Standard UEI parameters help Display simple help version Xquery Xdescriptor Xdebug Xrunjdwp Advanced arguments nokill advanced When the emulator program starts it checks if another occurrence of the program is running and tries and kill this occurrence This is very useful in case the user starts a new debug session while another is pending The nokill argument prevents this behavior REM Multiple emulator exe running may have unpredictable result nojvmstop advanced When the emulator starts a new debug session in the eWON it will first send a Stop to the eWON to prevent the eWON from hanging when a new run is requested This argument prevents this behavior debugemu advanced emulator will produce a debugemu txt file in its own directory with debug information T
24. his option may be useful to debug all commands passed by the IDE to the emulator javaproxy advanced veWeN eWON Java Toolkit User guide Page 27 31 Rev PRI 0002 0 eWON Emulator reference The emulator can use 2 proxy implementations e KVMDebugProxy win exe is a windows application e kdp jar is a JAVA implementation The default is to use the Windows application but JAVA version can be used instead REM the proxy is the actual application that provides the JDWP to KDWP translation ewonipaddr IP required IP is the eWON remote IP address the emulator will use to connect to the eWON FTP client arguments related to the emulator embedded FTP client for program transfer These arguments can be omitted if FTP transfer is not required ftpport P P is the ftp port Default 21 ftpuser U U is the user that will be used to connect to the eWON FTP server User U must have FTP access Default adm ftppassword P P is the password used by the FTP client to connect to the eWON Default adm ftppassive If specified the FTP client with use PASIVE mode for FTP transfert Default passive mode not used ftpdnl S D S is the source file path on the local disk D is the destination path on the eWON ftp server ftpdnl specify one file to transfert ftpdnl can by specified up to 10 times in the command line so up to 10 files can be transfered If ftpdnl is not specified in the co
25. irectory but in that case the emulator command must be changed also see rclasspath Create your JAVA project Until now we have only created the project container and confiugred it we will now actually create the JAVA code From the Projects panel select the lt default package gt and rght click to create a new Java Class WON PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 14 31 veWeN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 Projects x Files Runtime 3 B ewWOM Hello World Ed xdefaubpac a gt File Folder Compile Package F9 Java Class Find Ctrl F sg visual MIDlet MIDlet eae Che 3 Mobile Client And call it HelloMain Same and Location Class Name HelloMain Project ewW OM Hella world Location Source Packages Created File WON JAYAewoON Hello WorldisreyHelloMain java For the purpose of this example the application will only output a single Hello World to the eWON real time event Enter the following code in editor public class HelloMain Creates a new instance of HelloMain i public HelloMain public static void Main String args sSystem out printlni Hello World Only the surrounded part has to be typed the rest is generated automatically by Netbeans class wizard VveWweN PRI 0002 0 EN eWON Java Toolkit User guide
26. mmand line thenthe FTP transfer operation is skipped and none of FTP Client parameters are used HTTP client argument The emulator uses HTTP for JVM remote commands start stop invocation so these parameters are required httpport P HTTP port to communicate with the eWON Default 80 httpuser U U is the user used for HTTP forms invocations User U must Control Java JVM access Default adm httppassword P P is the password for the httpuser Default adm Remote JVM configuration parameters As described in JAVA Virtual Machine JVM arguments on page 30 the JVM need a number of arguments to run CeNWeN eWON Java Toolkit User guide Page 28 31 Rev PRI 0002 0 eWON Emulator reference These arguments are forwarded by the emulator rheapsize S Heap size allocated to the remote JVM S is passed as is to heapsize parameter rclasspath CP Class path passed to the remote JVM CP is passed as is to the classpath parameter remain E Class containing the main function passed to the remote JVM E is passed as is to the emain parameter rdport P P is the remote port passed to the eWON for debug connection passed to the port parameter classpath CP pclasspath PCP CP PCP is a path passed to the emulator debug proxy as cp parameter The Debug proxy needs a complete path to all the classes used by the remote application to provide the debug feature
27. nload Download Free 73 MB Free 167 MB Free 49 MB Free 47 MB You can also install a lighter version of NetBeans and add the required JavaME plugin after installation via the NetBeans Tools Plugins menu When that option is selected you must select the correct plugin in the Availlable Plugins tab VveWweN PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 4 31 CeWON PRI Name eWON Java Toolkit User guide Since revision 5 2s0 PRI Number PRI 0002 0 Build 75 Preliminary Reference Information Mod date 05 06 2012 CJ Plugins Select Name Category Active NetBeans Plugin Development Developing NetBeans JavaFX 2 Support JavaFX 2 e Version 4 Source l Java ME SDK Tools e I Java Java SE ml lava Persetenre lava SF P Dh inn A special Java ME Platform must be configured in NetBeans to support the specific eWON target This is also done via the Tools menu from the NetBeans IDE Me Eclipse users Although eclipse is a fine environment for JAVA development we checking the compliance of the eWON toolkit with that environment though you can try and use it Me NetBeans version and this documentation Some screenshots in this documentation may be related to previous versions of NetBeans as long as P it remains applicable Typical development work flow CeWON e D
28. olkit User guide Page 31 31 Rev PRI 0002 0
29. s in the deployed directory rebuilding the trees and merging them Then the last line will recreate a HelloFull jar containing the ib and the apps packages VveEeWeN PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 24 31 Appendix J2ME deviations in the eWON CeNWeN The J2ME in the eWON has some deviations compared to J2ME standard The language itself is conform to the J2ME CLDC1 1 and IMP NG 1 0 all classes defined by these standard and all features of the language are conform The specificity is related to the following aspects e Application Midlets A standard J2ME application is derived from the Midlet class multiple midlets can run at the same time they can be started or stopped In the eWON there is no midlet An application is started like a standard JAVA application by passing a class with a main function to the JVM Only one application can run at a given time Threading is supported so multiple threads can run in the application e Application encryption and signature The eWON does not support the standard application signature with RSA certificates specified for the J2ME platform An equivalent signature mechanism is provided but it is not a standard mechanism with regards to the J2ME standard eWON Java Toolkit User guide Rev 5 2s0 Page 25 31 Appendix eWON Emulator reference The emulator is a program used by all J2ME IDE environments not only Netbeans to create an interface between t
30. time on page 20 By using the com ewon ewonitf RuntimeControl configureNextRunCommand JAVA function see JAVA Doc When the JVM is started it receives a number of argument to configure JVM execution The following arguments are defined watchon This command is related to the eWON JAVA watchdog mechanism When watchon is specified the JAVA watchdog is enabled with a timeout of 1 minute The watchdog can be reconfigured or disabled with the functions in com ewon ewonitf RuntimeControl but if it is not reconfigured com ewon ewonitf RuntimeControl refreshWatchdog must be called by the user s application at least one minute after the JVM was started Please see the JAVA Doc for more information about watchdog Default no watchdog debugger This option is used with the eWON must listen for a debugger remote connection This function is normally only used by Netbeans REM this option implies the suspend option bellow If suspend is not required nosuspend must be specified Default no debugger suspend This option force the JVM to be suspend after startup to wait for debugging connection This is only used with debugger and is implied by the debugger option Default true if debugger specified false otherwise nosuspend This option will release execution of the program when debugger option is specified and will not stop the JVM until the remote debugger is connected Default false port N N is th
31. u i amp Sun Select the program features you want installed The Javal TM SE Runtime Environment with support For European languages will be installed Select optional Features to install From the list below Feature Description Java TH SE Runtime Environment The JavatTM SE Runtime Additional Languages Environment with European Default Java Far browsers languages This requires 143MB on Additional Font and Media Suppart your hard drive Install ka C Program FilestJavatjrei 6 0 02 Install Netbeans Either install the full NetBeans bundle or install a basic NetBeans version and add the Jave ME plugins From the Tools Plugins menu PRI 0002 0 EN eWON Java Toolkit User guide 1 3 Page 7 31 VeEeweN l guide _1_ 9 veWweN PRI Name eWON Java Toolkit User guide PRI Number PRI 0002 0 Preliminary Reference Information Mod date 05 06 2012 CJ Plugins anti ke Select Name Category F Netbeans Plugin Development Developing NetBeans F n 2 Support JavaFX 2 e Version m i Source F Java Java SE v r1 lava Bereietenocns lava SF EL Bhinin Running NetBeans Netbeans can be launched with the NetBeans icon or from the start menu If you have previous settings you are proposed to import them but starting from scratch is recommended for compatibility with this manual Install the eWON JTK Install the javaetk toolkit on your system javaetk is the eWON Java toolkit it is provide

Download Pdf Manuals

image

Related Search

Related Contents

Severin BA 3257  取扱説明書 - 武蔵 株式会社 ホームページ      Samsung PS-42S5H دليل المستخدم  Gerador Funções para PC PCG10 / K8016  NSA-03 - BeatSonic USA  Manual de Usuario - Fidely.Net System  Lincoln Electric IM481-B User's Manual  Getting Started - Scenario Design Center  

Copyright © All rights reserved.
Failed to retrieve file