简体   繁体   中英

import java.awt.Desktop is not resolved in Eclipse

I have to use Desktop.getDesktop().mail(URI) for a requirement in my project. The import java.awt.Desktop is not getting resolved in my Eclipse IDE. I understand that this works on Java6. However, is there any way I could accomplish this in Eclipse?

Thank you for your help!

java.awt.Desktop support only on Java 1.6 onwards. If you are using java 1.5 in eclipse as the default compiler option for your project, then better change it to Java 1.6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM