How many file descriptors opened by my java application?

# Get hte java process ID
ps -ef | grep java
# Count filedescriptors opened by this java process
cd /proc/<java_PID>/fd
ls -l | wc -l
# And if you want to verify what your java application has opened, just inside the same directory
ls -l
# if you want to see more details about filedescriptors opened
lsof -a -p <java_PID>

Process listening on a port

Beware that apache ssl virtualhost *:443 with lsof or netstat will appear as a name *:https not *:443

lsof -i | grep 8009
lsof -i | grep https
netstat -pao |grep 8009
netstat -pao |grep https