GWT + OSX = SWT issues - eclipse

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.

Related

How to disable Eclipse IDE Language Server

I am running Eclipse IDE
Version 2018-12 (4.10.0)
Build id: 20181214-0600
On macOS Mojave
Version 10.14.1
MacBook Pro 2018 with 32GB and cpu 2.9 G i9
When I attempt to things such as open up a class file etc - I see the Initialize Language Server and I get the famous BeachBall - some times it is for a second or two and other times 30 or more seconds.
Is there some configuration or something that can improve the performance of this or ability to turn it off? Search the web has turned up nothing so far. At first I thought it was the freemarker IDE extension - uninstalled that but no change.
I uninstalled freemarker IDE and all the other JBOSS extensions since I am not currently using them.
I then when into Preferences -> Language Servers and turn them all off.
Now I do not have any issues with slowness of opening files or the famous mac BeachBall.
For me the issue was with Spring, and then I went ahead and turned off all Spring language servers. I do not know what capabilities are lost due to this, but there seems to be lot of improvement that is needed here before we actually use it.
What a pain in neck, killed my office work productivity for almost a month!

ubuntu 18.04LTS, eclipse photon, Swing app - breakpoints hang entire screen

I have had the same problem with both Oxygen and Photon latest releases on Ubuntu 18.04LTS with java version "1.8.0_151".
I am debugging a Swing application. After reaching an enabled break-point, the entire Ubuntu GUI "hangs". Mouse clicks on an icon which start other applications and the eclipse window are totally ignored. The only recovery is to reboot the computer.
The strange thing is this appears "intermittently". It will work fine for long periods of time and the other times it occurs. It is in one of the "it always occurs" times.
.
I don't recall experiencing this with non-GUI applications.
Any thoughts on how to fix/workaround this?
TIA,
Roy
I was also facing the same issue. I would suggest to check your OS, if it is 32 bit downgrading your eclipse to Oxygen package seems to be the only choice available. Else you can upgrade your OS to 64 bit if supported by processor if you wish to carry forward with Photon package of eclipse. Support by eclipse on 32 bit OS is no longer available.

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

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.

build.dir error in netBeans

I am working on my own, learning about Java servlets and JSPs. My machine configuration as follows is from NetBeans' About page.
Product Version: NetBeans IDE 8.0.1 (Build 201408251540)
Updates: NetBeans IDE is updated to version NetBeans 8.0.1 Patch 1.1
Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Tomcat 8.0.14 for Windows x64 is also installed as the web server.
I created a tiny web app yesterday, which was working as expected. When I went to the next exercise in the book, it was necessary to install MySQL. That seemed pretty straightforward, but alas, the install ran into a couple of problems. Unfortunately, I had not created a restore point right before that attempt, so I went back to the restore point created before the Tomcat install.
I re-installed Tomcat, and as a sanity check, started it, started NetBeans, tried to the run the tiny web app and after removing the server and re-adding it (because I got an error about the server) in NetBeans, got a message that I needed to set the build.dir.
For a tiny app, this is just annoying, but when working on a large app, it would be nice to avoid this problem. Another book author supplied app was working before, and is still working so...
Here are my questions:
1) Why/how would simply re-installing Tomcat cause a break in something that was working?
2) It seems as if the build.dir is set in build-impl.dir (in the app that is working) with a statement like (the opening and closing tags are missing so the statements would appear):
property location="${build.dir}/empty" name="empty.dir"
One post I read somewhere said that the above statement should be before the:
fail unless="build.dir">Must set build.dir
3) How/where is this build.dir set during the creation of a NetBeans web app? Is there some dialog box that I'm not completing correctly? If I miss it, is there a way to get back to it after the app gets "confused"?
Thanks in advance for any help on this.

java 7 update25 applet not working on IE10

Anyone has success of running applet page below with IE10 installing the jre7u25?
http://www.java.com/en/download/testjava.jsp
Are there any way to disable update of java when using runapplet below?
http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
Anyone has success of running applet page below with IE installing the jre7u25?
I don't use Windows, but I'm sure someone has. At least for some version of IE. It is (frankly) implausible that it doesn't work in the vast majority of cases.
Please be specific about what version of Windows and IE you are talking about, and how it is "not working" for you.
Are there any way to disable update of java when using runapplet(jnlp) below?
This doesn't make sense. JNLP doesn't update Java.
The problem with Java and IE10 seems to be to do with 32bit versus 64bit. Apparently IE10 defaults to running in 32bit mode, even on a 64bit platform. And a 32bit browser requires a 32bit Java plugin.
Check what versions of Java you have actually got installed.
Try switching IE10 to "Enhanced Protection Mode" and see if it can find 64bit Java.
Try manually installing a 32bit Java.
Reference:
http://www.java.com/en/download/faq/win8_faq.xml
I figured out why the problem occurs.
IE10 runs in 64bit frame but the tab runs in 32bit mode.
There is a way to run tab in 64 bit mode in windows8.
http://www.lockergnome.com/windows/2012/08/25/how-to-make-internet-explorer-10-run-in-64-bit/
But it doesn't work in windows7.
I tried with chrome ie tab which runs chrome and ie in 32bit mode in which the applet works.
I had problems too with my applet. In Google Chrome from the start works perfectly.
Internet explorer 10 seems not recognize new Java 7 u 25 installed on PC after automatic upgrade.
I solved problem with next steps:
uninstall all Java 7 versions on PC
Download Java package on http://www.oldapps.com/java.php (depending what you need 32 or 64 bit)
install Java
After that IE10 recognized Java and applet works fine.
Maybe just add the env var like the next post says. That functions for me!!!
https://forums.oracle.com/thread/2530883?tstart=0
And add too the parameter at execution time like the next post
http://nicolask.wordpress.com/2012/11/30/oracle-jnitiator-version-too-low-please-install-version-1-1-8-2-or-higher/
I hope this help you!!! And as an advice use chrome for better performance.
The only way I could get the latest java (7 update 25, 32 bit) to run ALL THE TIME in Internet Explorer 10 desktop mode (in Windows 8 64 bit) was to create a new shortcut to:
"C:\Program Files (x86)\Internet Explorer\iexplore.exe
Then hitting advanced (in the shortcut) and choosing RUN AS ADMINISTRATOR
If you do not want to do that (for security reasons), the work around that I found, was to install Chrome (as Java works all the time) and use that for sites that require Java.
I hope that helps
the 64-bit java plugin is not compatible with Enhanced Protected Mode, which is a new type of sandbox they have for IE10 and IE11.
Therefore , disable Enhanced Protected Mode, install 32-bit JRE and now IE should run 32-bit child processes for each window, which will be compatible with Your 32-bit Java plugin.
This is valid for the desktop-mode IE in Win8. The new-flat-unintuitive-mode IE has Enhanced Protected Mode enable per default. You can check by using Process Explorer, and showing the Integrity column. If "AppContainer" is displayed, then EPM is used
Hope this helps