First of all, what application?
Good question! That's my first concern also.
Java is technology that lets the same Java bytecode run on different operating systems by using a Java Virtual Machine for each system.
Consider how Flash code runs in browsers. Each operating system and browser has a Flash plug-in. When visitors go to a website with a Flash file, their browsers' Flash plug-ins let them see the Flash file as intended, no matter what operating system or browser they're using. Java is similar, but it can be used for both applets in webpages and for stand-alone applications.
Seeing "java" in the incoming connection prompt when there's no browser open suggests there's a stand-alone java application running (not a java applet in a webpage). You need to dig further to tell exactly what java application is running. You need to use tools to show the command line arguments that java was started with.
This page shows how to use the Activity Monitor and the ps command in the Terminal to view command line arguments of active processes. This answer suggests using
ps axv | grep java to show just processes that contain java in their command lines. Or use
ps vpPID (where PID is a PID you see in Activity Monitor) to see a specific process's command line.
Once you see the java command line, you may be better able to tell what is running and if you want to allow incoming connections to it.
Is it asking if anyone on the internet can make connections to my computer?
Most likely the only effect it will have is to allow other programs on your computer or on other computers on your network to connect to the java application. It might be possible for anyone on the internet to connect to the java program, but only if one of the following apply:
- 1 Your computer is connected directly to a modem without router capability or with the router capability disabled.
- 2 Your computer is connected to a router and the router's port forwarding or firewall is set to send incoming connections on the same port the java application is requesting to your computer.