Exception in thread "main" java.lang.UnsatisfiedLinkError: no jdic in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.jdesktop.jdic.browser.internal.WebBrowserUtil.loadLibrary(Unknown Source)
at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unknown Source)
at web.Browser1.jbInit(Browser1.java:173)
at web.Browser1.<init>(Browser1.java:69)
at web.Browser1.main(Browser1.java:85)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
i have included the jar still it is showing me the error.....
can anyone help....
This question has nothing at all to do with Swing / AWT / SWT / JFace. I'm moving it to a more appropriate section.
You need to tell us more about your code, and how you executed it.
The identical post you made in this thread has been removed.
Your email address has been removed from the post.
luck, db
There are no new questions, but there may be new answers.
I believe that JDIC needs not only a jar, but some native code as well. I assume you're using a Windows computer, so that would be a DLL in your case. There might be more executable components, too, so check the documentation. I believe they should be put in the same directory as the jar.
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 161
posted
0
thank you paul,
the jdic lib error is solved now the problem is
1)i am unable to run the main project it says unable to launch the application...and den wen i try to run the main file the error shows as:
*** Jtrace: Msg Client new once!
*** Jtrace: Specified browserManager null
*** Jtrace: Default browserManager is used.
Exception in thread "EventThread" java.lang.NullPointerException *** Jtrace: No browser is selected as active,you must specify one by setActiveEngine()!
at org.jdesktop.jdic.browser.internal.MsgClient.<init>(Unknown Source)
at org.jdesktop.jdic.browser.internal.NativeEventThread.run(Unknown Source)
BUILD SUCCESSFUL (total time: 8 seconds)
please help as i am a fresher and learning from scratch....
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 161
posted
0
hi,
i have added mozilla as a default browser now so the error which ocurred before disappeared.
still no link is called...
it says.........
*** Jtrace: Msg Client new once!
*** Jtrace: Specified browserManager null
*** Jtrace: Default browserManager is used.
*** Jtrace: Found a free socket port: 2034
native lib path D:\sumdhi\jars/jdic_native*** Jtrace: init share native.....
*** Jtrace: Got xpcom from registry(win)/path(unix)
native lib path D:\sumdhi\jars/jdic_native*** Jtrace: Executing D:\sumdhi\jars/jdic_native\MozEmbed.exe -port=2034
*** Jtrace: Connecting to native browser ... 0
*** Jtrace: connected
*** Jtrace: Process event to native browser: 0, 0,
*** Jtrace: Send data to socket: 0,0,</html><body></html>
*** Jtrace: Process event to native browser: 0, 1,
*** Jtrace: Read data from socket:
*** Jtrace: Native embedded browser died.
BUILD SUCCESSFUL (total time: 23 seconds)
why is it showing native embedded browser died???
helppppppp
JDIC used to support Mozilla (or vice versa) back in 2006 (?) when it was written. Now (if I understand right) it doesn't. I find that using IE as the browser seems to work fine.
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 161
posted
0
hi paul....
thanks for the last post.After setting IE as my default browser now i am to run my java browser.
now i am trying to create a tabbed browser.i am using openInNewBrowserPanel(null) which takes string; method of BrTabbed class to open a blank tab in my browser.
i am trying to implement some speed dialing kind of stuffs inside that by creating buttons....is it possible???
unable to call another frame inside the browser.Is there any way i can achieve this???
my code is:
/**
* Sample browser implementation.
* @author uta
*/
public class BrowserFrame extends javax.swing.JFrame implements BrComponentListener
{
/** Creates new form BrowserFrame */
public BrowserFrame() {
org.jdic.web.BrComponent.DESIGN_MODE = false;
initComponents();
brMain.addBrComponentListener(this);
public void onClosingWindowByScript(boolean isChildWindow){
if(!isChildWindow && JOptionPane.YES_OPTION==JOptionPane.showConfirmDialog(
this,
"The webpage you are viewing is trying to close the window.\n" +
"Do you want to close this window?",
"Warning",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE))
{
brMain.closeCurrentPage();
}
}
public String sync(BrComponentEvent e) {
switch(e.getID()){
case BrComponentEvent.DISPID_WINDOWCLOSING:
String stValue = e.getValue();
if(null!=stValue){
//OLE boolean: -1 - true, 0 - false; paramsbCancel, bIsChildWindow)
final boolean isChildWindow = (0!=Integer.valueOf(stValue.split(",")[1]));
javax.swing.SwingUtilities.invokeLater ( new Runnable() {
public void run() {
onClosingWindowByScript(isChildWindow);
}
});
}
break;
}
return null;
}
suzzane selvaraj wrote:Is there any way i can achieve this???
There might be. I didn't look at your code, and I doubt anybody else will either. That's because it's (a) unformatted and (b) far too long.
It would help if you used the code tags to format your code. (When you post there's a "Code" button above the box you're posting in. Use it.) It would also help if you posted an SSCCE (follow that link and read it) instead of just dumping your entire program and hoping people can wade through it to find the relevant bits.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32769
posted
0
While I don't have any insight into this particular problem, I'd like to point out that JDIC has last seen development several years ago. Some parts of it have found their way into Java 6 and 7, but everything else I'd consider obsolete; certainly unsupported and thus liable to break in new JVMs, browsers, OSes etc. I'd urge to consider alternatives before investing significantly into JDIC.
I am painfully aware of that. I have a Swing application which I use at home, and at some point a few years ago I needed to add the ability to select locations from a map and find the latitude and longitude of those locations.
So the obvious thing was to start a browser, load Google Maps and a bit of helpful Javascript, and have the application interface with this browser to get the latitude and longitude on request. Even at the time I did that programming, JDIC was essentially dead, but after a bit of hacking I got it to work.
At the time I looked at Swing components which would act like a browser, but nothing I saw looked like it would work with Javascript and Google Maps. Delegating to a real browser seemed like the way to go, so JDIC was it. But with the risks you mentioned.
There are a few ways for me to get out of that trap:
Convert the application to an applet and try to make it work with Javascript
Rewrite the application as a web app which uses Google Maps
Redo the search for a suitable Swing component
Do you have any suggestions for other alternatives? Or recommendations about those three alternatives?
Then I googled for swing browser components. There were a lot which didn't exist any more, or which used things which didn't work any more. There was a promising candidate, but the owners wanted 980 euros for it. That wasn't in my budget for my little home project. Finally I came to The DJ Project. It's free, it comes with sample code and a demo, it seems faster and more reliable than JDIC. It's been about two hours since I downloaded it, and working from the sample code I have pretty much finished the replacement for my Swing component which uses JDIC.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32769
posted
0
Good find! I'll have to check that out. My standard bearer would have been Lobo/Cobra (on SourceForge), but that's dormant as well.