Results 1 to 8 of 8
  1. #1
    Icandoit is offline Member
    Join Date
    Oct 2013
    Posts
    12
    Rep Power
    0

    Default DJ Project Web Browser errors

    Java Code:
    package com.rswebclients;
    
    import java.awt.BorderLayout;
    
    import java.awt.FlowLayout;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    
    import chrriis.common.UIUtils;
    import chrriis.dj.nativeswing.swtimpl.NativeInterface;
    import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;
    
    /**
     * @author Christopher Deckers
     */
    public class Test extends JPanel {
    
      public Test() {
        super(new BorderLayout());
        JPanel webBrowserPanel = new JPanel(new BorderLayout());
        final JWebBrowser webBrowser = new JWebBrowser();
        webBrowser.navigate("http://google.com");
        webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
        add(webBrowserPanel, BorderLayout.CENTER);
        // Create an additional bar allowing to show/hide the menu bar of the web browser.
        JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 4, 4));
        JCheckBox menuBarCheckBox = new JCheckBox("Menu Bar", webBrowser.isMenuBarVisible());
        menuBarCheckBox.addItemListener(new ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            webBrowser.setMenuBarVisible(e.getStateChange() == ItemEvent.SELECTED);
          }
        });
        buttonPanel.add(menuBarCheckBox);
        add(buttonPanel, BorderLayout.SOUTH);
      }
    
      /* Standard main method to try that test as a standalone application. */
      public static void main(String[] args) throws Exception {
        UIUtils.setPreferredLookAndFeel();
    	NativeInterface.open();
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            JFrame frame = new JFrame("DJ Native Swing Test");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(new Test(), BorderLayout.CENTER);
            frame.setSize(800, 600);
            frame.setLocationByPlatform(true);
            frame.setVisible(true);
          }
        });
        NativeInterface.runEventPump();
      }
    
    }

    Errors on running:
    Java Code:
    NativeSwing[1]: Exception in thread "main" java.lang.IllegalStateException: The native side did not receive an incoming connection!
    NativeSwing[1]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.runNativeSide(SWTNativeInterface.java:1243)
    NativeSwing[1]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.main_(SWTNativeInterface.java:1461)
    NativeSwing[1]: 	at chrriis.dj.nativeswing.swtimpl.NativeInterface.main(NativeInterface.java:224)
    NativeSwing[1]: Caused by: java.net.SocketException: socket closed
    NativeSwing[1]: 	at java.net.DualStackPlainSocketImpl.accept0(Native Method)
    NativeSwing[1]: 	at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
    NativeSwing[1]: 	at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
    NativeSwing[1]: 	at java.net.PlainSocketImpl.accept(Unknown Source)
    NativeSwing[1]: 	at java.net.ServerSocket.implAccept(Unknown Source)
    NativeSwing[1]: 	at java.net.ServerSocket.accept(Unknown Source)
    NativeSwing[1]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.runNativeSide(SWTNativeInterface.java:1241)
    NativeSwing[1]: 	... 2 more
    NativeSwing[2]: Exception in thread "main" java.lang.IllegalStateException: The native side did not receive an incoming connection!
    NativeSwing[2]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.runNativeSide(SWTNativeInterface.java:1243)
    NativeSwing[2]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.main_(SWTNativeInterface.java:1461)
    NativeSwing[2]: 	at chrriis.dj.nativeswing.swtimpl.NativeInterface.main(NativeInterface.java:224)
    NativeSwing[2]: Caused by: java.net.SocketException: socket closed
    NativeSwing[2]: 	at java.net.DualStackPlainSocketImpl.accept0(Native Method)
    NativeSwing[2]: 	at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
    NativeSwing[2]: 	at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
    NativeSwing[2]: 	at java.net.PlainSocketImpl.accept(Unknown Source)
    NativeSwing[2]: 	at java.net.ServerSocket.implAccept(Unknown Source)
    NativeSwing[2]: 	at java.net.ServerSocket.accept(Unknown Source)
    NativeSwing[2]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.runNativeSide(SWTNativeInterface.java:1241)
    NativeSwing[2]: 	... 2 more
    NativeSwing[3]: Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
    NativeSwing[3]: 	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    NativeSwing[3]: 	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    NativeSwing[3]: 	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
    NativeSwing[3]: 	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
    NativeSwing[3]: 	at java.lang.Class.forName0(Native Method)
    NativeSwing[3]: 	at java.lang.Class.forName(Unknown Source)
    NativeSwing[3]: 	at org.eclipse.swt.graphics.Device.<clinit>(Unknown Source)
    NativeSwing[3]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.runNativeSide(SWTNativeInterface.java:1273)
    NativeSwing[3]: 	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.main_(SWTNativeInterface.java:1461)
    NativeSwing[3]: 	at chrriis.dj.nativeswing.swtimpl.NativeInterface.main(NativeInterface.java:224)
    Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.net.SocketException: Connection reset
    	at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface.openChannel(OutProcessSocketsMessagingInterface.java:67)
    	at chrriis.dj.nativeswing.swtimpl.core.MessagingInterface.initialize(MessagingInterface.java:57)
    	at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface.<init>(OutProcessSocketsMessagingInterface.java:32)
    	at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface$SwingOutProcessSocketsMessagingInterface.<init>(OutProcessSocketsMessagingInterface.java:162)
    	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.createOutProcessMessagingInterface(SWTNativeInterface.java:1072)
    	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.createOutProcessCommunicationChannel(SWTNativeInterface.java:811)
    	at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface.java:342)
    	at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
    	at com.rswebclients.Test$2.run(Test.java:48)
    	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    	at java.awt.EventQueue.access$400(Unknown Source)
    	at java.awt.EventQueue$3.run(Unknown Source)
    	at java.awt.EventQueue$3.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    	at java.awt.EventQueue.dispatchEvent(Unknown Source)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.net.SocketException: Connection reset
    	at java.net.SocketInputStream.read(Unknown Source)
    	at java.net.SocketInputStream.read(Unknown Source)
    	at java.io.BufferedInputStream.fill(Unknown Source)
    	at java.io.BufferedInputStream.read1(Unknown Source)
    	at java.io.BufferedInputStream.read(Unknown Source)
    	at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
    	at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    	at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
    	at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    	at java.io.ObjectInputStream.<init>(Unknown Source)
    	at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface.openChannel(OutProcessSocketsMessagingInterface.java:65)
    	... 22 more
    I have no clue..

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,560
    Blog Entries
    7
    Rep Power
    21

    Default Re: DJ Project Web Browser errors

    Try http://www.google.com, instead of http://google.com

    kind regards,

    Jos
    Last edited by JosAH; 08-27-2014 at 02:07 PM. Reason: stupid forum software ...
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,049
    Rep Power
    6

    Default Re: DJ Project Web Browser errors

    Google seems to be completely on https nowadays too, so https://www.google.com.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    Icandoit is offline Member
    Join Date
    Oct 2013
    Posts
    12
    Rep Power
    0

    Default Re: DJ Project Web Browser errors

    Quote Originally Posted by gimbal2 View Post
    Google seems to be completely on https nowadays too, so https://www.google.com.
    It has nothing to do with the website, I tried multiple different sites.

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,560
    Blog Entries
    7
    Rep Power
    21

    Default Re: DJ Project Web Browser errors

    I checked that terrible stack trace: line #27 (see above) is very suspicious: you are supplying a 32 bit .dll file for a 64 bit system.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,049
    Rep Power
    6

    Default Re: DJ Project Web Browser errors

    That, besides the fact that it is a Swing application yet SWT libraries are also needed.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,560
    Blog Entries
    7
    Rep Power
    21

    Default Re: DJ Project Web Browser errors

    Quote Originally Posted by gimbal2 View Post
    That, besides the fact that it is a Swing application yet SWT libraries are also needed.
    Yup; if I were the OP I'd start reading the documentation of that embedded web browser; from the code I can see a native 'event pump' for the swt framework, but in a Swing application; that doesn't make sense. I never use something I don't understand, otherwise this is the misery you get (and deserve).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  8. #8
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,049
    Rep Power
    6

    Default Re: DJ Project Web Browser errors

    Yeah well that's the difference between us (old school generation) and youngsters: the youngsters have been brought up with the new breed of horror movies. Let me explain:

    old school generation: don't run into a pitch black room when you hear a strange moaning sound; find a light first, try to figure out what the sound is and at the first hint of trouble, run for cover

    new generation: take off all your clothes, run into the pitch black room shouting "IS ANYONE THERE!? HELLO?" while looking for a shower and at the first hint of trouble, shout loudly for help


    DISCLAIMER: Just idle off-topic banter, I'm not referring to anyone specifically.
    Last edited by gimbal2; 08-28-2014 at 11:15 AM. Reason: disclaimer
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Renamed project and got loads of errors...
    By Xyexs in forum New To Java
    Replies: 8
    Last Post: 08-31-2013, 12:14 AM
  2. Compile errors when adding a project to netbeans (help!)
    By Dreaming_Demon in forum New To Java
    Replies: 2
    Last Post: 01-19-2013, 01:22 PM
  3. Web Browser Project
    By Divya Insan in forum New To Java
    Replies: 2
    Last Post: 08-01-2012, 06:47 AM
  4. Netbeans IDE Errors while compiling a JSP project
    By pala in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 12-29-2011, 07:35 AM
  5. Replies: 10
    Last Post: 10-11-2009, 07:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •