Consider the following Exception print
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
at com.infoaxe.mr.homefeed.ReduceTwo.reduce(MapReduce.java:290)
Since Java is a compiled language and what runs in JVM is the bytecode and not the source code itself how does the exception know on which line it occurred ? Example line 332 in above case ?
Simply because the compiler includes the line numbers in the generated byte-code. There are -g
options (in the Oracle javac compiler) allowing to turn that off, if you want to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With