1

I've used eclipse for years in a windows environment. This week I got a brand new mac pro and I'm migrating everything from windows. I copied my entire workspace from win7 box to the mac. I've installed the latest eclpise (eclipse-SDK-4.2.2-macosx) and I've imported my projects... one of the classes in one of my projects can't seem to find two imports... I'm pulling my hair out trying to figure out what i need to add to the project to make it compile.

The two imports eclipse can't find:

import sun.awt.windows.WPrinterJob;
import sun.print.Win32PrintJob;

Any help would be greatly appreciated!!

Thank you.

4

2 回答 2

6

这些sun包是特定 VM 实现的内部包,不应使用。此外,类名很好地暗示了它们是特定于 Windows 的,并且绝对不会出现在 OSX JVM 中。

于 2013-06-18T19:57:28.127 回答
2

请改用 java.awt.print。您不能在 osx 中使用特定于 windows 的导入。

于 2013-06-18T19:59:30.563 回答