Eclipse doesn't find javax.swing

前端 未结 3 544
挽巷
挽巷 2020-12-20 17:20

Eclipse cant find the import javax.swing.JOptionPane

Where is it located and how can i include it?

import javax.swing.JOptionPane;
         


        
3条回答
  •  庸人自扰
    2020-12-20 17:48

    Try to Update the execution environment under system library to JavaSE-1.7 or JavaSE-1.8 in eclipse. To update the step below can be followed:

    > Right-click on the project
    > Select properties
    > Java build path
    > Library > Add Library > Add JRE SYSTEM Library
    > Execution Environment
    > Select JavaSE-1.7 or JavaSE-1.8
    > Finish
    

提交回复
热议问题