You are not logged in.
Pages: 1
Hi. I wrote a small program using the Gtk2::Webkit module as an attempt to load a java applet inside the browser widget. The problem i have encountered is that the java plugin will not register for some reason.... Here is the output/error when loading the page:
% ./test.pl
ERROR: Invalid browser function table. Some functionality may be restricted.
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (ArchLinux-6.b24_1.11.3-1-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
The java webpage will state this, even though the plugin is installed correctly.
No working Java was detected on your system. Install Java by clicking the button below.
Here is the program:
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Gtk2 '-init';
use Gtk2::WebKit;
my $window = Gtk2::Window->new;
my $webkit = Gtk2::WebKit::WebView->new;
my $container = Gtk2::ScrolledWindow->new;
# This makes no difference, as these settings are already used by default
my $settings = Gtk2::WebKit::WebSettings->new;
$settings->set_property('enable-java-applet', 1);
$settings->set_property('enable-plugins', 1);
$webkit->set_settings($settings);
package main;
$window->set_title( 'Test' );
$window->set_default_size( 800, 600 );
$window->signal_connect ( destroy => sub { Gtk2->main_quit; } );
$window->add( $container );
$container->add( $webkit );
# Load the java test page
$webkit ->load_uri( "http://www.java.com/en/download/installed.jsp?detect=jre&try=1" );
$window->show_all();
Gtk2->main();
I'm trying to create a game client for a java based game that is loaded from the web. Although i cannot get java to run with the WebKit module. Does anyone know what the output error means and how to get it to work?
PS. When i last worked on this a few years ago, i had been using the Gtk2::MozEmbed widget as a browser frame which automagically read plugins from ~/.mozilla/plugins. If curious here is an old screenshot of what i am trying to do: http://i.imgur.com/zO5Y6.png , the pane on the right would be the WebKit widget, being able to load a webpage that includes a java applet.
I'd also be interested if anyone knows of another way to "nest" or "embed" a native java applet which runs outside of the browser, into a Perl/Gtk2 application. I had heard of Xembed although this seems a bit over my head for now.
Thanks in advance.
Offline
Pages: 1