好吧,我不是java新手,但我对java的了解一直比较基础。我目前正在开发一个引用java代码的不同软件,而我正在做的项目是在项目的过时版本上。因此,当我尝试将项目从过时的版本迁移到新的更新版本时,它会尝试编译java代码并出现两个错误,主要是在;
FriendlyURLS fu = new FriendlyURLS();
required: IContext
reason: actual and formal argument lists differ in length
Buildfile: C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\deployment\build_core.xml
compile-legacy:
[javac] Compiling 846 source files to C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\deployment\run\bin
[javac] C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\javasource\contentmanagement\actions\AddTemporarySEFRequestHandler.java:35: error: constructor FriendlyURLs in class FriendlyURLs cannot be applied to given types;
[javac] FriendlyURLs fu = new FriendlyURLs();
[javac] ^
[javac] required: IContext
[javac] found: no arguments
[javac] reason: actual and formal argument lists differ in length
[javac] C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\javasource\ipsecurity\helpers\IPRangeCheckerLoginAction.java:32: error: constructor UserAction in class UserAction<R> cannot be applied to given types;
[javac] {
[javac] ^
[javac] required: IContext
[javac] found: no arguments
[javac] reason: actual and formal argument lists differ in length
[javac] where R is a type-variable:
[javac] R extends Object declared in class UserAction
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
BUILD FAILED
C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\deployment\build_core.xml:48:
Compile failed; see the compiler error output for details.
任何帮助或建议将不胜感激! (抱歉,长信息)
答案 0 :(得分:0)
看起来FriendlyURLs
类在其构造函数中需要类型为IContext
的参数。检查FriendlyURLs.java文件,并尝试了解缺少参数的位置。