BPMN template and stupid JDK
Asked by M McCormick:

Hello I attempted to download the Confluence template for BPMN and it says I needed to download Java Developer for it to work. It still doesn't work after the download and now I need to uninstall JDK. I reached out to Atlassian support and they told me to come here instead of just helping me. Please tell me how to uninstall Java developer ASAP


Answers:
author: Nic Brough -Adaptavist-
body: Can you confirm that when you say "java developer", you do mean just a JDK?

If it is just a JDK, then you'll need to look at how you installed it - if you used a package manager or installer, it should be removed using that. If you did it manually (download an package, decompress it somewhere), then all you need to do is delete the directory containing the decompressed files and directories.

comments: author: M McCormick
body: I looked in the installer and it doesn't have anything to use to uninstall. It doesn't put anything in my filer - it's like just in the background or something. Also I have a MAC.


author: M McCormick
body: There is no easy way for me to tell where it put all of the files


author: Nic Brough -Adaptavist-
body: The installers for a Mac install the JDK as an application. You can delete it from the list of applications and not need to do anything else.


author: M McCormick
body: i looked in my finder and launch pad and I do not see it correlated to any app or icon to tangibly uninstall. It did not install as an app


author: M McCormick
body: this is what was installed:

**Jdk-14.0.2_osx-x64_bin.dmg seems to say it is a disk image**


author: Nic Brough -Adaptavist-
body: That's how a lot of Mac applications are installed - a dmg file is a disk image, you mount it, then copy it into the applications directory. You can delete that from the list of applications and that effectively uninstalls it.


author: M McCormick
body: but that's the thing...when I look in my finder under applications I don't see anything that correlates - when I do a search on jdk it just brings up a million files everywhere. so how can i uninstall something that doesn't give me an app to delete or something to uninstall from?


author: Nic Brough -Adaptavist-
body: Ok, we'll brute force it. Go to a command line and run the first two commands I've used below:

```
nic@mymac:~$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

nic@mymac:~$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/
nbrough@ensor:~$ ls -l /Library/Java/JavaVirtualMachines/
total 0
drwxr-xr-x 3 root wheel 96 28 Mar 2017 jdk1.8.0_121.jdk/
drwxr-xr-x 3 root wheel 96 8 Jun 2019 jdk1.8.0_211.jdk/

nic~mymac:~$ ls -l /Library/Java/JavaVirtualMachines/
total 0
drwxr-xr-x 3 root wheel 96 29 Aug 11:16 adoptopenjdk-11.jdk/
drwxr-xr-x 3 root wheel 96 28 Mar 2017 jdk1.8.0_121.jdk/
drwxr-xr-x 3 root wheel 96 8 Jun 2019 jdk1.8.0_211.jdk/

```

The first one tells me which is my chosen default Java on this machine - you may not want to be removing it if you have other java applications

The second command helps me find out where Java is installed - it is pointing to a very specific place within the install, but what you actually want to look at is where all the Javas have been installed - hopefully, they've all stuck to standards like you can see in my three!

Once you've worked out where the install is, all you need to do to remove Java is kill the directory - "rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/" for example, would kill the oldest Jira on my machine.


author: M McCormick
body: I ran the first one and got:

java version "14.0.2" 2020-07-14

Java(TM) SE Runtime Environment (build 14.0.2+12-46)

Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)

Ran the echo and just got the prompt again. Does it need to be run as JDK?


author: Nic Brough -Adaptavist-
body: If you have no $JAVA_HOME, you don't have a default set for your account.

Try "which java" next, but be aware that that can be a pile of links rather than the actual location, and you'll need to follow them back to their actual install.


author: M McCormick
body: I will try when I'm back home but I'm just a home user so hopefully I'm ot messing anything up


Tags: cloud

confluence-cloud

java