So , I don't know what is the reason but from a fellow commentor on YouTube , I learnt that if you execute {requires java.desktop;} within your java module file within src location project > src > module info.java , all jdk modules will be shown again and ready to be used. credit: @Eng.Mahmoud-t4y