Skip to main content

JDIC 0.9.5 was released! (fixed web start and in-applet activation)

14 replies [Last post]
uta
Offline
Joined: 2007-01-10

The URL for binary download:

https://jdic.dev.java.net/servlets/ProjectDocumentList?folderID=9354&exp...

[pre]
- Now there is only cross platform version of JDIC.
- There are not intersections in class names for different platforms, instead the reflection functionality is used.
- Java part of JDIC could be build by NetBeans projects.
jdic\src\share_applet -> jdic_native_applet.jar
jdic\src\share -> jdic.jar
jdic\src\unix -> jdic_stub_unix.jar
jdic\src\windows -> jdic_stub_windows.jar
- Please, view the example projects for correct linkage in different cases.
- Linkage with jdic.jar + jdic_native_applet.jar activates native part for ANY class loader.
But for JNLP start there is the better way (compare SimpleBrowser.jnlp and
SimpleBrowserAlt.jnlp from jdic-0.9.5-bin-cross-platform.zip)
[/pre]

Regards,
-uta

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dhennig
Offline
Joined: 2006-08-24

What kind of release is this?

I can't find a corresponding tag in the CVS, the last I found was JDIC_0_9_3. The ChangeLog inside of jdic-0.9.5-src stops at 0.9.4 but is still never than the one in the CVS. The CVS looks out of sync.

On the official Release page ( https://jdic.dev.java.net/releases.html ) the last number is 0.9.1, then there are some Releases with a date, up to 20061102.

There are still a lot of problems with JDIC and in my opinion it is an importend part of Java.

Who is developing JDIC these days?

alka
Offline
Joined: 2007-03-27

Hi uta,

No, I don't see "MozEmbed.exe" - even the JDIC bin path C:\Documents and Settings\aparandekar\Local Settings\Temp\jdic_0_9_5 does not copy contain "MozEmbed.exe" though it is present in the jar file.

Since FireFox is not supported how can I tell the JDIC web browser in 0.9.5 version to use IE when FireFox is the default browser?
The code to set the active engine to IE that was available in 0.9 is not there in 0.9.5 version!

Thanks for all your help,
--Alka

20mithrandir
Offline
Joined: 2006-10-25

Same question here:

Since FireFox is not supported how can I tell the JDIC web browser in 0.9.5 version to use IE when FireFox is the default browser?
The code to set the active engine to IE that was available in 0.9 is not there in 0.9.5 version!

Any help?

dangerousdan
Offline
Joined: 2009-01-28

I modifed the jdic_native.jar file and replaced the mozilla executable with the IE executable.
So isDefaultMozilla now has no influence.

But of-course, now I am tied with Windows but I couldn't make it work with Firefox 2 anyway.

Tested in Windows XP, works like a charm.

Can anyone check with other Windows versions if you are interested in this hack?

alka
Offline
Joined: 2007-03-27

Hi uta,

Yes, FireFox 2.0.0.14 works with jdic 0.9.5 on Windows XP and Vista.

I enabled debug messages by calling WebBrowserUtil.enableDebugMessages(true) and here is the trace:

[b]When FireFox 2.0.0.14 is the default browser:[/b]
Native loader!
isDefaultBrowserMozilla
*** Jtrace: found a free port: 4900
[b]********* getBrowserPath()c:\progra~1\mozill~1\firefox.exe[/b]
*** Jtrace: Executing IeEmbed.exe
isDefaultBrowserMozilla
*** Jtrace: JDIC found BIN path=[C:\Documents and Settings\aparandekar\Local Settings\Temp\jdic_0_9_5]
*** Jtrace: connecting ... 0

[b]When IE7 is the default browser:[/b]
** Jtrace: {Native loader
Native loader!
*** Jtrace: }Native loader
isDefaultBrowserMozilla
*** Jtrace: found a free port: 4946
[b]********* getBrowserPath()"c:\program files\internet explorer\iexplore.exe"[/b]
*** Jtrace: Executing IeEmbed.exe
isDefaultBrowserMozilla
*** Jtrace: JDIC found BIN path=[C:\Documents and Settings\aparandekar\Local Settings\Temp\jdic_0_9_5]
*** Jtrace: connecting ... 0

I was aware that FireFox is not supported when I was using jdic 0.9 (Nov 2006 release) and so I had modified my code as follows:

IWebBrowser webBrowser = null;
BrowserEngineManager bem = BrowserEngineManager.instance();
IBrowserEngine engine = bem.getActiveEngine();
if (engine == null) //null in case of Firefox
{
if (WebBrowserUtil.IS_OS_WINDOWS)
{
bem.setActiveEngine(BrowserEngineManager.IE);
engine = bem.getEngine();
webBrowser = engine.getWebBrowser();
}
}

Then when I upgraded to jdic 0.9.5 I noticed that the IWebBrowser Interface has been removed. I tested my changed code with FireFox 2.0 and since it worked I assumed jdic took care of that.
In jdic 0.9.5 my code looks like this:
WebBrowser webBrowser = new WebBrowser(false);

There is obviously a bug in FireFox 3.0 that is causing the IOException.
In jdic 0.9.5 is there a way or code sample I can refer to which will programmatically set the browser engine to IE when the default browser is FireFox - similar to how I wrote in jdic 0.9 version?

Your help will be greatly appreciated,
Thanks,
--Alka

uta
Offline
Joined: 2007-01-10

Do you see "MozEmbed.exe" in your process list?
That is the only criterion of FF usage. The presence of "IeEmbed.exe" means that IE is in action.

alka
Offline
Joined: 2007-03-27

Hi uta,

I am a bit confused. Did you reply to my question that jdic 0.9.5 does not work on Linux or that it does not work with FireFox 3.0 on any platform.

I had posted another question yesterday regarding FireFox 3.0 not working in Windows XP and Vista. It works with FireFox 2.0 but since yesterday when I installed FireFox 3.0 I cannot run my jdic application. Do you have any idea what may be the reason?

http://forums.java.net/jive/thread.jspa?threadID=42620&tstart=0

Thanks,
--Alka

uta
Offline
Joined: 2007-01-10

Are you sure that you are working with FF 2.0 in case of Windows XP and Vista - not IE?
If it so, that means that last FF 2.x update solves some compatibility problems.
The FF support was frozen. FF 3.0 has a lot of changes and I would very surprised if JDIC still function with.

geekycoder
Offline
Joined: 2008-06-19

After installing firefox 3.0, JDIC webbrowser give a error

D:\devsys\java\lib\jdic\jdic-0.9.5-bin-cross-platform>C:\devsys\java\app\sdk\bin
\java -cp "lib\jdic.jar;lib\jdic_native_applet.jar" -jar Browser.jar
isDefaultBrowserMozilla
isDefaultBrowserMozilla
Can't execute the native embedded browser. Error message: java.io.IOException: T
he filename, directory name, or volume label syntax is incorrect

hmmm. something not right.

uta
Offline
Joined: 2007-01-10

The JDIC code base on Mozilla 1.4 branch.
It does not work even with FireFox 2.0
Sorry.

tux_effe
Offline
Joined: 2008-06-19

Re,

Great news, I try and I win :

- I follow this tutorial : http://www.shortround.net/articles/JDIC+on+Ubuntu.txt
but I find some troubles with compilation ; so, I take linux version (jdic-0.9.3-bin-linux.zip) and I put files into /usr/lib/jvm/java-..../jre/lib/ext/ (normally, you must respect zip directories : add linux/x86 directories, but new troubles, so I put files in these two directories)

- I make a link between /usr/local/mozilla/plugins and /usr/lib/firefox/plugins : so I have all firefox plugins (like flash 9) for my java prog : :D

Have a nice day.

tux_effe
Offline
Joined: 2008-06-19

Hello,

I had these errors yesterday.

In the JDIC 0.9.5 directory, you have these directory :
lib/linux/x86/ (with some files)

I put these in my JRE directory (for me : /usr/lib/jvm/java-...../jre/lib/ext to have /usr/lib/jvm/java-...../jre/lib/ext/linux/x86) and I put jdic.jar and jdic_stub_unix.jar in /usr/lib/jvm/java-...../jre/lib/ext directory.

After that, it was ok for me (but I have new troubles : the JPanel is empty).

If you have some evolution, post-it please.

alka
Offline
Joined: 2007-03-27

JDIC 0.9.5 works very well with both web start and applet on Windows XP and Vista but I get the following error on [b]Linux - Distro: Kubuntu 8.04 (Hardy Heron)
Kernel Version: 2.6.24
Browser: Firefox 2.x[/b]

Is there a setting that I may have missed?
If you look at the error you will notice that the code is looking for a wrong file name.
When running on Linux it should look for libjdic.so but instead it is trying to find jdic.so which obviously does not exist!

Any help would be greatly appreciated,
Thanks,
--Alka

********************************************************************************************
Native loader!
java.security.PrivilegedActionException: java.io.IOException: Native resourse [bin/linux/x86/[b]jdic.so[/b]] was not found in JAR.
at java.security.AccessController.doPrivileged(Native Method)
at org.jdesktop.jdic.init.NativeExtractor.loadLibruary(NativeExtractor.java:172)
at org.jdesktop.jdic.init.JdicManager.loadLibrary(Unknown Source)
at org.jdesktop.jdic.browser.WebBrowser.(Unknown Source)
Caused by: java.io.IOException: Native resourse [bin/linux/x86/jdic.so] was not found in JAR.
at org.jdesktop.jdic.init.NativeExtractor.extractBinary(NativeExtractor.java:141)
at org.jdesktop.jdic.init.NativeExtractor$1.run(NativeExtractor.java:174)
... 17 more
isDefaultBrowserMozilla
Exception in thread "EventThread" java.lang.UnsatisfiedLinkError: org.jdesktop.jdic.browser.internal.WebBrowserUtil.nativeGetBrowserPath()Ljava/lang/String;
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.nativeGetBrowserPath(Native Method)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.getBrowserPath(Unknown Source)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.getEmbedBinaryName(Unknown Source)
at org.jdesktop.jdic.browser.NativeEventThread.run(Unknown Source)

jasha
Offline
Joined: 2008-06-16

I am also having problems with running JDIC on Linux. In my case I am using
Ubuntu 8 and I am using WebBrowser component implemnted inside Applet.

This is the trace I am getting from Firefox's java console window. Wander what's
causing it?

{init
New binary?:null
java.security.PrivilegedActionException: java.io.IOException: Native resourse [bin/linux/x86/jdic.so] was not found in JAR.
at java.security.AccessController.doPrivileged(Native Method)
at org.jdesktop.jdic.init.NativeExtractor.loadLibruary(NativeExtractor.java:172)
at org.jdesktop.jdic.init.JdicManager.loadLibrary(Unknown Source)
at org.jdesktop.jdic.browser.WebBrowser.(Unknown Source)
at Browser.jbInit(LinuxAppletti.java:190)
at Browser.(LinuxAppletti.java:140)
at LinuxAppletti.init(LinuxAppletti.java:55)
at sun.applet.AppletPanel.run(AppletPanel.java:425)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Native resourse [bin/linux/x86/jdic.so] was not found in JAR.
at org.jdesktop.jdic.init.NativeExtractor.extractBinary(NativeExtractor.java:141)
at org.jdesktop.jdic.init.NativeExtractor$1.run(NativeExtractor.java:174)
... 9 more
isDefaultBrowserMozilla
Exception in thread "EventThread" java.lang.UnsatisfiedLinkError: org.jdesktop.jdic.browser.internal.WebBrowserUtil.nativeGetBrowserPath()Ljava/lang/String;
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.nativeGetBrowserPath(Native Method)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.getBrowserPath(Unknown Source)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.getEmbedBinaryName(Unknown Source)
at org.jdesktop.jdic.browser.NativeEventThread.run(Unknown Source)

Thanx
jasha