I usually uses Eclipse and online editors to run my java programs. But yesterday, I took my sublime editor, write a simple java program, data structure model and run the program using the javac command in command line.
But first it shows I am not having javac and need to install using
sudo apt ... command as shown in the screen.
I ran it and installed the javac and when I checked, it was javac 11 version. So I included the javac 8 while again installing the javac to get version 8, still the version shows 11.
So I searched for the error and found a possible fix for it.
We can use the following command to successfully compile and run the code in javac 8.
javac -target 8 -source 8 filename.java
But it shows a warning which I am not that much familiar and not that much understandable.
The warning is as follows:
warning: [options] bootstrap class path not set in conjunction with -source 8
I don't know what exactly its saying but I got my code compiled and run successfully.
So the above command is one of the fix that can be used to fix the above error, if anyone faces it.
More discussion about the warning is most welcome and I am very much excited to know what's exactly the warning is.