Without a regular income, should I prepay my existing loan or invest?

To prepay existing loan or invest are the two financial options available to a person without a regular income. To make things clearer, suppose a person has started a business on his own or has taken voluntary retirement or retired from his job, what should be his priorities? Prepaying all his or her existing loans or invest?