Somebody commented on my question that it is a possible duplicate of another question. I replied and clarified that the other question is about Android, is mostly about the JTDs driver (which I did not use, at least I think so), and so my question is in no way a duplicate of that question.
There are questions with similar titles, but they are somehow different (I had checked them and tried their answers before asking). Moreover, my question is about my program as I am not getting the expected output.
Now my question is closed with a banner displayed at the top of my question, which may be one reason I am not getting any answers:
This question already has answers here
What can I do about it?