Joy Global's (JOY) fiscal second quarter results were impressive, beating Wall Street's expectations.

Initially, the market reacted well to the release. Earnings per share came in at $0.76, down from $1.73 a year ago but up from $0.48 reported during the fiscal first quarter. This headline figure beat consensus, which called for earnings of $0.71 per share.

What's more, Joy pleased Wall Street by guiding for full-year earnings of $3.10 to $3.50 per share; compared to Street expectations of $3.25. 

So, on the face of it things seem to be going well for Joy, however, after digging deeper and factoring in the state of the global coal market, I'm worried about Joy's long-term outlook. 

Slumping sales
Joy's consensus beating results, did much to cover up the company's terrible underlying sales figures.

During the period sales crashed 32% year on year and bookings slid 7% year on year. Bookings for surface mining equipment softened the blow, rising 34% as the company benefited from a large order for oil sands production equipment. However, orders for underground mining equipment, predominantly in the coal mining industry, fell 31% and service bookings for original equipment fell 27%.

All in all, despite a jump in bookings for surface mining equipment, Joy's results were pretty terrible. Sales are falling across the board and service revenues are also contracting.

Unfortunately, it would appear as if things are only going to get worse for Joy. 

Market pressures
It's no secret that the global coal market is struggling. Within the US, recently introduced emission regulations are forcing coal-fired power plants to shut up shop, and over in Australia, one of the world's largest coal producers, things are going from bad to worse.

According to Harry Kenyon-Slaney, the chief executive of Rio Tinto's (RIO -1.17%) energy unit, the Australian coal mining sector is "in the midst of quite possibly the most serious challenge it has ever seen to remain globally competitive. There's every chance these tough times will continue for several years."

Australian miners are now shedding thousands of jobs and mothballing high-cost mines, to drive efficiencies across their operations. High costs, a strong Australian dollar, and low coal prices are all piling pressure on the industry. 

What's more, a record level of Australian production, combined with a rise in exports from Indonesia, has dumped a huge amount of supply on the global thermal and coking coal markets, two markets that are already over-supplied.

As a result, since the beginning of 2012, the price of Australian coking coal has halved while the price of thermal coal has slumped 40%. So, to combat sliding prices, coal miners are slashing investment and cutting capital spending. For Joy, as a company that supplies coal mining equipment, this is bad news.

Less capital spending is likely to equal fewer orders and, according to some data, a quarter of mines within Queensland, Australia's largest coal mining region, are losing money. One company, Forge Group has already fallen into liquidation this year, owing creditors $800 million in Australian dollars.

Still, in the long term, the big miners, BHP Billiton, Rio Tinto, and Glencore, believe that the future for coal is bright, but this is the long term -- there are likely to be many more company failures before the market returns to growth.

The bottom line
The bottom line is that Joy is going to struggle going forward. While the company has just reported a good quarter, the fundamentals of the global coal market, a market for which Joy manufactures the equipment, are poor and investment in the sector is falling. 

It is likely that this weak backdrop will persist for a long time, and Joy faces a period of uncertainty as miners rein in their spending habits.