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 152714 - Mobile: Simple Particle System NB Sample does not compile
Summary: Mobile: Simple Particle System NB Sample does not compile
Status: VERIFIED FIXED
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:26 UTC by Lark Fitzgerald
Modified: 2009-01-22 13:51 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:26:10 UTC
Promoted installer #33 (SDK:B47), jdk 1.6_10

Attempt to run Simple Particle System Sample as a 'Run in Mobile Emulator' fails.
1. Start NB
2. File New Project > Samples > JavaFX > Building Blocks > Simulation > Simple Particle System 
3. Next
4. Finish
5. File > Project Properties > Simple Particle System
6. Select Run Category
7. Select Run in Mobile Emulator
8. OK
9. Run > Run Main Project

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\Simple Particle 
System\build\compiled, -d, C:\Users\Lark\Documents\NetBeansProjects\Simple Particle System\build\compiled, 
@C:\Users\Lark\Documents\NetBeansProjects\Simple Particle System\build\javafxc50106sources]
C:\Users\Lark\Documents\NetBeansProjects\Simple Particle System\src\particles\SimpleParticleSystem.fx:67: cannot find 
symbol
symbol  : method random()
location: class java.lang.Math
       vx : 1 - 2 * Math.random()
C:\Users\Lark\Documents\NetBeansProjects\Simple Particle System\src\particles\SimpleParticleSystem.fx:68: cannot find 
symbol
symbol  : method random()
location: class java.lang.Math
       vy : -2 * Math.random()
2 errors
Exception in thread "main" java.lang.RuntimeException: javafxc execution failed, exit code: 1
        at com.sun.tools.javafx.packager.Main.javafxc(Main.java:333)
        at com.sun.tools.javafx.packager.Main.execute(Main.java:859)
        at com.sun.tools.javafx.packager.Main.main(Main.java:158)
C:\Users\Lark\Documents\NetBeansProjects\Simple Particle System\nbproject\build-impl.xml:136: exec returned: 1
BUILD FAILED (total time: 1 second)
Comment 1 Michal Skvor 2009-01-06 14:27:01 UTC
Math package is not supported on mobile.
Comment 2 Alexandr Scherbatiy 2009-01-16 09:22:36 UTC
The Mobile platform contains java.util.Random class.

import java.util.Random;

var random = new Random();
random.nextDouble() // instead of Math.random()
 
Comment 3 Michal Skvor 2009-01-21 09:18:54 UTC
Fixed.
Comment 4 Alexandr Scherbatiy 2009-01-22 13:51:15 UTC
verified in JavaFX_NB_Plugin_Franca_NB_65_fixes_installer:  #35	Jan 22, 2009 1:29:18 AM