小编Kaj*_*erg的帖子

错误:选项 -Xbootclasspath/p:目标 12 不允许(Netbeans 11.0)

我正在将我的 IDE 升级到最新版本的 netbeans (11.0) 和 jdk (12.0)。当我使用 Ant Project 创建一个简单的基本 Web 应用程序时,我无法编译它,因为输出显示以下错误消息:

错误:选项 -Xbootclasspath/p:不允许与目标 12 BUILD FAILED(总时间:1 秒)

很明显 Ant 脚本使用了这个选项而 jdk 12 不允许它?但是如何解决这个问题??

编辑:这是使用选项 -Xbootclasspath 的部分 (build-impl.xml)。这是一个netbeans 生成的脚本。如果我完全删除该选项,则编译成功并且应用程序似乎可以正常工作

<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    <condition property="have.tests">
        <or>
            <available file="${test.src.dir}"/>
        </or>
    </condition>
    <condition property="have.sources">
        <or>
            <available file="${src.dir}"/>
        </or>
    </condition>
    <condition property="netbeans.home+have.tests">
        <and>
            <isset property="netbeans.home"/>
            <isset property="have.tests"/>
        </and>
    </condition>
    <condition property="no.javadoc.preview">
        <isfalse value="${javadoc.preview}"/>
    </condition>
    <property name="javac.compilerargs" value=""/>
    <condition property="no.deps">
        <and>
            <istrue value="${no.dependencies}"/>
        </and>
    </condition>
    <condition property="no.dist.ear.dir">
        <not>
            <isset property="dist.ear.dir"/>
        </not>
    </condition>
    <property name="build.web.excludes" …
Run Code Online (Sandbox Code Playgroud)

ant netbeans

6
推荐指数
2
解决办法
5523
查看次数

如何对子组件执行 React forceUpdate()?

我可以使用强制重新加载父组件this.forceUpdate(),但是如何为子组件执行此操作?

即以下反应类方法:

buttonClick = () => {
   //This updates parent (this) component
   this.forceUpdate(); 

  //This causes runtime error ("..not a function in buttonClick...")
   Rtable.forceUpdate();
}

render () {
  <div>
     <RTable />
  </div>
}
Run Code Online (Sandbox Code Playgroud)

javascript reactjs

4
推荐指数
1
解决办法
1487
查看次数

标签 统计

ant ×1

javascript ×1

netbeans ×1

reactjs ×1