问题
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