Can't get SWT Browser to work in standalone RCP app on CentOS - eclipse

My RCP app running in CentOS 6.7 uses the SWT Browser. It works properly when launching the app from within eclipse, but when I run it as a standalone app, the Browser cannot be instantiated, and a SWT Exception with message "No more handles" is thrown. I prefer to use the browser with style SWT.WEBKIT, but it doesn't work with style SWT.NONE either.
I have the latest versions of packages webkitgtk, webkitgtk-devel, and gtk2 installed. I tried using style SWT.NONE and set env variable MOZILLA_FIVE_HOME to point to the firefox installation directory, the xulrunner executable, and even the google-chrome installation. I also added $MOZILLA_FIVE_HOME to LD_LIBRARY_PATH. If I have anything set for MOZILLA_FIVE_HOME the app segfaults when the Browser is instantiated. If I don't set MOZILLA_FIVE_HOME I get the SWT exception.
The SWT documentation says that if I have webkitgtk installed, eclipse will detect it automatically. But it also says that with eclipse 4.2 and later it works with gtk3 by default. I don't see any gtk3 packages.
I'm using Eclipse SDK 4.4.2 in my target, but my app is an Eclipse 3 app. So perhaps this is an error in the compatibility layer. I can try using an Eclipse 3.x SDK, but I'd rather not do that. The SWT plugin being installed is version 3.102.xxx.
As I said, the app works when launched inside eclipse, so am I perhaps missing a plugin in my built product? I see the swt.gtk plugins installed, but I don't know what else to look for. Also the standalone app works properly in Ubuntu.

The following entries in eclipse.ini enable the Browser control to work in CentOS 6.7 with style SWT.NONE
-vmargs
-Dorg.eclipse.swt.browser.DefaultType=mozilla
-Dorg.eclipse.swt.browser.XULRunnerPath=/path/to/xulrunner/
This also requires that a supported version of xulrunner be installed (1.9.2 worked for me), as precisely specified in the SWT FAQ. NB: The following caveat is stated in the FAQ regarding the possible use of firefox as a xulrunner instance:
Also note that a Firefox release whose contained Gecko version
correlates with the Mozilla versions above can also be used with
Eclipse 3.1 and newer (Linux only), provided that it has been compiled
with linkable Gecko libraries. It is important to note that Firefox
downloads from mozilla.org do not satisfy this criteria, but Firefox
installations that are included in major Linux distributions often do
in the absence of a XULRunner installation. Attempting to use a
Firefox install without linkable Gecko libraries will throw an error
with message "No more handles [NS_InitEmbedding...error -2147221164]".
The firefox installed on my CentOS 6.7 system doesn't seem to have the linked gecko libraries, but I may have manually installed a differerent version at some point.
There appears to be no way to use Eclipse 4.4 or newer with webkit on CentOS 6.7, since gtk3 is required per the FAQ, and the only reference I found to installing gtk3 on CentOS 6.x said that it would be very difficult.
The FAQ is confusing to me on a couple points. It seems to contradict itself, saying that a compliant xulrunner can be used with eclipse 4.4 and then saying that it cannot, because eclipse 4.4 "uses GTK 3 by default" and xulrunner has not been ported to gtk3. My SWT installation appears to be built for gtk3, but it did not prevent me from using xulrunner. Furthermore, saying that gtk3 is used by default seems to imply that it's possible to use some other version of gtk, but hours of searching turned up no information on that.
If anyone knows how to make eclipse 4.4 work with gtk2, I would greatly appreciate it. I'm not happy at all about being forced to use gecko for eclipse 4.4 apps running in CentOS 6.x.
EDIT: It occurs to me that a big unanswered question is why the Browser doesn't throw the exception with style SWT.WEBKIT and no XulRunnerPath property set when I launch the app from within eclipse. I'd really like to understand that.

Related

Is SikuliX 2.0.5 compatible on RedHat 8?

We’ve been trying to get SikuliX 2.0.5 to run on a RHEL 8 system, and not having much luck.
We went through the instructions on this webpage:
https://sikulix-2014.readthedocs.io/en/latest/newslinux.html#newslinux
We started on RHEL 7, but the OpenCV shared library required a newer version of GLIBC than is standard on RHEL 7 (version ‘GLIBC_2.27’ not found (required by ~/.Sikulix/SikuliLibs/libopencv_java430.so)), so we moved up to RHEL 8. We had to build OpenCV (v4.3.0) from source because we could not find a java companion package for RHEL 8, which required quite a few other dependencies, but in the end we got it built with most options enabled, and installed as root on the system. We also got Tesseract installed via a package, as well as xdotool and wmctrl.
We are setting LD_LIBRARY_PATH to ensure that the OpenCV libs are picked up, and when we run with the “-v -c” options to the IDE, there are no obvious problems reported. It seems to believe it is moving the mouse, though we can see that it is not, and when we try to capture a screenshot, the “canvas” from which to capture is either uninitialized/garbage frame buffer memory, or a totally black screen. On rare occasions we have seen the actual desktop, but most times we do not.
Originally the system had 2 monitors, but was subsequently reconfigured to a single display system. We were originally running remotely over NoMachine, but have also tried running locally and observed no difference in behavior.
Any pointers or suggestions would be most welcome. Given that no error messages are being reported, we are out of ideas for how to proceed in debugging the problem. It appears that more native support is provided for Debian-based systems, but we’re attempting to validate a product which only advertises support for RHEL systems, so we’d prefer to get it working in this environment if at all possible.

Netbeans plugins site is down rendering netbeans useless

I'm using Netbeans 11.1 and need to a open a JS file in my project.
I need to install the Oracle JS Parser for Netbeans which I cannot do so because the site - plugins.netbeans.org is down. I'm getting this error -
Networking problem in
http://plugins.netbeans.org/nbpluginportal/files/nbms/1552395301_org-netbeans-libs-oracle-jsparser.nbm
Is there anyway I can install it manually otherwise I cannot resume work with netbeans rendering it useless.
The issue you are encountering was a bug in the released version of NetBeans 11.1. See Bug Report NETBEANS-2903 Warning - could not install some modules: Nashorn Integration - No module providing the capability com.oracle.js.parser.implementation could be found. 19 further modules could not be installed due to the above problems.
You have two options to fix this:
Upgrade to NetBeans 11.2 or later, where the problem does not exist.
Download and install the plugin yourself on NetBeans 11.1 by going to Tools > Plugins > then clicking the Settings tab, then the Add button. In the Update Center Customizer window enter any descriptive text in the Name field, in the URL field enter https://netbeans.apache.org/nb/plugins/11.1/catalog.xml.gz and then click OK. However, I just tried that, and got the error "Unable to connect ... because of Unexpected end of file from server". That connection may come good at any time, or it may be that you can no longer reliably access the plugin libraries for older versions of NetBeans.
So your only immediate solution is to upgrade to any newer version of NetBeans. That's desirable anyway, because you will get other bug fixes as well as this one. And if you move to NetBeans 12.x you will also get added functionality, and be able to use more recent versions of the JDK.
Also, as a separate but related matter, you were using an http URL rather than an https URL for your download. I'm not certain, but I doubt if that will work now; if you are not using a secure link you should expect failure, and in any case it looks like you were using a URL for NetBeans 8 rather than NetBeans 11.

How to deploy application with QT5

So I have made GUI frontend for latex with QT5 using QT creator. The application works fine, but I'm unable to deploy it. The deploy option in build is grayed out. I have also tried following this guide but I can't even configure my QT to use static linking. I was able to configure the source, but when I try to run mingw32-make sub-src, it says nothing to do here.
I downloaded QT from here using the link Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB). I have also downloaded microsoft visual studio express for Windows 8 to get tools required for building c++.
I also tried to install mingw32 manually. I have also installed Strawberry perl, because one guide told me to do that, but that did nothing.
I managed to fix this problem. There was one .dll. Reason why I didn't find it earlier was that my application did not need it by itself, but one of libraries I used was dependaple from it. The missing .dll was icuuc49.dll.

How can I install the BlackBerry v5.0.0 component pack into Eclipse?

I'm trying to install the latest v5.0.0 "beta 2" BlackBerry OS Component Pack into Eclipse 3.4.2 with BlackBerry Eclipse plugin v1.0.0.67, but have hit a few problems. Has anybody found an easy way to do this?
I had no trouble installing the v4.5.0 and v4.7.0 Component Packs.
It's rather strange that BlackBerry are shipping new phones with the v5.0.0 OS installed (e.g. a Storm 2 9550 and Bold 9700 that I just bought), and pushing that update to phones whilst the BlackBerry website still considers the v5.0.0 SDK / Component Packs to be "beta 2"! If anybody knows when an official non-beta Component Pack is going to be released that might solve my problem...
In case it helps, the problems I've hit so far are:
-Contrary to the implication on the BlackBerry website, the Eclipse "Software Update..." option for the v5.0.0 Component Pack claims it only works on the v1.0.0 Eclipse BlackBerry plugin, not the new v1.1 one.
-I then tried to install the v5.0.0 Component Pack through the "Software Updates..." menu in Eclipse using the v1.0.0 Eclipse BlackBery plugin. Once I'd done the 200MB download the install failed with a "Invalid zip file format" error.
-I might just have been unlucky with a corrupted download but I did try it twice, once through "Software Updates..." and once by selecting "Archive" to install the downloaded Component Pack (which unlike v4.5.0 and v4.7.0 was a JAR, not a ZIP).
Using Eclipse 3.5.1 and the 1.1 component pack, I had no trouble installing the 5.0 JDE from the 1.1 component pack update site from within Eclipse - ie: using the update site http://www.blackberry.com/go/eclipseUpdate/3.5/java ...
It could be possible that Blackberry has fixed whatever problem you encountered in their latest beta, or the latest version of Eclipse just works better...but at any rate, I hope you've gotten your setup working, but if not, perhaps trying again with the latest versions will fix things!
They (rim support) did experience some issue with the zip they have on the site for you to install.
See this thread
If you see Unconnected sockets not implemented just before your Invalid zip file format, like:
osgi.bundle,net.rim.eide.doc,1.0.0.67.
Exception connecting to
https://www.blackberry.com/Downloads/auth/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&dl=A7B283681EA93067610F5EE0EEB46A29.
Unconnected sockets not implemented Exception connecting to
https://www.blackberry.com/Downloads/auth/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&dl=A7B283681EA93067610F5EE0EEB46A29.
Unconnected sockets not implemented
Error closing the output stream for
net.rim.eide.feature.componentpack4.3.0/org.eclipse.update.feature/4.3.0.16
on repository file:/C:/eclipse/. Error unzipping
C:\DOCUME~1\tysonl\LOCALS~1\Temp\net.rim.eide.feature.componentpack4.3.0_4.3.0.169073623197643742544.jar:
Invalid zip file format Error closing the output stream for
net.rim.eide.feature.componentpack4.5.0/org.eclipse.update.feature/4.5.0.16
, the support mentions:
The "Unconnected sockets not implemented" is caused by a bug in current versions of JDK 1.6.
You can work around this by downgrading to JDK 1.5 (modify your PATH and JAVA_HOME variables) to install the plug-ins. You may need to delete the files in your windows temp folder as well (Eclipse could have cached bad copies of the file).
This should be fixed in JDK 1.6 update 14.
(so what version of java are you using?)
As mentioned in the same thread:
The following is from the "blackberry plugin for eclipse" download page:
It is recommended that users outside of North American or users who have experienced problems with the BlackBerry update site use the links below to manually download and install the components.
Yep, I've read that bit. That's essentially what I tried to do. What that doesn't say is you need to remove the update site from your site list before trying to install the manual downloads via the archive function.
Helpful to me:
http://supportforums.blackberry.com/t5/Java-Development/Invalid-zip-file-format-trying-to-add-4-7-0-components-to/td-p/411105;jsessionid=32490C8741FEE961B9436E453DFF7430

GWT + OSX = SWT issues

I'm new to GWT development and I'm putting myself through the paces with Google's tutorial but I'm getting errors:
java[10574:80f] [Java CocoaComponent compatibility mode]: Enabled
2009-11-06 15:27:38.769 java[10574:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
I checked my Java prefs and I have Java SE6 (64 bit) as the preferred JVM. I'm really not sure how to clear this up.
I think gwt hosted mode only works in a 32 bit environment, as of gwt version 1.7.1. Try passing "-d32" as an argument to the jvm to tell java 6 to run in 32 bit mode. That seems to work for me in Eclipse 3.5, Gwt 1.7.1 in Snow Leopard.
If it still doesn't work, searching google for "Leopard GWT d32" should turn up some articles that should help you troubleshoot more.
This message just means that the GWT toolset has loaded the Mac Java AWT at some point, and when you do that in Eclipse or any other SWT application you will get this message.
For you it's harmless and isn't the result of anything that you did in your code.
There's an open issue on GWT and 64-bit Java that's been around for a long time, and includes various workarounds that you may be able to get to work. GWT 2 (not yet released) doesn't use the same hosted mode, and so the GWT developers say it won't have this issue.