This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
0 Replies Last post: May 23, 2013 6:24 PM by TP2  
TP2 Newbie 5 posts since
May 20, 2013
Currently Being Moderated

May 23, 2013 6:24 PM

GroovyFX "hello, world" example shows "cannot resolve symbol" errors?

IntelliJIDEA 12.1.3 Community Edition
Groovy Version: 2.1.3
GroovyFX 0.3.1
JVM: 1.7.0_21 Vendor: Oracle Corporation OS: Windows 7
Windows 7 64bit


New to IntelliJ, Groovy, GroovyFX.


With the Hello World GroovyFX example [1], I get lots of "cannot resolve symbol" error indicators in the text editor? For example, stage, scene, hbox, text, BLACK, fill, lineargradient are all underlined with the error indicator.


Despite this I *am* able to run the program and see the exactly what the web page says should be displayed. Also completion seems to work (I can type linear <Ctrl+Space) and get lineargradient suggested as a completion).


I started with a new Groovy Module project. I added a new Groovy script that contains the exact Hello World example from the GroovyFX webpage.


In Project Structure | Modules | Dependenencies, I made sure to have:


  1.7 (java version "1.7.0_21")
  jfxrt.jar (C:\program files\java\jdk1.7.0_21\jre\lib)


(Without that last one I get the following error:


    Caught: java.lang.NoClassDefFoundError: javafx/application/Application
    java.lang.NoClassDefFoundError: javafx/application/Application
            at com.intellij.rt.execution.application.AppMain.main(
    Caused by: java.lang.ClassNotFoundException: javafx.application.Application
            ... 1 mor


This was a bit surprising since I thought JavaFX was now part of the 1.7JDK, but since I am a java novice, maybe that's just the way it's supposed to be? If you use JavaFX you *have* to have an explicit separate reference to it in your classpath?)


Anyway, attempting to learn/program GroovyFX using IntelliJ IDEA 12 is much harder when you can't be sure which errors are real and which can be ignored. What settings do I need to change in order to get rid of all these erroneous "cannot resolve symbol" indicators?



More Like This

  • Retrieving data ...