Got “Cannot be resolved to a type” in iReport for expression with static method

可紊 提交于 2020-01-30 13:18:08

问题


I created one Java program and create jar file for that program in the program class name is DateFormate and static method is demo()

Then added that jar file to iReport file then i call that static method as

new com.it.DateFormate.demo()

then this error raised:

com.it.DateFormate cannot be resolved to a type

回答1:


If it is a static method the call will be

com.it.DateFormate.demo()

Hence, no new

To make it work the class needs to be in classpath, if you like it to work inside of your IDE make sure you add a jar (to the IDE) that contains this class.



来源:https://stackoverflow.com/questions/34367861/got-cannot-be-resolved-to-a-type-in-ireport-for-expression-with-static-method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!