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.
Related
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
I have a java application that consists of various files and I need to run my project. I have jdk 14 installed and have also set the Environment Variables. But when I click on Launch project, it just keeps loading and loading and nothing else happens. It does not show me any error log or anything. I am really confused and been trying to solve this for a week. In launch, it does not give me any option of java. It says Launch in angular. Any help would be appreciated?
VS Code is basically an editor for sourcecode files of different languages. As such, it does have any inbuilt Java execution options.
To debug your Java programs, you will need to install the appropriate Java extensions for VS Code.
Having Jdk installed is a prerequisite to use Java on VS Code but it alone is not enough.
I hope you can help me.
I am taking a class on Artificial Intelligence and I'm required to install Clojure on my laptop. I have a macbook pro and I am having a tough time trying to make sure I have installed everything correctly, and is Terminal the only environment I can work on.
I downloaded Java JDK, also the patchwork for Java to work on El Capitan from the Apple website, and finally the Clojure pack from clojure.org's site.
Are we supposed to work from our terminal or is there an environment like Xamarin studio that I should work from.
Our instructor only had the information for windows laptops not mac's or Linux's. So we're struggling to find a solution.
You can install Leiningen with brew like this:
brew install leiningen
And then learn how to use it here: Leiningen Tutorial
For #1, Leiningen is the de-facto build tool in the clojure world. It is really easy to install. Check out the instructions right on the home page. Once you have that installed, the easiest and fastest way to get going is to fire up the lein repl with:
lein repl
This gives a clojure REPL where you can start to try out clojure.
For #2, If you are doing school work, I would recommend the non-commercial license version of cursiveclojure as an IDE. lighttable in another good option.
I have Java 1.6. And I have installed Jython on Windows by following the steps below:
Download "jython-installer-2.7-b1.jar"
Open command prompt --> Go to the location/folder where jython-installer-2.7-b1.jar is kept
Execute the command java -jar jython-installer-2.7-b1.jar
Jython installation GUI is opened and follow the instruction to install jython
Set Path and JYTHON_HOME (In my case it was "C:\jython2.7b1\bin" and "C:\jython2.7b1" respectively)
Jython is installed successfully. Now I want to install Robot Framework. I tried to install Robot Framework using "robotframework-2.7.7.win32.exe" . At the 2nd step the following information message was displayed:
"No Python installation found in the registry"
So, I have understood Python is mandatory to install Robot Framework. But, I want to install Robot Framework without installing Python using Jython. Is there any way to do that?
I have not used this framework before, but from what I understood from the documentation and based on my Java experience, I would recommend you to download the Standalone JAR Package (which, for the latest version is: robotframework-2.7.7.jar (at http://code.google.com/p/robotframework/downloads/detail?name=robotframework-2.7.7.jar&can=2&q= )
According to the Wiki and the download notes, this package is standalone and already contains Jython, so it doesn't require additional installations of anything besides Java.
You can confirm this at: http://code.google.com/p/robotframework/wiki/Installation#Stand-alone_JAR_package
According to the doc, the Windows installer needs Python to be installed. Perhaps you can uninstall it once Robot Framework in installed (not tested).
If you're ok with Jython 2.5, you should use the standalone JAR distribution. If you really want Jython 2.7, then you may need to install from source, but it really doesn't look complicated.
I installed Eclipse IDE for C/C++ Linux Developers to write some cpp codes. As I understood it, no matter which version of Eclipse I use, it always can be used to writing some java source codes.
I did this:
File->New>Java Project->...
Wrote a simple "hello world". I have confidence that my hello world is correct.
When I wrote my code, Everything went well.
But when I right clicked my new project, I found there was no "Run as","Debug as"
Press Ctrl+F11. It said "the selection cannot be launched, and there are no recent launches"
Run->Run Configurations. I double clicked Java Application. It said "No tab group defined for launch configuration type org.eclipse.jdt.launching.localJavaApplication"
What should I do?
How can I run my java applications?
Quite contrary to what you assume, eclipse isn't a Java IDE with some other addons. Eclipse is just a platform. As the package comparison shows, the C/C++ package doesn't come with the Java development tools.
Make sure you have correct eclipse version is downloaded? There will be separate eclipse version available for Eclipse for java.
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigor
Hope this help.
If you have the JDT installed, then make sure you are in the Java perspective. Either:
Window->Open Perspective->Java (default)
Use the perspective switching tab, usually the top-right of your code editor
You can install the JDT, if you don't have it by using:
Help->Install New Software...
Try to install follow this link http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigor if it's work. i think your eclipsec/c++ may be have a problems while install java. You can reinstall or using eclipse for java.