JDK 1.6 compiled code call a JDK 1.5 compiled code. what errors will we see?
If a class compiled with JDK 1.6 calls another class compiled with JDK 1.5, what kind of errors will we see?
- Class Not found exception?
- Class cast 开发者_运维百科exception?
- NoSuch method exception?
You should encounter no problems doing this. I have a code library with packages compiled with everything from 1.2 to 1.4 and have had absolutely no problems using it with applications compiled with Java 5 and Java 6.
I was getting the error 'Caused by: java.lang.NoClassDefFoundError:" file name
- Check for the file whether deploy in correct path in server or not.
- If deploy correctly and still not picking then check the environment java version and Eclipse java version.Both should be matched.
- If not matching then took the file from environment and recompile the java file in eclipse by setting the Eclipse compilation configuration changing to the Environment java version.
- Deploy it in server and Enjoy.
精彩评论