Because your class is in a package "pkgtry", you start it with:
java -cp . pkgtry.Main
while the current directory is the directory containing the "pkgtry" directory.
You do not start it with:
java -cp . Main
while the current directory is the "pkgtry" directory. That only works if your class is not in a package (but is in a directory called "pkgtry" for whatever reason)