In this paper, we consider a single-link cooperative communication system, where the half-duplex decode-and- forward (DF) relay does not have its own energy supply. Instead, it harvests energy from the interference and the signal received from the source and uses that harvested energy for relaying operation. For such systems, we develop joint optimal allocation of the transmit powers of the source and relay nodes and the power-splitting ratio allocation scheme. In particular, in order to maximize the end-to-end system throughput by joint optimal allocation of the transmit powers of the source and relay nodes and the power-splitting ratio, we formulate an optimization problem. The resulting problem is a non-convex polynomial program, which is hard to solve optimally and efficiently. Therefore, we develop an efficient solution by transforming, relaxing, and modifying the original problem. Numerical results show that our developed scheme performs very close to the optimal solution with reduced complexity and provides an intuitive direction on how to exploit the interference so as to achieve a good throughput performance.