Design a Capacity of a system of J2EE Application

You can have references to articles or books that explain how to calculate the capacity of a system (hardware, ram, etc ,...) for example by the number of users or other requirements?
I refer to how would be designed hardware of a generic J2EE application.