This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 152719 - Mobile: Clock NB Sample application runs but hands do not tick.
Summary: Mobile: Clock NB Sample application runs but hands do not tick.
Status: VERIFIED WONTFIX
Alias: None
Product: usersguide
Classification: Unclassified
Component: JavaFX (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P3 blocker (vote)
Assignee: Michal Skvor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-07 18:31 UTC by Lark Fitzgerald
Modified: 2009-01-22 11:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2008-11-07 18:31:08 UTC
NB promoted installer #33 (SDK:B47), jdk 1.6_10

Attempt to run Clock Sample as a 'Run in Mobile Emulator' fails.

1. Start NB
2. File New Project > Samples > JavaFX > Building Blocks > Input > Clock
3. Next
4. Finish
5. File > Project Properties > Clock
6. Select Run Category
7. Select Run in Mobile Emulator
8. OK
9. Run > Run Main Project

The sample runs and shows the clock but the hands do not reset to proper time, nor do they move so animation fails.  
The output window shows:

init:
deps-jar:
using profile: MOBILE
Java compilation
nothing to compile
JavaFX compilation
executing commandline: [C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0\bin\..\bin\javafxc.exe, -profile, 
mobile, -target, 1.5, -g, -classpath, ;C:\Users\Lark\Documents\NetBeansProjects\Clock\build\compiled, -d, 
C:\Users\Lark\Documents\NetBeansProjects\Clock\build\compiled, 
@C:\Users\Lark\Documents\NetBeansProjects\Clock\build\javafxc59154sources]
MIDlet Generation
executing commandline: [C:\Program Files\Java\jdk1.5.0_16\bin\javac.exe, -target, 1.5, -g, -bootclasspath, C:\Program 
Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0\bin\../lib/mobile/javafxapi-cldc.jar;C:\Program Files\NetBeans 6.5 RC2
\javafx2\javafx-sdk1.0\bin\../lib/mobile/cldc_1.1.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/midp_2.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr135_1.1.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr172_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr177_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr184_1.1.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr226_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr234_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr75_1.0.jar;, -cp, C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/shared/javafxrt.jar;;C:\Users\Lark\Documents\NetBeansProjects\Clock\build\compiled, -d, 
C:\Users\Lark\Documents\NetBeansProjects\Clock\build\compiled, 
C:\Users\Lark\Documents\NetBeansProjects\Clock\build\generated\input\Clock_MIDlet.java]
WARNING: following file/directory does not exist: C:\Users\Lark\Documents\NetBeansProjects\Clock
bytecode mangling
ApplicationMapper: 6 packages, 6 classes visited
bytecode preverification
executing commandline: [C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0\bin\..\emulator\bin\preverify.exe, -
classpath, C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0\bin\../lib/mobile/javafxrt-stub-cldc.jar;C:\Program 
Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0\bin\../lib/mobile/cldc_1.1.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2
\javafx-sdk1.0\bin\../lib/mobile/midp_2.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr135_1.1.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr172_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr177_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr184_1.1.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr226_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr234_1.0.jar;C:\Program Files\NetBeans 6.5 RC2\javafx2\javafx-sdk1.0
\bin\../lib/mobile/jsr75_1.0.jar;, -d, C:\Users\Lark\Documents\NetBeansProjects\Clock\build\verified, 
C:\Users\Lark\Documents\NetBeansProjects\Clock\build\optimized]
WARNING: following file/directory does not exist: C:\Users\Lark\Documents\NetBeansProjects\Clock
copying: src into: C:\Users\Lark\Documents\NetBeansProjects\Clock\build\verified using filter: RESOURCES
copying: src\input into: C:\Users\Lark\Documents\NetBeansProjects\Clock\build\verified\input using filter: RESOURCES
MIDP Jar packaging
Jad generation
compile:
jar:
standard-run:
browser-run:
jws-run:
midp-run:
Device name is not set. Using -Xdevice:DefaultFxPhone1 option.
Hint: Use -Xquery argument to see all supported devices.

Log created.
isDoubleBuffered() = true
extraBackBufferEnabled = false
---> FXRunner.run
Setting PULSE_DURATION to 50 hz
Using Pisces Renderer (native version)
<--- FXRunner.run
Log closed.
run:
BUILD SUCCESSFUL (total time: 1 minute 20 seconds)

Nov 6, 2008 6:20:48 PM ClientCommunicatorAdmin restart
WARNING: Failed to restart: java.io.IOException: Failed to get a RMI stub: javax.naming.NameNotFoundException: device-0
run:
BUILD SUCCESSFUL (total time: 21 seconds)
Comment 1 Michal Skvor 2009-01-06 14:34:02 UTC
This is issue in mobile runtime.
Comment 2 Alexandr Scherbatiy 2009-01-20 11:45:40 UTC
It is because the calendar.get( Calendar.SECOND ) and calendar.get( Calendar.MINUTE )
function returns 0 on the Mobile platform.
---------------------------------------------------------------------------
                action : function() {
                    var calendar : Calendar = Calendar.getInstance();
                    seconds = calendar.get( Calendar.SECOND );
                    minutes = calendar.get( Calendar.MINUTE );
                    hours = calendar.get( Calendar.HOUR_OF_DAY );
                    println("hours: {hours}");
                    println("minutes: {minutes}");
                    println("seconds: {seconds}");
                }
---------------------------------------------------------------------------
hours: 3.0
minutes: 0.0
seconds: 0.0
hours: 3.0
minutes: 0.0
seconds: 0.0
hours: 3.0
minutes: 0.0
seconds: 0.0
---------------------------------------------------------------------------


Is it possible to rewrite the sample to make it work on the Mobile Emulator?
Comment 3 Michal Skvor 2009-01-22 09:37:22 UTC
I asked guys from mobile and they told me that this is issue in JavaFX Mobile runtime from sun. On read device which
does not use SUN's runtime Calendar API works as intended. 
Comment 4 Alexandr Scherbatiy 2009-01-22 11:01:03 UTC
verified