0

I have a Macbook Pro running El Capitan (10.11.6). It doesn't come with Java and the advise I heard is to not install it because it's unsafe (and apparently Oracle bundles the installation with some ask bar tool or adware so I don't want that).

However, is there a way to code in Java without that? When I try to run Java programs from terminal (java foo.java), it tells me I need it. Is it just the browser plugin that's unsafe or should I keep it away from my computer entirely?

1
  • Any software is "unsafe" and you are always at risk when you install new software, even from the App Store. One of the "old" issues was with the Java browser Plugin, which is now actively disabled and in some cases simply not support by most browsers. When install the JDK, you could always elect not to install the "additional" content. I've not had issues with installing Java on my Macs over the last few years Commented Jan 29, 2017 at 0:36

1 Answer 1

1

You can't, Java programs run in a virtual machine that you need to install (by installing the Java Runtime Environment).

You shouldn't run into any risks just by installing Java in and of itself, as long as you run programs that you know you can trust. If you really want to feel safe, disable the Java plugin from your browser (Actually, I checked and my broswer doesn't have any Java plugin installed, so you don't even need to do that). The toolbar is completely optional, just uncheck the option during installation.

If you want to write Java code you'll have to install the Java SDK too.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, thanks for the reply. If I only want to use it to run code, can I only install the SDK (and JRE, but it comes with it). I'm looking at the page on Oracle's site link and there's several links, but I just want the minimum amount needed.
Download the one with the "JRE" label. You don't need the SDK (JDK in this case) to run a program.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.