installing DR java on ubuntu 18.04 - java

I will be attending computer science classes and we are asked to be using DrJava, but am using linux os and I don't know how to install DrJava on ubuntu. Please help me.
I tried to download a jar file for DrJava and run below command
java-jar drjava-stable-20190813-220051
But this is the response I get;
Command 'java' not found, but can be installed with:
sudo apt install default-jre
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless

Run
sudo apt install openjdk-8-jdk
And try again.

Related

How do i install and setup open jdk from in ubuntu from snapcraft

System
ubuntu 20.04 lts
I'm just starting with ubuntu
Installed
I have installed java from here https://snapcraft.io/openjdk
Command sudo snap install openjdk
Installation was successfull
Checked version
rahul#rahul:~$ java -version
Command 'java' not found, but can be installed with:
sudo apt install default-jre # version 2:1.11-72, or
sudo apt install openjdk-11-jre-headless # version 11.0.11+9-0ubuntu2~20.04
sudo apt install openjdk-13-jre-headless # version 13.0.4+8-1~20.04
sudo apt install openjdk-14-jre-headless # version 14.0.2+12-1~20.04
sudo apt install openjdk-8-jre-headless # version 8u292-b10-0ubuntu1~20.04
Checked for installation
rahul#rahul:~$ sudo snap install openjdk
snap "openjdk" is already installed, see 'snap help refresh'
How can i fix this?
As it is written in GitHub site of openjdk in snapcraft, if you type openjdk.java -version you will get the version information

Installing OpenJDK 11 on Linux(Azure) using yum or wget

I want to install & configure openjdk 11 on Linux(vm in azure devops) either by yum or wget , i am new, not sure i tried using wget but openjdk 11 is not downloading
Need OpenJDK 11 to run Sonarqube
According to this post here: https://superuser.com/questions/1466580/unable-to-download-oracle-jdk-8-using-wget-command
"Following a licensing change of Oracle Java on 16 April 2019, Oracle now forbids anyone from downloading Java outside of their approved process.
That process is currently to log in to an Oracle account, accept the new license, then attempt the download with the authentication cookies in place."
In order to download it now you must use apt-get command if you use ubuntu or debian so on.
I know it says java 8 but this applies to all java versions
EDIT: I do not use centos so I cannot personally test this but try if this works
$ sudo yum install java-11-openjdk-devel
or
$ sudo yum install java-11-openjdk
You can try below scripts to install jdk 11 on azure linux vm.
sudo rpm --import http://repos.azul.com/azul-repo.key
sudo curl http://repos.azul.com/azure-only/zulu-azure.repo -o /etc/yum.repos.d/zulu-azure.repo
sudo yum -q -y update
sudo yum -q -y install zulu-11-azure-jdk
See here for more information.

How To Configure and Download Java JDK in ubuntu for VS code

I've tried to run vscode in java but the vs code is showing an error of (Not Pointing To JDK).
Is there is any way to run java programs in vs code in ubuntu.
Install java from here Install java from here Install java from here Install java from here Install java from here
https://code.visualstudio.com/docs/java/java-debugging#:~:text=You%20can%20manually%20install%20the,Code%20for%20the%20first%20time.
The simplest way is to run:
sudo apt-get install openjdk- and to press TAB several times for available options.
You will then choose a specific jdk.
Some examples:
sudo apt-get install openjdk-14-jdk
sudo apt-get install openjdk-13-jdk
sudo apt-get install openjdk-11-jdk
Afterwards you can restart VSCode.

Ubuntu 18.04 Java Command Not Found Despite Being Installed

I initially had default-jdk and default-jre installed on Ubuntu 18.04.
Attempted to host a Minecraft Server for a friend, but was given the error found here
I followed the commentor's advice to reinstall java version 8 rather than version 11 installed above, by following this advice here that being
sudo rm -r /usr/lib/jvm/java-11-oracle
but as a mistake I had removed all files in that folder, leaving just the two directories
java-11-openjdk-amd64
java-8-openjdk-amd64
since then I have attempted to reinstall java using sudo apt-get install default-jdk ; sudo apt-get install default-jre and they install just fine, but running java -version, either as root or as user, returns:
Command 'java' not found, but can be installed with:
sudo apt install default-jre
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless
I have scoured askubuntu, digitalocean, and stackoverflow for some answers but I can't find anything that fixes this problem. I also asked my roommate, who is an experienced Computer Science major and who has used ubuntu extensively in the past, and he couldn't find a solution. Has anyone encountered this issue before?
I appreciate any and all responses 😊
Solution has been found. Running:
sudo apt purge -y openjdk-11-jre-headless
sudo apt purge -y openjdk-8-jre-headless
sudo apt purge -y default-jdk
and reinstalling has resolved the issue
Check your path. You should have remove the old jdk using apt-get. I think your system still assumes the old jdk-11 is still present. You could try to re-install it or use update-alternatives to switch to the other version.

Unable to install Android Studio in Ubuntu [duplicate]

This question already has answers here:
Error: Unable to run mksdcard SDK tool
(10 answers)
Closed 6 years ago.
I'm using Ubuntu Gnome 14.04, and I have Java 8 installed (both the JDK and the JRE).
When I was installing Android Studio everything worked, but a message appeared saying:
Unable to run mksdcard SDK tool
How can I install Android Studio correctly, or how do I fix this ?
Presuming that you are running the 64bit Ubuntu, the fix suggested for "Issue 82711" should solve your problem.
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Update:
For Ubuntu 15.10 & 16.04
sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
#warsong is right. Installing only lib32stdc++6 solved the problem.
For next uses I rewrite #warsongs comment in answer area.
sudo apt-get install lib32stdc++6
Update :
For Ubuntu 15.04,15.10,16.04 LTS & Debian 8
For Fedora (tested for Fedora 23/24) run
dnf install compat-libstdc++-296 compat-libstdc++-33 glibc libgcc nss-softokn-freebl libstdc++ ncurses-libs zlib-devel.i686 ncurses-devel.i686 ant
I understand the question is regarding UBUNTU, but I had similar problem in Debian Jessie 64bit and warsongs suggestion worked for it also.
When I ran studio.sh android studio would start, but when I tried to configure the android SDK I got the error
Unable to run mksdcard SDK tool
WHen I tried
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Got error
E: Package 'lib32bz2-1.0' has no installation candidate
So took warsongs suggestion and only tried to install lib32stdc++6.
sudo apt-get install lib32stdc++6
After this was able to add the Android SDK into Android Studio.
Checkout this page
If you are running a 64-bit distribution on your development machine, you need to install additional packages first. For Ubuntu 13.10 (Saucy Salamander) and above, install the libncurses5:i386, libstdc++6:i386, and zlib1g:i386 packages using apt-get:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
The Problem is caused by mksdcard not being installed correctly.
if you are running 64 bit, do this to fix the mksdcard problem.
sudo dpkg --add-architecture amd64
sudo apt-get update
sudo apt-get install libncurses5:amd64 libstdc++6:amd64 zlib1g:amd64
and 32 bit:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
In SDK 6.0, the error message is different but means the same thing.
Unable to run mksdcard
None of these options worked for me on Ubuntu 12.10 (yeah, I need to upgrade). However, I found an easy solution. Download the source from here: https://github.com/miracle2k/android-platform_sdk/blob/master/emulator/mksdcard/mksdcard.c. Then simply compile with "gcc mksdcard.c -o mksdcard". Backup mksdcard in the SDK tools subfolder and replace with the newly compiled one. Android Studio will now be happy with your SDK.
For Linux Mint run
sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0 lib32stdc++6
If you run sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0 lib32stdc++6
and got a message like: "The following packages have unmet dependencies: lib32stdc++6 : Depends: lib32gcc1 (>= 1:4.1.1)".
You can do something like this tut: https://askubuntu.com/questions/671791/lib32stdc6-package-depends-on-gcc-base-but-my-installed-version-is-newer
This issue arises when your 64 bit os tries to install the Android SDK which in turns tries to install some 32 bit binaries and thus is the issue of compatibility.
Open an additional terminal and type
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
would help to install all the required binaries. After this, start the afresh the Android SDK installation process.

Categories

Resources