Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot resolve java.util in Eclipse?

Using Eclipse 4.5.2 and after import a Java project by others, it is said cannot import java.util? Using Mac OSX. I post the screen snapshot and output of command java, any check list in configurations to see what is wrong? Thanks.

/usr/bin/java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

enter image description here

Edit 1,

enter image description here enter image description here

like image 212
Lin Ma Avatar asked Oct 08 '16 05:10

Lin Ma


People also ask

How do I resolve an error in eclipse?

The Quick Fix dialog can also be displayed by right clicking on the error item in the Problems view and selecting the Quick Fix menu item.


1 Answers

your java package library path is not set properly thats why eclipse is not be able to load packages. First set the library path.

Right click on project - >BuildPath - >Configure BuildPath - >Libraries tab - >

Double click on JRE SYSTEM LIBRARY - >Then select alternate JRE

like image 172
Aman Jaiswal Avatar answered Oct 13 '22 07:10

Aman Jaiswal