• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoSuchFieldError when using/trying t2k

 
Rezniv Roscky
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have two(the exact same)JRE(1.8.0.74) on win machine, which one is registered as default using jre_home and java_home, but 2nd. one is kinda portable.

Well I just tried 2tk engine over native font factories(CT, DW, and FT) by command argument and I got this error(in windows) only and only if I run the java app with portable jre, but the default jre work without error
here is the stacktrace


Cannot figure out why there is a where the method needs no any arg! and just for the portable one. the default jre works very well.
I also tried to find the source of , but could not find anything, not even with hotspot jfxrt source archive file, neither openjdk repository.

Any help is appreciated
 
John Damien Smith
Ranch Hand
Posts: 299
15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception states it is in a native method. The jfxrt.jar file only contains Java code, not native code. Native code is in a .dll or .so file appropriate to a platform. You can get a mismatch between native code and java code if you do something weird like to ship a version of jfxrt.jar with your application or if you have a garbled java installation which cannot find the appropriate version of the native code to match the java code (which would be a pretty rare occurrence). Note that command line switches such as -Dprism.text are not documented, supported properties, so you can't really expect them to work in any case - the command might work or the command might not, and if it does not, you might get a lot of assistance in trying to make it work. Or maybe you are running openjdk, which does not ship with t2k.

> I also tried to find the source of com.sun.javafx.font.t2k.ICUGlyphLayout, but could not find anything, not even with hotspot jfxrt source archive file, neither openjdk repository.

I don't think the t2k JavaFX implementation is part of openjdk (i.e. it is closed source in the oracle JDK):
http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-October/010979.html

For T2K, I'm a little unclear and hope someone can help clear up for me under what circumstances we use T2K in the shipping product. My current understanding was that we use native fonts for every platform except maybe embedded, but that we want to switch from T2K to native fonts (Pango or HarfBuzz or whatnot) soon. Is that right?

The JDK uses an open source font library for OpenJDK, but T2K for the Oracle JDK. On FX we just wanted to have a single implementation that was used by both. The hope is that besides Applet code and VP6, everything in the Oracle JavaFX would be available in OpenJFX, so that JavaFX is truly an open source project built on open source code.


https://technfun.wordpress.com/tag/font-rasterization/
 
Rezniv Roscky
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception states it is in a native method.

Thank you so much dear John, well actually I got the error due to some changes on prism classes I made, and I was expected properties get accessed by methods rather direct access.
I just searched everywhere, and maybe I made my biggest mistake which I mailed them about it and asked for the source.

As you mentioned I checked openjfx repository and found that t2k is a registered(available) module, but teh source is missed! I might ignore all t2k module due to it has some issue with missed glyphs and fonts.

I really appreciate your help, thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic