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
Related
I've been trying to install java on vs code for a couple hours now and I can't seem to get it to work. I've already downloaded all the extensions necessary and I've downloaded the coding pack from https://code.visualstudio.com/docs/languages/java for windows (I'm on windows 11). According to multiple tutorials, this is all I should have to do, but when I make a test.java file, the "run java" does nothing and "run code" gives me an error.
and this is the output when I click that run button in the top right:
Does anybody have any suggestions? the coding pack was supposed to come with a jdk, its working for everybody else so I'm not sure what the issue is.
It seems like you don't have correctly installed java sdk on your system.
Try to check java sdk installation with following commands:
java --version
javac --version
In case you don't see reasonable output, try to install java sdk,
go to the Java Downloads section of the Oracle website, and download the Installer from there.
Are you sure you are following the documentation? It looks like you didn't download the official Java extension pack, but used Code Runner to run the code.
Please download the Java extension package and use Run Java or Run to run the code.
Getting Started with Java in VS Code.
I could not find clear answer to this, I would need to know what is needed to run compiled sikuli script on other computer.I have a sikuli jar script that I transferred to one of our pcs at work and I expected this to run since I sucessfully installed JDK 12 there and that was the java version I did the coding on.
However, the jar gives me no response when I double-click it. I know that many things could be involved in this error but first I would like to cross out the basics.
So, my questions are:
Do I need sikuli IDE on that pc too in order to run it?
Do I need Eclipse/NetBeans installed along with it?
What is the standard procedure when moving sikuli scripts to work on other computers?
Thank you very much for your help.
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
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..
My problem started the other day when I tried to run a jar file that was compiled in java 1.6 from a friend. I then got:
java.lang.NoClassDefFoundError
Since I was only using java 1.5 obviously. So I updated using the system update. This did not help and when I ran:
java -version
in the terminal it still said I had java 1.5. I then saw on the internet that there was an "java SE update 4" on apples download page available. I downloaded and installed this file but it still wouldn't work. I gave up and decided to go back to my programming in eclipse. When I tried to compile and run my application in eclipse I now recieved the same error java.lang.NoClassDefFoundError and it wouldnt let me proceed. I tried right clicking the project and viewing the properties but it wouldnt let me, just gave me another error. I figured I might messed something up when I installed the new java version so I tried reinstalling eclipse but it still gave me the same error. I tried creating a new workspace but that wouldnt help either. I then figured I would try to compile throught the terminal using:
javac main.java
java main
But I still get the same error. I went in under systems settings and diabled "java 1.6" and i tried creating new projects with both javaSE-5 and javaSE-6 but it just wont work. My thoughts now is if it has something to do with eclipse not being able to access the bin & src directories in the project directory but that should work if i reinstalled it? I also saw someone mention setting the classpath in os x but I don't know. I would really need some help solving this issue since a lot of my work rely on eclipse working. I would rather not have to reinstall the whole OS just because of this but if I can't get it to work I guess there is no other alternative.
Best Regards
Jonas Kristensson
"Reinstall the whole OS"? Good lord, no.
Your problems have nothing to do with the version of Java. You don't understand how CLASSPATH works.
The class you were trying to run wasn't on the CLASSPATH. If your friend gave you a JAR, you need to add it to your CLASSPATH and use the fully-resolved class name to run it.
A word of advice for your future mental health: When you have problems, don't assume the worst and jump to extreme measures. Try the simple solutions first.
I tried to run a jar file that was compiled in java 1.6 from a friend. ... Since I was only using java 1.5 obviously
Note that if this was really the case you'd get a java.lang.UnsupportedClassVersionError, since Java 5 can't run classes compiled for Java 6 (it might be able to do so, but the class files say "I'm Java 6+" (class version 50) and thus Java 5 would just refuse to run it (max class version in Java 5 would be 49).
Try to compile with
javac -source 1.5 target 1.5 .....