How to allow java in the firewall on OS X Mountain Lion

I was getting a message when using Amazon EC2 command line tools:

Do you want the application “java” to accept incoming network connections?

How to allow java in the firewall on OS X Mountain Lion

You can open your firewall and security settings preference pane and click on “Firewall Options”:

How to allow java in the firewall on OS X Mountain Lion

You might be tempted to add /usr/bin/java to the list of acceptions, but that actually won’t cut it. You’ll still get the firewall warning when running Amazon Web Services Command Line Tools.

If you open terminal and run echo $JAVA_HOME it should show you the path of the java it’s using.

For me this was located at:

/System/Library/Frameworks/JavaVM.framework/Home/

What you’ll find in that folder is a bin directory and a java file inside that:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java

If you then add that file to the list of exceptions you’ll stop receiving this flash of a popup that is prompting you to accept:

Do you want the application “java” to accept incoming network connections?

Do you want the application “java” to accept incoming network connections?

Related Posts:

This entry was posted in Mac, Tech Tips and tagged , , . Bookmark the permalink.

11 Responses to How to allow java in the firewall on OS X Mountain Lion

Leave a Reply

Your email address will not be published. Required fields are marked *