Stationary Josephson current as a tool to detect charge density