Error:java: Cannot run program \"C:/Program Files/Java/jdk1.7.0_45/bin/java\" (in directory \"C:\\Users\\navya.chamidisetty\\.IntelliJIdea2017.3\\system\\compile-server\
IDEA doesn't necessary use JAVA_HOME variable. The project SDK (JDK in your case) is setup in the project settings: File -> Project Structure, Project SDK and set up the proper path there.