Problem setting up IntelliJ with the TMC plugin

827 views
Skip to first unread message

alexthi...@gmail.com

unread,
Oct 12, 2017, 3:40:27 PM10/12/17
to mooc.fi
Hi,

I'm having problems with running the local test on my IntelliJ install. Thus I always have to upload to server which takes a while. I hope someone has an answer for me. I tried installing JDK8 and using that instead but didnt help.

Error message when I press the test button:

Test Error Window

BUILD FAILED
C:\Users\***\Documents\IdeaProjects\TMCProjects\2013-OOProgrammingWithJava-PART1\week1-003.Spruce\nbproject\build-impl.xml:603: The following error occurred while executing this line:
C:\Users\***\Documents\IdeaProjects\TMCProjects\2013-OOProgrammingWithJava-PART1\week1-003.Spruce\nbproject\build-impl.xml:245: Error running javac.exe compiler

Total time: 0 seconds


-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:

-init-macrodef-javac-without-processors:

-init-macrodef-javac:

-init-macrodef-junit:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:
   [delete] Deleting: C:\Users\alext\Documents\IdeaProjects\TMCProjects\2013-OOProgrammingWithJava-PART1\week1-003.Spruce\build\built-jar.properties

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: C:\Users\alext\Documents\IdeaProjects\TMCProjects\2013-OOProgrammingWithJava-PART1\week1-003.Spruce\build\built-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:
    [javac] Compiling 1 source file to C:\Users\alext\Documents\IdeaProjects\TMCProjects\2013-OOProgrammingWithJava-PART1\week1-003.Spruce\build\classes



Best regards


cody.malcolm...@gmail.com

unread,
Dec 6, 2017, 7:24:09 PM12/6/17
to mooc.fi
Hello, I am having the same error. Is there any solution?

Tracy Karjala

unread,
Dec 10, 2017, 2:04:03 AM12/10/17
to mooc.fi
Open up a command prompt on your PC. Run 'java -version' without the single quotes. It should return something like this:


java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

If not java isn't in your system path.  My guess is you probably can't right click on a source file and select build and have it success fully compile either.

In the command prompt window type 'set' without the single quotes and look for these variables:

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_151 (or something similar depending on version and where you installed java. Intellij needs this to be set)

and

Path=%JAVA_HOME%\bin;C:\ProgramData\Oracle\Java\javapath;....

If those two variables aren't set you'll see issues.

Also, check Settings > Build, Execution, Deployment > Java Compiler in Intellij and make sure Use Compiler is set to javac and the version is 1.8 (or whichever java version you're using)

Tracy
Message has been deleted

patrik....@gmail.com

unread,
Dec 13, 2017, 3:51:51 AM12/13/17
to mooc.fi
Thanks Tracy,
If those variables aren't set, how does one resolve?
I have the correct java version returned but the only java variable found when typing 'set' is:  

Path=C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;...;C:\Program Files\Java\jdk1.8.0_151\bin

I have no problem compiling only running the test.

Very thankful for any help I can get! 

pkozlo...@gmail.com

unread,
Dec 15, 2017, 1:51:46 AM12/15/17
to mooc.fi
I ran into this same problem.


It will show how to set the environment variables for the Java compiler. You will have to restart IntelliJ and the command prompt afterwards, but then it will work.

Hope this helps!

-Patrick
Reply all
Reply to author
Forward
0 new messages