Eclipse doesn't find jdk - java

So I asked this on RaspberryPiExchange but someone there told me to ask here so here it is.
I recently had to reinstall Rasbian on my Raspberry Pi due do something becoming corrupt and apt-get not working. I made sure to backup what I could before I reinstalled. So when I went to reinstall Eclipse and pickup where I left off in one of my Java projects it was very worrying when Java keywords weren't highlighted. I've tried googling to figure out if I skipped a step but it does seem I have. I'm running Jessie 8 with jdk8 that came preinstalled assuming it's the same one you'd get from doing apt-get install. So my question is can anyone help me figure out why it seems Eclipse no longer recognizes Java as a whole. Also, I would like to mention I have already installed the Eclipse Java Development plugin.Here is a screenshot of just a few lines to better show what I'm trying to say Screenshot of an example program screenshot of eclipse

Ok so after updating eclipse using the sudo vnc session when I went back over to the regular vnc session eclipse now finds all java related things

Related

Bluej not running in Ubuntu machine

I recently installed bluej from ducke university's website which was written to to teach java programming in coursera courses.
It successfully installed but when i tried to run it was repeatedly giving error and I searched in internet but there were no exact solution given. The error it given was included in this question.
I even included the code snippet of bluej as well directories inside jvm.
unset JAVAPATH
FOUND="false"
for VMNAME in java-8-oracle jdk-8-oracle java-8-openjdk ; do
for JDKCANDIDATE in /usr/lib/jvm/"$VMNAME"* ; do
The directories inside jvm :
I am complete new to java so please help me to run successfully bluj.
Try downloading blueJ from the official website and reinstalling only one java JDK.
It might be a problem as u have 2 different versions of Java installed and running on one system
Moreover, if you have bluej the try running it in the blueJ application itself it is much easier
Even though Duke/Coursera say that you need the 4.11/Older Specific version of BlueJ, it's not actually right. You can install the latest version of BlueJ and use the packages provided by Duke University to run it exactly as they show you.
I was struggling with the same and made a video about it right now.
How to run BlueJ Duke/Coursera Specific Version 4.11 on Ubutnu or Linux with latest BlueJ

Cannot resolve symbol "Override" on "Hello_World"

I installed Android Studio the other day to develop an app and even though it's not the first time I've used it, it's the first time I've installed it on this PC and I'm fairly new to all of it.
Problem: After installing Android Studio, I can't even make a "Hello_World" app, even the templates AS offers have a compiling error:
Where it doesn't recognize symbols like "Override". The Alt+Enter solution that offers is to Setup JDK which does nothing for all options or create annotation 'Override' which doesn't really seem like a good option.
These are both build.gradle files:
Things I've tried to fix it:
Reinstall Android Studio Multiple Times
Download JDK manually and change references.
Check Enviromental Values on system (Add JAVA_HOME and heck Path to be correct). Pretty sure both java and JDK work since in cmd I can run java and javac.
Obviously Build->Clean and File->Invalidate Cache + Restart
android.enableAapt2=false on gradle.properties
Trying to delete all java from my PC and reinstall bare minimum THEN install everything separatedly.
Install all SDK plataforms until Android KitKat.
It's worth noticing that in the past I had a lot of problems getting java to run in only one place (mainly because I install software in an HDD and have OS on another SDD).
Also, while installing AS for the first time I got into a BSOD because of VT-x having shitty interaction with virtualization of anti-virus (that took me a while to figure out) so it stopped halfway. However I've reinstalled a bunch of times so I don't know how that could matter.
The problem is very similar to this one
I'm practically lost here. I've been trying to fix this for three days and I've looked into dozens of Stack-Overflow posts with similar problems, haven't found a solution.
Any idea will be appreciated.
Thanks.
I repeated your error:
I made it by deleting Android SDK(not java SDK) in Android Studio:
File-Settings-AndroidSDK
Try to pick at least one and install
It seems that your problem is related to Android SDK
Okay guys, I've finally figured it out, thanks to artmmslv.
Android Studio's installer detected automatically - two versions of Android SDK which were corrupted (probably caused by BSOD messing up the installation).
I had to make sure to delete everything. Java SDK, Android SDK. Java JRE. Every data from Appdata or documents from Android Studio. Once the computer is clean from any traces of already installed plugins, modules, and whatnot, it should be able to set up perfectly fine paths.
Also, make sure to set up manually and correctly the Environmental Values of java (path edit and JAVA_HOME).
Thanks for the help.
I got a solution that was a problem for me.
(in Build.Gradle file) - It's the
Compile SDK version 32
//which was not the latest one,
I changed it from older (31) in old projects to (32)
And clicked: sync now,
it worked!!
Hope it helps:) Happy coding

Java Coding Console and .jar library files.

I have installed Java SE Development Kit 8u77 for Windows x64. I have also installed Java for desktop, Version 8 Update 77. Will this suffice for me to start coding. Also I did NOT manage to open the window for coding. How can I open a coding console ? How do I install .jar libraries ? Obviously I'm skipping a few 100 steps and trying to do something a couple Levels up, though Im at Level 0. Help !!
The only things you really need to start coding are:
The JDK (check)
notepad (though when more advanced, an IDE can come in handy - check)
command prompt (check)
I'm skipping a few 100 steps
Don't. All that will lead to, is you as 'experienced' developer come here to ask questions a beginner is (or should be) able to solve without problems.

Error could not find Java SE Runtime Environment / Start from scratch

I wanted to develop an android app a few months ago, so I followed all the steps from here-> https://developer.android.com/training/basics/firstapp/index.html?hl=p and I believe I downloaded all the tools I needed. I never got around to developing anything, so I tried starting again a few days ago. When I went to the above mentioned website, it said download the new versions of this and that, so I did. I tried following the steps, but now when I try to open eclipse, I get an error saying:
"Error could not find Java SE Runtime Environment".
My questions are:
How do I delete everything and start from scratch? I wan't to delete eclipse, sdk manager, sdk folder, everything. I want to follow the download instructions all over again and see what happens because it did seem to work the first time i tried a few months back.
Do I just delete some programs from control panel?
If this is not easy, how can I fix the error I'm getting when trying to open eclipse?
Edit: windows 7, 64-bit OS, if that helps
That sounds more like a problem of a corrupted Java installation. Check the JAVA_HOME environment variable. If this is empty fix this and try again.
To delete eclipse and the sdk just delete them from where you installed them.
SUGGESTIONS:
0) I assume you're running Windows. Please specify if you're on a different platform.
1) Delete Eclipse.
If you're not using Eclipse for anything else yet, I would strongly encourage you to delete it.
2) Uninstall your Java JDK (from Control Panel).
Download and install the JDK from Oracle: http://java.oracle.com.
3) Download and install the "ADT Bundle for Windows": https://developer.android.com/sdk/
In earlier versions of Android, you had to install Eclipse, the Android Plugins, and the Android SDK separately. I believe this is the procedure your link describes.
The newer "ADT Bundle" saves you this trouble. If Android is the only thing you're using Eclipse for (at least for now), you definitely want the ADT bundle. And you can probably ignore most of the instructions in your link.
'Hope that helps..

Netbeans suddenly failed to start after saying "Done Loading modules"

Netbeans 8.0 fails to start in Ubuntu 12.04 suddenly. Previously it used to work fine. But now it does not start, when I try to start, the netbeans blue loading box shows up, sometime after showing the message "Done Loading modules", it disappears & netbeans windows does not appear. However netbeans is still shown in the running processes, but the netbeans windows does not open after any time.
In the past, this also happened with netbeans 7.4 sometime ago when I disabled some plugins (probably it was due to disabling some Hudson plugin/Husdon UI plugin). But now this time it is probably after an automatic update of a plugin, I don't know which one now. I tried remove the entire cache directory as well but no improvement to situation. Is reinstalling netbeans, the only solution each time(Huh!) ?
Edit:
Sometimes it works when I run from terminal using(worked for netbeans 8.0 but not for 7.4):
$ /bin/sh /home/user/netbeans-8.0/bin/netbeans
I have experienced this before with Netbeans 7.4 and 8 on Ubuntu 12.04 x64 and on Windows 7 SP1 x64. The only way I could solve it was by removing Netbeans and its cache, and then reinstalling it. Maybe it's a rigorous solution, but it's a solution.
However, maybe you can check your logs and see if there is an exception somewhere. It could be helpful to at least report an issue to the Netbeans developers (or plugin developers, if a plugin is the culprit), so your particular issue (and possibly mine) can be fixed. Off the top of my head, the Netbeans startup log for Ubuntu is located at /home/<user>/.netbeans/8/var/log, you could check that out.
Another way to go is to reinstall Netbeans and add your plugins one by one. That way you can root out the culprit and address its developers.

Categories

Resources