Running berkelium-java

347 Views Asked by At

Having absolutely no luck with http://code.google.com/p/berkelium-java/]berkelium-java, nor the outdated jars, not the up to date subversion source.

When attempting to run from jars, I add them to dependencies, and after modifying one of the examples so it runs under an older jar, it doesn't actually work as it should (AwtExample never paints a site)

When attempting to run from source I get this:

initializing berkelium-java...
Exception in thread "Berkelium Thread" java.lang.ExceptionInInitializerError
at org.berkelium.java.impl.MultiThreadBerkelium.initThread(MultiThreadBerkelium.java:99)
at org.berkelium.java.impl.MultiThreadBerkelium.access$200(MultiThreadBerkelium.java:13)
at org.berkelium.java.impl.MultiThreadBerkelium$2.run(MultiThreadBerkelium.java:41)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: org/berkelium/java/native/win32/icudt46.dll
at org.berkelium.java.impl.NativeLibraryLoader.<init>(NativeLibraryLoader.java:73)
at org.berkelium.java.impl.SingleThreadBerkelium.<clinit>(SingleThreadBerkelium.java:16)
... 4 more
Caused by: java.io.FileNotFoundException: org/berkelium/java/native/win32/icudt46.dll
at org.berkelium.java.impl.NativeLibraryLoader.open(NativeLibraryLoader.java:85)
at org.berkelium.java.impl.NativeLibraryLoader.copy(NativeLibraryLoader.java:97)
at org.berkelium.java.impl.NativeLibraryLoader.processFile(NativeLibraryLoader.java:121)
at org.berkelium.java.impl.NativeLibraryLoader.loadLib(NativeLibraryLoader.java:79)
at org.berkelium.java.impl.NativeLibraryLoader.<init>(NativeLibraryLoader.java:63)
... 5 more

Has anyone had any success with berkelium-java?

EDIT: So I edited it so it requires icudt42 rather than 46, because the version 42 is provider in the natives jar.

Now I'm facing:

initializing berkelium-java...
Exception in thread "Berkelium Thread" java.lang.UnsatisfiedLinkError: org.berkelium.java.impl.SingleThreadBerkelium._init(Ljava/lang/String;Ljava/lang/String;)V
at org.berkelium.java.impl.SingleThreadBerkelium._init(Native Method)
at org.berkelium.java.impl.SingleThreadBerkelium.<init>(SingleThreadBerkelium.java:21)
at org.berkelium.java.impl.MultiThreadBerkelium.initThread(MultiThreadBerkelium.java:99)
at org.berkelium.java.impl.MultiThreadBerkelium.access$200(MultiThreadBerkelium.java:13)
at org.berkelium.java.impl.MultiThreadBerkelium$2.run(MultiThreadBerkelium.java:41)
at java.lang.Thread.run(Thread.java:722)
1

There are 1 best solutions below

0
On

I'm not certain exactly how the Java wrappers work, but if they required building a recent version of Berkelium, they may be failing because the signature of the Berkelium::init() method changed to take optional additional arguments:

bool BERKELIUM_EXPORT init(FileString homeDirectory, unsigned int extra_argc = 0, const char* extra_argv[] = NULL);

or

bool BERKELIUM_EXPORT init(FileString homeDirectory, FileString subprocessDirectory, unsigned int extra_argc = 0, const char* extra_argv[] = NULL);

You may need to update the method signature and call to init in src/main/java/org/berkelium/java/impl/SingleThreadBerkelium.java to provide the default arguments.