简体   繁体   中英

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

  1. Check for the file whether deploy in correct path in server or not.
  2. If deploy correctly and still not picking then check the environment java version and Eclipse java version.Both should be matched.
  3. 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.
  4. Deploy it in server and Enjoy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM