This paper examines the optimal licensing scheme when the number of licensees is determined endogenously. We demonstrate that a license holder obtains monopoly profit even if the license holder uses only a fixed fee as long as the marginal cost is constant. Furthermore, we show that under free entry of licensees, a license holder can obtain monopoly profit with any combination of a positive fixed fee and a unit royalty that satisfies a certain condition. Even if the fixed fee is regulated to be a certain level, a license holder can achieve monopoly profit by means of a unit royalty. This result is in contrast with that of a case where the number of licensees is exogenously determined.