I was just wondering why NetBeans tries to act as a server when I run my program. (It was just a simple “Hello World” program I wrote just to try out NetBeans a little.) I got a warning from my one firewall, which always happens when new programs try to act as servers, but then I got one from the Windows Firewall which almost never happens, so I kept blocking. Then, before NetBeans gave me a nasty error, it said it was trying to act as a server, and it said “Listening on port XXXX.” (I forget which port.) Why is it doing this? Here is the code, it’s just the default generated stuff. (I added the “Hi!” thing in there, though.)
package app1;
public class Main {
public Main() {
}
public static void main(String[] args) {
System.out.println("Hi!");
}
}
Thanks. (A little side question. How come the class name isn’t the name of my file, App1, what does that empty Main method do, and what does “package” do? Thanks.)