When am working with 4GB RAM, the JDK is consuming all the RAM and the Processing speed is very less and unable to proceed with the work. Even for saving a simple JSF page, it's consuming 5-8 minutes.
So is it mandatory to use a RAM >4GB or is there any optimising technique so that I can continue with 4GB RAM and obtain better performance?
4GB should be enough - the slow performance you are seeing doesn't seem to be related to memory but rather something else - try disabling the antivirus on your machine. Some anti viruses scan JAR files as they are uploaded slowing down Java software such as JDeveloper.