I don\'t have much memory on my PC and a pretty weak processor. Although netbeans is by far my favorite IDE it is almost unbearable to use on my present computer because of
In my case, with jdk 1.8, there is a big issue when there are multiple static imports (see the example). It seems that there is a problem with javac. The compiler is very slow when checking such a .java file and NetBeans scanning is very very slow. It seems that the compilation and scanning time is increasing very fast with each repeated static import. So, if that is your case, just remove repeated imports
package ru.cntp.demo;
import java.math.BigDecimal;
import static java.util.Arrays.asList;
import java.util.List;
import java.util.Map;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
/**
*
* @author sergiu
*/
public class EmployeeRepository {
public Map>>>>> getEmployeesByDepartment() {
Country germany = new Country("Germany");
Department germanyDeptOne = new Department("Dept One", germany);
Employee emp1 = new Employee("Surame", "Name", "Patronymic", BigDecimal.TEN, germanyDeptOne);
return asList(emp1).stream()
.collect(groupingBy(Employee::getDepartment,
groupingBy(Employee::getSurname,
groupingBy(Employee::getName,
groupingBy(Employee::getPatronymic,
groupingBy(Employee::getSalary))))));
}
}