Compiling 8u20-b26 for iOS

2014-09-02 Thread Niklas Therning
Hi,

I'm trying to compile OpenJFX 8u20-b26 for iOS but run into problems with
the web project. The first problem seems to be with the ios.gradle script.
IIUC (I have very limited experience with Gradle) it disables the
compilation of the ordinary web Java code:

compileJava {
enabled = false
}

and then builds the iOS specific web Java code:

afterEvaluate {
def compileWebJavaIos = task(compileWebJavaIos,
type: JavaCompile, group: Build) {

The problem with this is that the builders project gets built before the
compileWebJavaIos task is run and there is code in builders which depends
on the web classes (e.g. WebViewBuilder depends on WebView) so I get a lot
of unknown symbols Gradle builds the builders project. E.g.:

[ant:javac]
/Users/niklas/Projects/openjfx/modules/builders/src/main/java/javafx/scene/web/WebViewBuilder.java:60:
error: cannot find symbol
[ant:javac] WebView x = new WebView();
[ant:javac] ^
[ant:javac]   symbol:   class WebView
[ant:javac]   location: class WebViewBuilder

I'd like to fix this but before I make a serious attempt I'd like to know
whether I'm doing something wrong. I have Gradle 1.8 installed and I am
building using the 1.8.0_20-b26 JDK. OS X is 10.9.4 and I have the latest
Xcode 5.1 installed. I'm using this command line to build

  gradle -PCOMPILE_TARGETS=ios -PUSE_LIPO=true -PIOS_VERSION=7.1

Also, how is the jfxrt.jar that comes with my Java8 installation treated by
the build? I guess it is ignored since otherwise I wouldn't get any
compilation problems due to missing WebView etc since those classes are in
Java8's jfxrt.jar?

Thanks!
/Niklas


Re: Compiling 8u20-b26 for iOS

2014-09-02 Thread Niklas Therning
I couldn't keep my hands off and by looking at how it's done in
dalvik.gradle from javafxports [1] I managed to get it to build the iOS
web.jar. Here's the patch for ios.gradle:

diff -r e56a8bbcba20 buildSrc/ios.gradle
--- a/buildSrc/ios.gradle Thu Jul 24 21:23:07 2014 -0700
+++ b/buildSrc/ios.gradle Tue Sep 02 16:35:41 2014 +0200
@@ -340,7 +340,17 @@
 apply plugin: 'java'

 compileJava {
-enabled = false
+sourceSets.main.java.srcDirs = ['src/ios/java'];
+}
+sourceSets {
+main {
+java {
+srcDirs= ['src/ios/java']
+}
+}
+}
+dependencies {
+ compile files(../graphics/build/classes/ios);
 }

 afterEvaluate {


Let me know if you want me to create a JIRA and post this there instead.
This patch helped me get past the first problem with the builders project
failing. I then had to fix a few compilation problems in the web module's
iOS code. A few classes (PopupFeature and PromptData) were missing and a
few of the others had to be brought up to date with the code in src/main/.
Haven't been able to test the patched web iOS code yet but at least it
compiles now. I should probably create an issue for all of this and attach
a patch, right?

[1]
https://bitbucket.org/javafxports/8u20-rt/src/772ccf341457a1bbabef278cfe4dd6b22f5d7e72/buildSrc/dalvik.gradle?at=default


On Tue, Sep 2, 2014 at 4:34 PM, Kevin Rushforth kevin.rushfo...@oracle.com
wrote:

  I'll take a look at the build order, but it sounds like a bug. Perhaps
 you can just locally disable the builders or add a dependency on the
 compilation task for the IOS web files.

 As to your other question, Richard is right that we omit lib/ext from
 compilation, but there can be issues in doing this (e.g., when running
 tests or building apps). We recommend that you remove (not just rename) the
 jfxrt.jar from the JDK you use to build.

 -- Kevin



 Richard Bair wrote:

 I’ll let one of the other guys answer about the web component build order, 
 but ...

 On Sep 1, 2014, at 11:58 PM, Niklas Therning nik...@therning.org 
 nik...@therning.org wrote:



  Also, how is the jfxrt.jar that comes with my Java8 installation treated by
 the build? I guess it is ignored since otherwise I wouldn't get any
 compilation problems due to missing WebView etc since those classes are in
 Java8's jfxrt.jar?


  The jfxrt.jar that comes with the JDK is in the lib/ext directory (as is 
 Nashorn). We simply omit both from the class path when we build by setting 
 java.ext.dirs= (to empty).

 Richard




Re: IPA / APK Internal

2013-12-30 Thread Niklas Therning
For IPA generation with RoboVM it's pretty simple since the compiler can be
easily embedded and run programmatically from within Java. Please have a
look at the RoboVM Maven plugin for a sample on how this is done:
https://github.com/robovm/robovm-maven-plugin


On Mon, Dec 30, 2013 at 9:27 AM, Mike mikeg...@gmail.com wrote:

 I know this is a difficult question, but who can give us some advice on
 what
 to study up on regarding APK / IPA  Generation and a RAD tool for Javafx
 built on JDK8

 I'm laying the ground work for doing this and I'm not certain the best
 tools
 to use from inside a Rad tool to help developers build such file types.

 We plan on having an APP that runs (dashboards) (templates) built
 from within a RAD tool on a desktop but this doesn't allow developers
 to make their own APK and IPA's

 I'm familiar with out Appery.io and other platforms use Phonegap as help in
 this process
 but I'm curious how developers think a Javafx jdk8 building platform should
 do the same.

 Thanks in advance
 Mike Tallent
 CEO
 Objectwheel



Re: JavaFX on iOS and Android: The real problem and challenge

2013-11-09 Thread Niklas Therning
Here's a crazy idea for you guys: how about contributing to RoboVM instead
and maybe, just maybe, it would one day become more than a one man project?
;-) I'm of course very aware of the problem you're facing with JFX+iOS and
as I said to some of the Oracle guys at J1 I'm very tempted to making it an
option to use the OpenJDK class lib with RoboVM and support invokedynamic.
These are the major things missing from RoboVM in order to use it with a
vanilla OpenJFX8 build (and not the jfx78 backport). I WILL do this work at
some point but it's not at the top of my list of priorities. If I could get
some help on other things I can get to it sooner.

I'm a bit surprised that you're considering starting from scratch with a
new project and not building on previous work. Is there something
fundamentally wrong with RoboVM, something that cannot be fixed that is
preventing you from using it? What would you gain from starting from
scratch with OpenJDK? AFAIK there's no AOT compiler in OpenJDK. And you
probably cannot reuse code from hotspot (like the GCs) since it's pure
GPLv2 (no classpath exception) and it would contaminate the rest of the
app's code and force it to be GPL as a whole since you have to link
everything statically on iOS (note: this is my interpretation of the GPL,
IANAL!).

As for RoboVM being a prototype, experimental and not production
ready. Yes, it's immature and there are bugs in there but every project is
in the beginning (even OpenJDK subprojects ;-) ). It will evolve in time
and the more people who use it and contribute the sooner it will mature.
Also, all of those terms are subjective. I've stopped saying that it's not
production ready myself because for some people it is ready! There are
already apps in the App Store developed by others that are working fine and
prove this (let me know if you're interested and I'll provide a list of
those I'm aware of).

In the long term we will provide professional services (support contracts,
add-ons, etc) around the RoboVM open-source project. We hope that we can
hire a team that can work on this full-time and build a healthy community
around it. In the short term our biggest problem is resources, both in
terms of man-power and financially. We've been contacted by some companies
which would consider sponsoring this project. If you work for a company
which would benefit from Java on iOS becoming a reality than please try to
convince your management to sponsor. Who knows, if we would focus more on
OpenJFX and OpenJDK maybe we could even get some help from Oracle? Perhaps
start a petition in the JavaFX community to try to persuade Oracle into
supporting RoboVM? Anyone up for it?

/Niklas (the RoboVM guy)


On Fri, Nov 8, 2013 at 10:36 PM, Richard Bair richard.b...@oracle.comwrote:

 Totally, I think the normal process for this is to create a new OpenJDK
 project, is it not? Can you take a look at the OpenJDK bylaws and report
 back on the process? I think it would be awesome to do a port. Note that
 there are a few OpenJDK ports already which have ARM support, you might
 want to look there as a starting point?

 Richard

 On Nov 8, 2013, at 1:29 PM, Florian Brunner fbrun...@gmx.ch wrote:

  Yes, I agree, we need professional JVM ports for iOS, Android and
 Windows 8.
 
  @Oracle: Could you set up the according project sites for these 3
 platforms on openjdk.java.net and document what exactly has to be done to
 port OpenJDK (at least some kind of JavaFX compact profile e.g. without the
 AWT stack) to these platforms? Also the Mercurial repository and the build
 should be prepared.
 
  I think if there were an easy starting point it would lower the barrier
 to work on these ports.
 
  -Florian
 
  Am Donnerstag, 24. Oktober 2013, 08.41:32 schrieb Tobias Bley:
  Hello to the community,
 
  I read the last discussion about „JavaFX native look and feel“ and have
 to get out of my mind the following:
 
  In my opinion the MAIN point is not „how to bring the native look and
 feel to iOS/Android“, the real MAIN issue is: we need a professional JVM(!)
 which works performant and reliable on iOS, Android and Windows 8! Only if
 we have such a JVM, developers and companies are motivated to develop real
 commercial apps with JavaFX and contribute stuff back to OpenJFX!
 
  RoboVM is a good „prototype“. Niklas is currently one of the most
 important people for the JavaFX community. He and his company has build the
 first and one and only real solution to deploy Java and JavaFX code to the
 iOS platform! His work is really great! But: He is only one(!) person! This
 kind of complex task I would expect from big companies like Oracle, IBM,
 SAP or Twitter. But from this direction we don’t hear anything about it.
 
  It is not enough that people like Niklas (Trillian AB) or Matthias and
 me (UltraMixer) are trying to bring JavaFX to iOS and Android. It’s all
 experimental stuff! Yes, currently we can start JavaFX apps on a real
 iPhone and iPad. And yes, we have managed to 

Re: JAVAFX on ANDROID

2013-10-14 Thread Niklas Therning
I don't think a Java6 backport is necessary. If the jfx78 backport works on
RoboVM it should work on Android (provided that the native stuff is there
of course). The problem is the dx tool which doesn't accept Java7 .class
files, right?

IIUC not much happened to the class file format between Java6 and Java7
(except for invokedynamic and what is need to support it but Java7's javac
never generates invokedynamic ops). The APIs to support try-with-resources
(AutoCloseable) is already in Android and the syntactic sugar added in
Java7 (multi-catch, switch on string, diamond, etc) compiles to Java6
compatible bytecode and uses no new APIs. So it should be easy to make a
tool using ASM or similar which takes the jfx78 jar file and rewrites the
.class files in it to target 1.6 instead of 1.7 and repackage as a new jar.

Just my €0.02. If you want to maintain a backport of the backport :-) then
go for it.


On Mon, Oct 14, 2013 at 8:53 AM, Matthias Hänel hae...@ultramixer.comwrote:

 Hi Stefan,


 thanks for your fast answer.


 Am 12.10.2013 um 00:47 schrieb Stefan Fuchs snfu...@gmx.de:

  I think you must |add the flag ||-PCOMPILE_PANGO=true to build the new
 opensource font stuff.

 I am sure that's not that easy ;)
 Actually, I tried it but it didn't do anything in the first place.


  If I remember correctly I got a similar error, when I first build jfx78
 on linux.
 
  I made some experiments with javafx on android by myself.
 
  I found the following interesting read:
 
 http://stackoverflow.com/questions/7153989/java-7-language-features-with-android

 Well, I didn't use jfx78 vanilla, I used it as a base for the port to
 java6.
 I am quite sure that we need a java6 port on the long run to support
 davlik stable.


  One other problem I hit, when trying to compile a larger application was:
 
 http://stackoverflow.com/questions/15508477/android-my-application-is-too-large-and-gives-unable-to-execute-dex-method-id

 Ok, interessting, I'll take a look at it when I hit the error.


  Apparently there is a limit of ||65536 methods per apk file.
 
 
  Besides, I'm currently two releases behind with the jfx78.
 
  I'll try to catch up soon.

 It would be great to read your findings.


 kind regards
 Matthias






Re: JAVAFX on ANDROID

2013-10-13 Thread Niklas Therning
For PlatformLogger et al you can probably use the compatibility lib we have
been using for jfx78+RoboVM: https://github.com/robovm/robovm-jfx78-compat

Den lördagen den 12:e oktober 2013 skrev Tomas Brandalik:

 I think that PlatformLogger initialization in CssHelper was causing
 problems. I had to write one. Not 100% sure though I will look at it when
 I'm back in the office. (Or you can comment out css processing in the
 node.) I was able to run without font then.

 -Tomas


 On 10/11/2013 06:22 PM, Tom Schindl wrote:

 On 11.10.13 18:10, Matthias Hänel wrote:

 Hi Tomas,


 today, I took the time to investigate a little more time on this.

 1. I build an entirely new openjfx78 build for android
 2. starting this gave me several errors that lead me to the
 conclusion that I need a java6 openjfx
 3. based on openjfx78 I ported it back to java6 (adapted gradled
 scripts, and tons of java source code)
 4. Now it's almost running on an 18th android. All libraries are firing
 up until the CssStyleHelper
 is called with a static call to createStyleHelper.

 That looks like the font stuff is not in jfx78. That's why new Font
 returns with null and therefore

 On OS-X font stuff is definately there in jfx78, but the low-level font
 stuff is loaded using reflection (at least this was the cause on robovm)!

 Tom





Re: JavaFX and iOS - it will remain a dream

2013-07-31 Thread Niklas Therning
   after many days trying to really build iOS apps with JavaFX and RoboVM
 or
   Avian I’m very frustrated because of the following things:
  
   Based on RoboVM, JavaFX on iOS runs unacceptable slow - I don’t know
 the
   reason - maybe it’s the rendering model of JavaFX - maybe it’s the
   currently unoptimized RoboVM
   One big problem of RoboVM is it’s dependence of the Android library, it
   does not support the OpenJDK. That’s a big reason for many many
 problems
   when using JavaFX. So currently it’s not possible to use fxml files
   (FXMLoader) because of the missing Stax xml parser and classes like
   XMLInputFactory in the android library…


There's now a compatibility library for the jfx78 backport which includes
the missing sun.* classes from OpenJDK [1]. So that will not be a problem
when running on RoboVM/Android. Daniel Zwolenski is working on getting this
into Maven which will make it nice and easy to develop with RoboVM+OpenJFX.

FXMLLoader relies an StAX and the Java Scripting API. Those can both be
made to work on RoboVM/Android. The POM of the compat project [1] contains
optional dependencies on the StAX API and JSR 223 API. For StAX you'll also
need a StAX provider [2][3]. For scripting you'll need a JSR 223
implementation of the scripting language you're using, like Rhino for
JavaScript [4][5]. Please note that I haven't tested FXML but it should
work (in theory at least ;-) ). Please give it a go. It will be a great
blog story if you can make it work on iOS.

As for the performance issues with RoboVM+OpenJFX: those WILL be addressed!
You can either wait for it to happen or you can help out. One way to do
that would be sample code that exercises the code paths that need to be
optimized (e.g. the button rendering you posted about earlier). Preferably
the sample should run repeatedly without user interaction. You should then
be able to run Apple's Instruments application to profile this sample. This
will help us determine what needs to be optimized.

/Niklas

[1] https://github.com/robovm/robovm-jfx78-compat
[2] https://github.com/FasterXML/aalto-xml
[3] http://woodstox.codehaus.org/
[4] https://developer.mozilla.org/en-US/docs/Rhino
[5]
https://java.net/projects/scripting/sources/svn/show/trunk/engines/javascript?rev=236


Re: JavaFX and iOS - it will remain a dream

2013-07-31 Thread Niklas Therning
Will this converter be able to precompile embedded JavaScript? That would
be very cool. If I remember correctly Rhino can compile JS to bytecode AOT.
RoboVM would then be able to compile that bytecode to machine code.


On Wed, Jul 31, 2013 at 8:28 AM, Tom Schindl tom.schi...@bestsolution.atwrote:

 I don't think it is a good idea to use fxml on embedded and mobile, we are
 working on a fxml = java converter so you can add it to your build process.

 Tom

 Von meinem iPhone gesendet

 Am 31.07.2013 um 08:11 schrieb Niklas Therning nik...@therning.org:

  after many days trying to really build iOS apps with JavaFX and RoboVM
  or
  Avian I’m very frustrated because of the following things:
 
  Based on RoboVM, JavaFX on iOS runs unacceptable slow - I don’t know
  the
  reason - maybe it’s the rendering model of JavaFX - maybe it’s the
  currently unoptimized RoboVM
  One big problem of RoboVM is it’s dependence of the Android library,
 it
  does not support the OpenJDK. That’s a big reason for many many
  problems
  when using JavaFX. So currently it’s not possible to use fxml files
  (FXMLoader) because of the missing Stax xml parser and classes like
  XMLInputFactory in the android library…
 
  There's now a compatibility library for the jfx78 backport which includes
  the missing sun.* classes from OpenJDK [1]. So that will not be a problem
  when running on RoboVM/Android. Daniel Zwolenski is working on getting
 this
  into Maven which will make it nice and easy to develop with
 RoboVM+OpenJFX.
 
  FXMLLoader relies an StAX and the Java Scripting API. Those can both be
  made to work on RoboVM/Android. The POM of the compat project [1]
 contains
  optional dependencies on the StAX API and JSR 223 API. For StAX you'll
 also
  need a StAX provider [2][3]. For scripting you'll need a JSR 223
  implementation of the scripting language you're using, like Rhino for
  JavaScript [4][5]. Please note that I haven't tested FXML but it should
  work (in theory at least ;-) ). Please give it a go. It will be a great
  blog story if you can make it work on iOS.
 
  As for the performance issues with RoboVM+OpenJFX: those WILL be
 addressed!
  You can either wait for it to happen or you can help out. One way to do
  that would be sample code that exercises the code paths that need to be
  optimized (e.g. the button rendering you posted about earlier).
 Preferably
  the sample should run repeatedly without user interaction. You should
 then
  be able to run Apple's Instruments application to profile this sample.
 This
  will help us determine what needs to be optimized.
 
  /Niklas
 
  [1] https://github.com/robovm/robovm-jfx78-compat
  [2] https://github.com/FasterXML/aalto-xml
  [3] http://woodstox.codehaus.org/
  [4] https://developer.mozilla.org/en-US/docs/Rhino
  [5]
 
 https://java.net/projects/scripting/sources/svn/show/trunk/engines/javascript?rev=236



very poor performance on iOS :(

2013-07-24 Thread Niklas Therning
Please try running with perfLogger and also Instruments. As I've pointed
out before RoboVM is in early stages of development. It doesn't do release
builds yet. Virtually nothing has been done yet to optimize things for
speed. So my guess is that you will find that a lot of time is spent in
RoboVM code. Also, AFAIU the Oracle guys have run this on iOS internally
and have seen decent performance (can someone confirm?). That would also
suggest that RoboVM is the problem at the moment.

/Niklas


On Wed, Jul 24, 2013 at 5:13 PM, Richard Bair
richard.b...@oracle.comjavascript:_e({}, 'cvml',
'richard.b...@oracle.com');
 wrote:

 Unfortunately, I'm one of those stuck waiting for the apple developer
 portal to come back online in order to renew my apple developer
 subscription, so I can't actually try this out myself.

 Have you tried running with the perfLogger (I included instructions and
 how to understand the output in another thread yesterday). If you can show
 the output from the perf logger that would at least give some guidance as
 to where the time is being spent.

 Richard

 On Jul 24, 2013, at 5:16 AM, Tobias Bley 
 t...@ultramixer.comjavascript:_e({}, 'cvml', 't...@ultramixer.com');
 wrote:

  Hi,
 
  i would like to start a discussion about the performance of JavaFX8 on
 iOS (via RoboVM). If you make a little app with just one toggle button and
 run it on iPhone4 (not simulator), the JavaFX rendering is very slow. So
 the button press is painted with a really noticeable delay. I don’t
 understand this behavior because I thought JavaFX rendering is very good
 and optimized using hardware accelerated OpenGL code???
 
  Best regards,
  Tobi
 




Re: Raspberry Pi + JavaFX 3D demo

2013-07-16 Thread Niklas Therning
No, it's not possible. These have not yet been implemented.


On Mon, Jul 15, 2013 at 4:19 PM, Tobias Bley t...@ultramixer.com wrote:

 Is it possible to activate the optimizations for me in RoboVM 0.0.2 or
 0.0.3 (github)?


 Am 12.07.2013 um 17:11 schrieb Niklas Therning nik...@therning.org:

 RoboVM doesn't do release builds yet (virtually none of LLVM's
 optimizations are enabled) and virtual and interface method dispatch is
 horribly slow (linear search on every call!!!). So there are A LOT of
 opportunities for improvements. The focus so far has been to get something
 up and running which can actually be used to make apps. I hope I will get
 the time to optimize things later this year.

 Is this demo open source? It would be interesting to test it on iOS.


 On Fri, Jul 12, 2013 at 5:03 PM, Richard Bair richard.b...@oracle.comwrote:

 BTW, we've run a VM performance benchmark against HotSpot on PI vs.
 RoboVM on iOS and for raw power RoboVM seems faster (lower time to invoke a
 method, read a field, etc etc). However in the real world RoboVM is slow
 and I don't know why (GC overhead maybe)?

 Richard

 On Jul 12, 2013, at 7:52 AM, Richard Bair richard.b...@oracle.com
 wrote:

  That should be encouraging, since the CPU on the PI is *way* worse than
 the CPU on an iPhone or iPad. Is the difference HotSpot vs. RoboVM? The
 graphics code being executed should be pretty much exactly the same, and I
 would expect the PowerVR to be able to handle this without any trouble.
 
  Richard
 
  On Jul 12, 2013, at 7:14 AM, Tobias Bley t...@ultramixer.com wrote:
 
  The performance is much better than JavaFX8 on iOS :(
 
 
  Am 12.07.2013 um 15:37 schrieb August Lammersdorf, InteractiveMesh 
 s...@interactivemesh.com:
 
  Found this on YouTube: http://www.youtube.com/watch?v=-scxqJjTJKI
 
  August
 
 






Re: JavaFX8 on iPhone! It works!

2013-07-05 Thread Niklas Therning
Even the latest version of Android are missing these classes and Dalvik
(the VM in Android) doesn't support invokedynamic so a backport is
required, not just for RoboVM. I managed to get Ensemble working yesterday
on iOS with the jfx78 sources and RoboVM. But even this backport contains
code which won't work on Android nor on RoboVM. E.g. I had to patch
FontFileWriter to get Ensemble working (it uses java.nio.file.Files which
is a Java7+ class). IMO the backport needs to target Android/RoboVM
specifically and not Java7. A first step would be to make it compile with
Java6.


On Fri, Jul 5, 2013 at 1:21 PM, Tobias Bley t...@ultramixer.com wrote:

 Maybe the missing classes in the android classes used by RoboVM are only
 missing in an old android class library and Oracles android port is based
 on a newer version?


 Am 05.07.2013 um 13:11 schrieb Daniel Zwolenski zon...@gmail.com:

  This is great Tobi, thanks!
 
  I'm a bit confused though - seems to be mixed messages on the need for
 the 78 backport?
 
  Danno, since Niklas is saying we need the backport, what steps do we
 need to take to get this working?
 
  I also don't understand Tobi's comments below about not using the
 android jdk. What is it that's not working, and isn't jfx suppose to run on
 android as well?
 
 
 
  On 04/07/2013, at 11:53 PM, Tobias Bley t...@ultramixer.com wrote:
 
  I published by blog post about using JavaFX8 and RoboVM to build a iOS
 app: http://blog.software4java.com/?p=41
 
  @Niklas: IMO it’s important that RoboVM support OpenJDK as alternative
 to the android class library because OpenJFX depends on OpenJDK not on
 Android class library (Apache Harmony).
 
  Best regards,
  Tobi
 
  Am 04.07.2013 um 14:49 schrieb Niklas Therning nik...@therning.org:
 
  RoboVM doesn't do invokedynamic so I guess this only works if the app
  doesn't depend on any of the code in JavaFX8 that compiles down to
  invokedynamic calls. Also, there are quite a few API's available in
 Java8
  (and also Java7) that RoboVM doesn't have. We really need to get the
 jfx78
  backport to compile for iOS and generate the static libs properly.
 
  I've just got the font related code in the BrickBreaker sample working
  using the jfx78 backport. There's still a bit of manual command line
 work
  needed to merge the static libraries into universal libraries like the
 old
  ant build system did automatically. But it isn't too hard. I'll try to
 put
  up instructions on the robovm blog later today. I'll let you know.
 
 
  On Thu, Jul 4, 2013 at 1:31 AM, steve.x.northo...@oracle.com wrote:
 
  Yes.
 
 
  On 03/07/2013 7:17 PM, Daniel Zwolenski wrote:
 
  Can I just use this: https://jdk8.java.net/**download.html
 https://jdk8.java.net/download.html?
 
 
  On Thu, Jul 4, 2013 at 9:15 AM, Daniel Zwolenski zon...@gmail.com
  wrote:
 
  Thanks Richard, in the building for Mac section there is a link to
  Install the latest JDK 8 build that goes to a dead URL (
  http://jdk8.dev.java.net/). Do you know the correct URL?
 
 
 
  On Thu, Jul 4, 2013 at 9:11 AM, Richard Bair 
 richard.b...@oracle.com**
  wrote:
 
  Extensive documentation that is mostly correct:
 
  https://wiki.openjdk.java.net/**display/OpenJFX/Building+**OpenJFX
 https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX
 
 https://wiki.openjdk.java.net/**display/OpenJFX/Developing+**OpenJFX
 https://wiki.openjdk.java.net/display/OpenJFX/Developing+OpenJFX
 
  It is still a work in progress but most things you need to know to
 build
  is found here.
 
  Richard
 
  On Jul 3, 2013, at 3:52 PM, Daniel Zwolenski zon...@gmail.com
 wrote:
 
  Trying to catch up to Tobi on this one so I can have some fun with
 it
 
  too.
 
  I assume in order to compile the graphics repo of JFX8 I need an
 OpenJ8
 
  JDK
 
  already installed? Are there pre-built bundles for this (for mac)
 or do
 
  I
 
  need to checkout and build myself? Does anyone know which repo,
 and
  what
  command line arg should I use to build J8 in this case?
 
 
 
 
  On Thu, Jul 4, 2013 at 6:44 AM, Tobias Bley t...@ultramixer.com
 
  wrote:
 
  Hi Guys,
 
  I used RoboVM 0.0.2 and the current OpenJFX8 from mercurial
 graphics
  branch So no 78 backport. I will write a blog post on
  blog.software4java.com until tomorrow...
 
  Currently the performance is very limited - as Richard told too.
 I’m
  testing now all the basic JFX controls (like button, RadioButton,
 
  CheckBox,
 
  ListView, TableView, ...).
 
  Best regards,
  Tobi
 
 
  Am 03.07.2013 um 21:47 schrieb Daniel Zwolenski 
 zon...@gmail.com:
 
  Tobi, this is awesome! But you've left us hanging :)
 
  Did you use the 78 backport for this or just straight out J8?
 
  What are the steps to reproduce your working build?
 
  Very darn exciting!
 
 
 
  On 04/07/2013, at 2:50 AM, Danno Ferrin 
 danno.fer...@shemnon.com
 
  wrote:
 
  JavaFX 8?  Does RoboVM support invokedynamic?  That is a big
 deal if
 
  so.
 
  On Wed, Jul 3, 2013 at 10:07 AM, Niklas Therning 
 
  nik

Re: JavaFX8 on iPhone! It works!

2013-07-04 Thread Niklas Therning
RoboVM doesn't do invokedynamic so I guess this only works if the app
doesn't depend on any of the code in JavaFX8 that compiles down to
invokedynamic calls. Also, there are quite a few API's available in Java8
(and also Java7) that RoboVM doesn't have. We really need to get the jfx78
backport to compile for iOS and generate the static libs properly.

I've just got the font related code in the BrickBreaker sample working
using the jfx78 backport. There's still a bit of manual command line work
needed to merge the static libraries into universal libraries like the old
ant build system did automatically. But it isn't too hard. I'll try to put
up instructions on the robovm blog later today. I'll let you know.


On Thu, Jul 4, 2013 at 1:31 AM, steve.x.northo...@oracle.com wrote:

 Yes.


 On 03/07/2013 7:17 PM, Daniel Zwolenski wrote:

 Can I just use this: 
 https://jdk8.java.net/**download.htmlhttps://jdk8.java.net/download.html?


 On Thu, Jul 4, 2013 at 9:15 AM, Daniel Zwolenski zon...@gmail.com
 wrote:

  Thanks Richard, in the building for Mac section there is a link to
 Install the latest JDK 8 build that goes to a dead URL (
 http://jdk8.dev.java.net/). Do you know the correct URL?



 On Thu, Jul 4, 2013 at 9:11 AM, Richard Bair richard.b...@oracle.com**
 wrote:

  Extensive documentation that is mostly correct:

 https://wiki.openjdk.java.net/**display/OpenJFX/Building+**OpenJFXhttps://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX
 https://wiki.openjdk.java.net/**display/OpenJFX/Developing+**OpenJFXhttps://wiki.openjdk.java.net/display/OpenJFX/Developing+OpenJFX

 It is still a work in progress but most things you need to know to build
 is found here.

 Richard

 On Jul 3, 2013, at 3:52 PM, Daniel Zwolenski zon...@gmail.com wrote:

  Trying to catch up to Tobi on this one so I can have some fun with it

 too.

 I assume in order to compile the graphics repo of JFX8 I need an OpenJ8

 JDK

 already installed? Are there pre-built bundles for this (for mac) or do

 I

 need to checkout and build myself? Does anyone know which repo, and
 what
 command line arg should I use to build J8 in this case?




 On Thu, Jul 4, 2013 at 6:44 AM, Tobias Bley t...@ultramixer.com

 wrote:

 Hi Guys,

 I used RoboVM 0.0.2 and the current OpenJFX8 from mercurial graphics
 branch So no 78 backport. I will write a blog post on
 blog.software4java.com until tomorrow...

 Currently the performance is very limited - as Richard told too. I’m
 testing now all the basic JFX controls (like button, RadioButton,

 CheckBox,

 ListView, TableView, ...).

 Best regards,
 Tobi


 Am 03.07.2013 um 21:47 schrieb Daniel Zwolenski zon...@gmail.com:

  Tobi, this is awesome! But you've left us hanging :)

 Did you use the 78 backport for this or just straight out J8?

 What are the steps to reproduce your working build?

 Very darn exciting!



 On 04/07/2013, at 2:50 AM, Danno Ferrin danno.fer...@shemnon.com

 wrote:

 JavaFX 8?  Does RoboVM support invokedynamic?  That is a big deal if

 so.

 On Wed, Jul 3, 2013 at 10:07 AM, Niklas Therning 

 nik...@therning.org

 wrote:

 Awesome! Can you please post the build instructions somewhere? I'm

 not

 getting a long with gradle at all. :-(


 On Wed, Jul 3, 2013 at 6:03 PM, Tobi t...@ultramixer.com wrote:

  It works! Latest JavaFX 8 (gradle based) with RoboVM on a real

 iPhone

 with

 native text rendering and JFX CSS rendering!




 Tobi







Re: OpenJFX on iOS using RoboVM

2013-05-22 Thread Niklas Therning
Tom, could it be due to some class missing? Do you get an exception? If you
launch the app with the -rvm:log=warn option failing Class.forName() calls
will be logged.

RoboVM strips out classes not being referenced to keep down the size of the
app. The compiler has to be told about classes that get loaded using
reflection. That's what the -roots command line option and the roots
section in the robovm.xml file are for. You may have to add a root there
for the class(es) containing the effect code. Or you could just add
root**.*/root and RoboVM will compile and link in everything.


On Wed, May 22, 2013 at 1:49 PM, Tom Schindl tom.schi...@bestsolution.atwrote:

 Hi,

 I also tried do something like this. I was able to work around the NPE by
 adding a dummy com.sun.javafx.text.**PrismTextLayout to the project.

 I also tried to run the vanishing circles demo but that one fails with an
 effect problem.

 Tom


 On 22.05.13 13:15, Tobias Bley wrote:

 Unfortunately because of the missing PrismFontLoader and the empty
 DummyFontLoader actually you can't use JFX controls like Label or Button
 because of an NullPointerException.

 Exception in thread Thread-5 java.lang.RuntimeException: Exception in
 Application start method
 at com.sun.javafx.application.**LauncherImpl.**
 launchApplication1(**LauncherImpl.java)
 at com.sun.javafx.application.**LauncherImpl.access$000(**
 LauncherImpl.java)
 at com.sun.javafx.application.**LauncherImpl$1.run(**
 LauncherImpl.java)
 at java.lang.Thread.run(Thread.**java)
 Caused by: java.lang.NullPointerException
 at com.sun.javafx.text.**PrismTextLayout.setContent(**
 PrismTextLayout.java)
 at javafx.scene.text.Text.**getTextLayout(Text.java)
 at javafx.scene.text.Text.**needsFullTextLayout(Text.java)
 at javafx.scene.text.Text.access$**400(Text.java)
 at javafx.scene.text.Text$7.**invalidated(Text.java)
 at javafx.beans.property.**ObjectPropertyBase.**markInvalid(**
 ObjectPropertyBase.java)
 at javafx.beans.property.**ObjectPropertyBase.bind(**
 ObjectPropertyBase.java)
 at javafx.css.**StyleableObjectProperty.bind(**
 StyleableObjectProperty.java)
 at com.sun.javafx.scene.control.**skin.LabeledText.init(**
 LabeledText.java)
 at com.sun.javafx.scene.control.**skin.LabeledSkinBase.init(**
 LabeledSkinBase.java)
 at com.sun.javafx.scene.control.**skin.LabelSkin.init(**
 LabelSkin.java)
 at javafx.scene.control.Label.**createDefaultSkin(Label.java)
 at javafx.scene.control.Control.**impl_processCSS(Control.java)
 at javafx.scene.Parent.impl_**processCSS(Parent.java)
 at javafx.scene.Node.processCSS(**Node.java)
 at javafx.scene.Scene.doCSSPass(**Scene.java)
 at javafx.scene.Scene.**preferredSize(Scene.java)
 at javafx.scene.Scene.impl_**preferredSize(Scene.java)



 Am 20.05.2013 um 19:04 schrieb Niklas Therning nik...@therning.org:

  Source code and build instructions for the BrickBreaker JavaFX sample on
 iOS/RoboVM is now available online [1]. The static libs included in that
 download have been compiled from my fork [2] of Danno Ferrin's JDK7
 backport of openjfx [3]. For build instructions please see [4].

 [1]
 http://blog.robovm.org/2013/**05/brickbreaker-javafx-sample-**
 on-ios-robovm-source-code-**released.htmlhttp://blog.robovm.org/2013/05/brickbreaker-javafx-sample-on-ios-robovm-source-code-released.html
 [2] 
 https://bitbucket.org/**ntherning/jfx78https://bitbucket.org/ntherning/jfx78
 [3] https://bitbucket.org/narya/**jfx78https://bitbucket.org/narya/jfx78
 [4] 
 https://gist.github.com/**ntherning/5613607https://gist.github.com/ntherning/5613607

 /Niklas


 On Tue, May 14, 2013 at 9:30 AM, Niklas Therning nik...@therning.org
 wrote:

  Hi,

 I'll clean up the code and post it somewhere later this week. We're not
 using OpenJDK's class libraries. It's Android's.


 On Mon, May 13, 2013 at 6:38 PM, steve.x.northo...@oracle.com wrote:

  Niklas!!!

 This is very cool.  Please make your work available as soon as possible
 so others can try it out.  I have played a bit with RoboVM and looked
 into
 what would be required to port JavaFX to it but did not get the time
 to do
 a deep dive.  Are you using the OpenJDK for the class libraries?

 Steve


 On 13/05/2013 5:32 AM, Niklas Therning wrote:

  Hi,

 I've managed to get OpenJFX running on iOS using RoboVM. Please see
 the
 RoboVM blog [1] for a quick video of it.

 I'd like to say thank you for writing such great code! BrickBreaker
 almost
 worked out of the box! I had to remove/stub out font related stuff of
 course and PlatformLogger had to be copied from OpenJDK. Also had to
 fix
 a
 tiny bug in the native glass code [2] and an NPE in
 PlatformUtil.getRTDir()
 when PlatformUtil.class isn't available in any jar file [3].

 Do you have an ETA on the open-sourcing of the font related code? It
 would
 be a fun challenge to get most