UI twitching and missing letters when using JRE 8 - java

I am having a problem with my Java on my personal laptop. I have Java 8u11(JDK and JRE). I am working in Eclipse Kepler and making applications. Until now I was working on my office computer and I had no problems(I have Java v7u55 on the office one).
Starting yesterday after I created a small Swing-GUI program as a test in Eclipse and I ran it on my personal computer the program came up all weird and twisted with all the letters twitching or missing.
You can see more from the screenshot below.
Something like this:
The same thing happens with all my executable JAR files.
The button are not empty there is text in them:
I've tried re-installing Java and installing it again and it won't work. I have the Java added to my System Variables Path.
I think it is a problem with the JRE/JDK. Maybe downgrading the Java version I have installed ?
Restart of the computer didn't work. Any other ideas or solutions ?

This question can be closed as answered, as the solution from the question: Swing rendering appears broken in JDK 1.8, correct in JDK 1.7
helped in solving my issue.
I changed my 3D Settings in NVIDIA Control Panel to High-performance NVIDIA processor and was able to run my Java programs with JDK 8u11 without any problems.
Thanks :)

Related

Problems with Java on Visual Studio Code

I only have a Raspberry Pi to practice, and Visual Studio Code runs smoothly on it for many languages I've tried, but I can't seem to run Java on it. I installed the Extension Pack for Java, but when I create a Java Project and try to run it, the Debugger keeps loading and doesn't start at all. I tried uninstalling/reinstalling the Extension Pack and the Debugger, but without success. I know the solution might be obvious, but I tried googling it and found nothing.
Found out that the latest version of the extension "Language Support for Java by RedHat" wasn't working properly on my VSCode. I installed version 1.0.0 and it loaded everything and now I can run Java smoothly.

Migrate to new eclipse version on Mac gives No class found error

I upgraded to the newest Mac Pro running Big Sur (11.4) from my 12 year old Mac Pro running Mojave (10.14.6). The old version of Eclipse was version was Kepler service release 2. When I installed the Mac and restored from backup, Eclipse flat out would not run, so I deleted it and downloaded and installed the latest version 2021-03 (4.19.0). I also updated JAVA SE to version 16.0.1 from Java version SE 7.
When I tried to run/compile a previous working project, I get:
I then decided to update the libraries found in the Java Build Path properties to the latest I could find:
to see if that made any difference. It didn't. I'm probably missing something very basic but I don't know what, since I use Eclipse only rarely.
I decided to go down the rabbit hole and download the missing jars in the error log, one after another. It just kept getting deeper and deeper with no end in sight. Just didn't quite pass the smell test.
Hmmm. I originally downloaded eclipse from the main elcipse.org page and went to the downloads button and installed it. Turns out the eclipse directory was only 21.2 MB. Plugin directory was basically empty. Hmmm.
I stumbled on the download file eclipse-SDK-4.19-macosx-cocoa-x86_64.dmg after looking for a SWT download. This file was the eclipse version that was 295.4MB in size. Double hmmm. So I ran it. Needless to say I was startled when my project compiled and ran right off the bat. Gee, thanks eclipse. Can you make it any more difficult for your Mac users? Anyway after a wasted day of head banging... problem solved.

Eclipse Neon (MAC OS), Static Web Project doesn't work (could not find JRE executable)

I am new to programming and webdesign. I started with Eclipse some months ago to learn Java. Everything works fine. When I tried today to run a Static Web Project on a HTTP Server Preview (like in that Tutorial https://www.youtube.com/watch?v=URCyWNflkpQ), Eclipse had some issue with an older Java version.
I found Java JDK (1.6) that I deleted afterwards.
I reinstalled the latest Java JDK (1.8.0_60) and made sure that only this version is in the /library/java/... . I got me a new Eclipse version as well (Eclipse Neon). Running Javaprojects like before still works.
As soon as I try to run my HTMLfile, Eclipse shows me the errormessage:
'Starting HTTP Preview at localhost' has encountered a problem.
Could not find JRE executable
When I try it with J2EE Server Preview it works though. Can I simply use this Server Preview instead? This errormessage took me hours of hopelessly searching the internet for answers. Maybe for nothing...^^
Here somebody had the same issue, but on windows. I tried the solutions, but they didn't work either:
https://www.eclipse.org/forums/index.php/m/1703151/?srch=Could+not+find+JRE+executable+http#msg_1703151
Thanks for the help!
It's a Mac-specific bug. It'll be fixed in Oxygen.1.
http://bugs.eclipse.org/518546

Netbeans: Java module installed but can not create a Java project, why?

So I have been experiencing this problem for a while. I can use my existing java projects which I created on my PC, but on my laptop I can't create new Java projects. I reinstalled the program & reinstalled modules several times.
So when I click on new project, every java-type project is in the list except the regular one called 'java'... And the funny thing is that Java is the only project type I need at the moment, but it's simply not showing up..
I've looked on the internet for an answer but all I could find was one topic which was unanswered.
Help would be appreciated, a lot.
EDIT: OS: windows 7 64 bits. Using Netbeans 7.2 I think, well the newest for sure.
I just solved this problem by simply deleting .netbeans folder in User\<User>\ and .superId in \AppData\Roaming\NetBeans\
No need to reinstall.
Unfortunately you left out the OS you are using and you didn't mention the version of netbeans you tried!
You should completely uninstall netbeans. On UNIX OSes you'll find the .netbeans Folder in your homedir where netbeans keeps a lot of information. Remove this folder too (I don't know where this folder is stored on Windows OSes).
Having removed both netbeans and this folder, try a re-installation. Now things should look much better!
In my case I have installed multiple JDK (JDK version 8 and 9) due to which Netbeans 8.2 might not working as expected and then I was unable to create project.
Then I removed JDK9 and cleared cache from \Users\admin\AppData in windows.
Then I was able to create Java Project.

So much problems with Eclipse developing for Android?

a million error per day using eclipse with the Android plug-in i tried everything uninstall plug-in ,eclipse,JDK,JRE and install them again and using different ver. also changes Workspaces , i thought the problem with the new Java and Eclipse but i solved it and still . what the alternative is there a way so it could be more stable is other IDE with Android Plugin is mature enough to use them instead of all the problem and headache that eclipse give me in my life .
Edit: i use Eclipse 3.5 and im running Win7 in 4 Gig of ram ,i read the info about the known bug with Eclipse and JDK 6 update 21 and try what they suggest but i think thats not the problem.
some of the problem that i had ,XML editor for Android also sometime the disable of the Auto-complete (i made new Workspaces now i have 10's of them ) and when i open the DDMS nothing appears even when i try to add the LogCat also alot of error msgs that prompt to me and close the IDE and sometime it just close by-itself .
Edit 2 : New Error it display to me "permGen space" ?!
What version of Eclipse are you using?
The ADT Plugin for Eclipse site warns about this:
Caution: There are known issues with
the ADT plugin running with Eclipse
3.6. Please stay on 3.5 until further notice.
Also, check your JDK to be the latest. If you are on Windows, there's a known bug with Eclipse and JDK 6 update 21. Check that you are using the latest version since Oracle fixed it.
Must add I've used Eclipse for Java Developers version 3.5 with the ADT plugin, and haven't had any of the mentioned problems so far.
EDIT: Could you be more specific with those errors?
XML editor for Android works fine with auto-complete in my case, so does the debugger. I've been able to debug applications correctly. Take in consideration when launching the emulator, it takes a few minutes for the emulated system to boot, launch your app, etc.
You should copy and paste the error messages that Eclipse displays, in order to have an idea of what is happening.
It could be a problem with the memory assigned to Eclipse, the JVM, or who knows what, but we need more detailed information in order to assist you.
EDIT 2: This is quite a common error in Eclipse. From Eclipse's Wiki:
If you see java.lang.OutOfMemoryError:
PermGen space errors, you need to
increase the permanent generation
space available to Eclipse.
PermGen is the permanent generation of
objects in the VM (Class names,
internalized strings, objects that
will never get garbage-collected). An
easy, if somewhat memory-hungry fix is
to enlarge the maximum space for these
objects by adding
eclipse [normal arguments] -vmargs -XX:PermSize=64M -XX:MaxPermSize=128M [more VM args]
The arguments after -vmargs are
directly passed to the VM. Run java -X
for the list of options your VM
accepts. Options starting with -X are
implementation-specific and may not be
applicable to all VMs.
You can also put the extra options in
eclipse.ini.
Check the link for further information, you can find common errors and bugs in the Eclipse and Sun VMs on Windows part.
I'm truly sorry for saying this, and I'll probably will be shot to death by it... but:
On every other development environment I've used in Python, Ruby on Rails, PHP <> MySQL, Java, and... all have been working best on Windows operating systems.
It was a surprise to me that Android really works best on Mac OS. Lets face it, I'm a Windows kind of guy, but for Android - Mac is your choice!
Sorry...
A million errors per day sounds like some component is severely broken. Is the Android plugin the right version for the Eclipse version you are using. There are many which are not yet ready for Eclipse 3.6
I did not have any problem getting the SDK up and running on ubuntu. Its free, the resources are great, and most of all its not windows. So linking libraries and stuff is not that big a headache. Also its much more light on your computer so you have all the power that your awesome pc has to test really heavy apps! Why don't you give it a shot? I bet you will not be disappointed. ;-)

Categories