JavaFX: WebView/WebEngine doesn't work with OSGI
Александр Свиридов
ooo_saturn7 at mail.ru
Mon May 4 13:56:42 UTC 2015
I have two boxes - Centos 7.1 64 and Windows 7 32. Both of them have jre 8.0.60.
And I have two javafx projects - osgi and not osgi.
Not OSGI:
public class MainApp extends Application {
@Override
public void start(Stage stage) throws Exception {
WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.load("http://google.com");
Scene scene= new Scene(browser,700,500);
stage.setTitle("JavaFX and Maven");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
This project work at both boxes - one window is created and inside I see google site. Now, OSGI project: I have two classes - activator and program view:
public class Activator implements BundleActivator {
public void start(BundleContext context) throws Exception {
System.out.println("Hello I am Activator");
javafx.application.Application.launch(MyProgramView.class);
}
public void stop(BundleContext context) throws Exception {
}
}
public class MyProgramView extends Application {
@Override
public void start(Stage primaryStage) throws IOException {
WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.load("http://mail.ru");
Scene scene= new Scene(browser,700,500);
primaryStage.setTitle("JavaFX and Maven");
primaryStage.setScene(scene);
primaryStage.show();
}
}
This is OUTPUT:
Hello I am Activator
Prism pipeline init order: es2 sw
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2
succeeded.
GLFactory using com.sun.prism.es2.X11GLFactory
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
Maximum supported texture size: 8192
Maximum texture size clamped to 4096
Non power of two texture support = true
Maximum number of vertex attributes = 16
Maximum number of uniform vertex components = 16384
Maximum number of uniform fragment components = 16384
Maximum number of varying components = 60
Maximum number of texture units usable in a vertex shader = 16
Maximum number of texture units usable in a fragment shader = 16
Graphics Vendor: nouveau
Renderer: Gallium 0.4 on NVAA
Version: 3.0 Mesa 10.2.7
vsync: true vpipe: true
ES2ResourceFactory: Prism - createStockShader: Solid_TextureRGB.frag
ES2ResourceFactory: Prism - createStockShader: FillPgram_Color.frag
A window is created, its title = "JavaFX and Maven" but inside nothing - I mean a empty white area. I checked at both boxes. What's wrong and how to solve it?
More information about the openjfx-dev
mailing list