The J2SE Platform is not correctly set up.( NetBeans IDE 8.0.2 )

前端 未结 2 542
再見小時候
再見小時候 2021-01-07 09:03

I am getting this error while running my program in NetBeans.

nt -f D:\\\\PMT_LandingPage jfxsa-run
D:\\PMT_LandingPage\\nbproject\\jfx-impl.xml:3725: The fo         


        
相关标签:
2条回答
  • 2021-01-07 09:23

    Go to Tools -> Java Platformsand select the correct path to your JDK.

    0 讨论(0)
  • 2021-01-07 09:39

    ant uses a variable named platform.active for identifiying the java home path. Netbeans should initialize that variable with the correct path, and indeed it does depending on your selected java platform. But, if you select the default platform, netbeans does not assign the correct path to that variable. Instead its value become default_platform. So, in order to correctly find the java path, you should probably change a line like this:

    <webproject1:property
      name="platform.home"
      value="platforms.${platform.active}.home"/>
    

    into something like this:

    <condition
      property="platform.home"
      value="${java.home}/../"
      else="platforms.${platform.active}.home">
          <equals arg1="${platform.active}" arg2="default_platform" />
    </condition>
    

    This checks the value of platform.active and use it, if it is a path, or use the value of java.home instead.

    0 讨论(0)
提交回复
热议问题