gpt4 book ai didi

java - NetBeans Web 应用程序

转载 作者:太空宇宙 更新时间:2023-11-04 13:39:02 27 4
gpt4 key购买 nike

我正在开发一个使用 hibernate 的 NetBeans WebApplication。更改两行代码后,我遇到了下一个错误:

ant -f C:\Users\User\Assignments\AssignmentZaposleni -Dnb.internal.action.name=debug -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=C:\Users\User\Assignments\AssignmentZaposleni debug
C:\Users\User\Assignments\AssignmentZaposleni\nbproject\build-impl.xml:797: The libs.CopyLibs.classpath property is not set up.
This property must point to
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at
<netbeans_installation>/java<version>/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
BUILD FAILED (total time: 0 seconds)

在更改代码之前,编译是可以的,没有错误。代码中的变化是:

之前的代码:

mySQL=Restrictions.sqlRestriction(upit.substring(upit.indexOf("WHERE")));
criteria.add(mySQL);

之后的代码:

mySQL=Restrictions.sqlRestriction(upit.substring(upit.indexOf("WHERE")));
criteria.add(mySQL);
List list =session.createCriteria(Zaposleni.class).add(mySQL).list();

当我评论时,更改错误仍然存​​在!?有人可以帮我弄这个吗?谢谢。

最佳答案

也许您有自动 NetBeans 更新,并且在您更改 Java 代码期间,NetBeans 进行了一些更新并对配置文件进行了更改。也许试试这个,它会很有帮助:

右键单击项目名称/属性/库/编译/

如果没有“CopyLibs Task”,请按以下键添加:

添加库,选择 CopyLib 任务,最后添加库/确定。

关于java - NetBeans Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31400254/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com