简体   繁体   中英

Installing Java for Mac?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM