NetBeans right-click context menu flickers, disappears - java

Has anyone else had this issue? I've looked around and couldn't find anything substantial. It looks like this has been reported to NetBeans under various circumstances, but doesn't seem to be a general problem and doesn't seem to have been fixed.
I'm using a MacBook Pro with the Force Touch trackpad (the one with haptic feedback and force click), macOS Sierra, the latest version of NetBeans, and the latest JDK. Whenever I right click on pretty much anything (a file, an object in the GUI editor, etc.), the right-click context menu flickers for a fraction of a second and then disappears. It seems to be very random; sometimes if I keep right-clicking several times in a row, the menu stays put, but the amount of times I have to do this varies quite a bit, if it even works at all.
I've been able to narrow it down to clicking the trackpad with 2 fingers vs. tapping it with 2 fingers. It seems to work fine when I tap the trackpad, but there is a brief delay in the context menu appearing, which is mildly irritating. Clicking the trackpad makes the menu appear instantly, but is what causes this to happen.
My thinking is that the IDE thinks I'm trying to scroll (same 2-finger gesture) at the same time I'm trying to right-click, which is not what I'm trying to do.
I have no idea what caused this issue to happen. I've been using this setup for weeks with no issues, and it just started happening today. Reinstalling NetBeans and even reinstalling the operating system hasn't solved it (yeah, complete waste of time).
Has anyone else encountered something like this? I'm not sure how to fix it other than by tapping the trackpad instead of clicking it, which causes a slight delay in the menu appearing.

I've encountered this and had resorted to using a mouse (when possible) to avoid this problem.
A related JDK bug and root cause JDK bug describe the likely cause which is a precise scrolling introduced in Sierra that caused a fast scrolling in old applications including Java. Changes to fix this in the JDK combined with later Apple Sierra fixes introduced further issues that required additional JDK changes.
A related NetBeans bug points to a tweet that indicates the actual fix should be available in JDK 8u152 when it is released.
Updating to this version or later should resolve the issue.
See also: JDK 8u152 release notes and bug fixes that indicate the root cause bug JDK-8173876 fix is present.
I've also noticed the current Oracle JDK + Netbeans bundle is only at JDK 8u151. The Netbeans.org download site doesn't specify which JDK version is bundled in its Java variants.

Related

Java failures in Visual Studio Code

I've attached two images to quickly display what I'm talking about.
It seems to effect my environment in incredibly annoying ways, such as no auto-complete for things like variables (every time I want to utilize a variable or parameter I have to literally type is every single time).
I tried restarting VSC, as well as uninstalling and reinstalling plugins. I also did a chkdsk for errors and corrected them but that seemed to have no correlation to the issues I've been having.
Interestingly enough I've also been having some other issues with my computer, such as my mail app not working anymore (it throws an error code), and not being able to connect to other microsoft products. Not sure if it's related but it seems to have began around the same time.
Reinstall the Java extension or update to a pre-release version.
Press CTRL + SHIFT + P, and type Java: Clean Java Language Server Workspace. to clean up the workspace and restart vscode.

JavaFX sporadic rendering issue - disappearing buttons / controls

I have a Java/JavaFX application deployed as a native install for Windows and Mac. The bundled runtime is currently 8.121. You can find the installers and the Java code here: George download
I have been using this application in the classroom weekly (with 20 children) for the last 15 months, and right from the start I have seen the following problem:
From time to time, buttons disappear. That is to say, they are simply rendered as a white rectangle, making them effectively almost invisible. Both the background and label/text disappear.
This mainly happens on mouse-over, but then does not correct itself.
The buttons are still there, and clickable.
It only happens sporadically, but it seems to recur on certain machines more than others. Windows 10 now, but used to the same happened on tiny Windows 7 machines previously.
I am not able to reproduce it myself and have never seen it on a Mac, I think.
It now also happens sometimes with other widgets/controls, and even before any user interaction.
Is there some known issue around this?
Has anyone else described something similar?
Might it have something to do with certain minor operating system adjustments?
Any thoughts or ideas would be much appreciated.
Update (2018-11-06)
Just started testing my application in Java 8 in VirtualBox with Windows 10, and I now get the rendering error myself. Hurra!
Looking into the -Dprism.xxx options, I found this article:
http://werner.yellowcouch.org/log/javafx-8-command-line-options/
Testing with -Dprism.threadcheck=true, I get a lot of
"ERROR: PrismPen / FX threads co-running: DIRTY: false" with stack traces.
Setting -Dprism.dirtopts=falsedoes not solve it for me, though.
But running with -Dprism.order=sw does. But this is not a good solution for an application that may do some demanding rendering (Turtle Geometry).
Will keep digging.
I've been having the same issue, I tried updating to Java 10 but the issue remained. I then edited the properties on java.exe and on the 'Compatibility' tab I set 'Override high DPI scaling behavior' to 'System (enhanced)' and the problem seems to have gone away (or at least it hasn't happened again yet).
I observed the same thing: Visually disappearing (but still functional) buttons and other controls (except labels) especially in areas outside the original size of the window after I have resized it manually)
In my case -Dprism.dirtopts=false reduced the problem but also didn't solve it (and was not really a satisfying solution anyway).
Additionally I observed that some TextField controls also showed rendering glitches (looked like the same text was rendered twice with a little offset). That finally put me on the right track:
It turned out to be just a missing Platform.runLater(...) around some calls to TextField.setText(...) (from another thread) for exactly these TextField controls, which was causing this (even for e.g. a Button which is at a totally different place - also in the widget hierarchy).
I know, this is probably not the answer in all cases, but hopefully it helps at least some others facing the same problem (took me a full day to find out).

DCEVM code redefinition is disabled

I'm working with GuideWire - it's an out of box online insurance implementation. It's java based and has its own IDE. Firstly DCEVM worked perfectly, increasing my productivity dramatically. But couple days ago, it has stopped working, supplying me with
"Classes hasn't been reloaded as coderedefenition is disabled".
I've already tried everything and asked everybody for help, but nobody has faced this problem.
More than likely this is because the version of java you have started the app server with is now different and doesn't have the DCEVM applied to it.
You need to double click and run the applicable dcevm.jar and then it will throw up a UI for you to view and select the appropriate JDK's to apply the Dynamic Code Evolution VM changes onto.
Full video showing how to do that is here https://www.youtube.com/watch?v=eLFxCRaVh-g

Oracle Forms 10g Sticky Cursor

I face a really strange problem. The problem is that sometimes the cursor does not listen to mouse, it become suck on the field and does not move to any other field when using mouse navigation but navigation works as expected when using the tab key.
Has anybody else faced the "Sticky Cursor" problem? Oracle support says, that problem is fixed by installing newest Java update, but it didn't help.
I understand the problem you are facing. The last Oracle Forms application I worked on 2 - 3 years ago was plagued by the same issue.
I spent a long time working with Oracle Support investigating the issue but even after applying successive Oracle Form patches, later versions of the Java Runtime Environment and code changes to the Forms the problem remained.
In case it is of use here is a link to question I raised on the Oracle Forms OTN Forum asking if the problem remained on Oracle Forms 11g.
Unfortunately I was never able to resolve the problem. I hope you have better luck.
There are a few different causes for this to happen.
1) You use timers in your application. Just avoid using timers if possible this is a main cause of having problems with the mouse focus.
2) Some versions of java or jinitiator have also problems with the mouse focus. So try to use the latest versions of java 6 (version 24 or above or something like that), you can also use java 7 of course.
3) There are also a few patches of the application server to fix mouse focus problems. You have to check them all. If the right ones are installed this should fix all your problems.
I have the same problem with the "Sticky Cursor" and I tried (just for testing) the following:
If the form has Required Fields, just change the Required property from YES to NO.
If the form has Radio Buttons no visibles, make it visibles.
Try this only to testing purpose and tell me if works because I do that and in some cases works for my apps.

Eclipse Helios having performance problems Mac OS X 10.6.5

Short Story: My house was broken into MacBook Pro among stolen items. Bought a new MacBook restored from TimeMachine drive including Eclipse folder. System files could not be restored because hardware was slightly different. I did a system update and updated to 10.6.5 and Java 1.6.0_22, all the latest. I run Eclipse Helios for Java development for college assignments.
The problem I am having is that when I run Eclipse and start coding when I get to a method of any type when eclipse usually throws up an auto-complete type box underneath the current line the program hangs for a few seconds while it loads / moves through the list depending on how fast I am typing. Example:
JTextField txt = new JTextField();
txt.get....
I could type the second line out pretty quickly as I know what I am looking for but the program will hang (multicolor swirly mac icon will replace pointer). Eclipse process will spike to 100% and I will not be able to do anything until the auto-complete box finishes whatever it could possibly be doing and the suggestion moves down to "getText()" or whatever the list beginning with "get" contains.
Things I have done to correct include, re-downloading and installing eclipse into another location, creating a new workplace in that eclipse install, re-creating the projects and code files by hand (i.e. not importing anything). The problem still persist.
I am not seasoned enough in Java to abandon the helpful suggestion box, especially when I am learning new things.
Anyone else experience this problem or know a possible solution I have not tried?
This happens with me with Android development, and I have a clue as to why - documentation! If I uninstalled the documentation, meaning the completion list wouldn't show me any API documentation, the completion list was back up to normal speed. Installed it back, the completion list is slow again. This wasn't a problem in Galileo, just Helio.
I'm trying to find the best JVM settings to use with eclipse to see if I can improve things.

Categories

Resources