You would need to manage your classpath by setting it up via Java args and point it to the directory wherein TestNG jars are existing. There's nothing much beyond that to be very honest.
On the contrary, build tools such as Maven/Gradle exist so that you and me don't have to manage our classpaths (which can get pretty long, when you have a lot of jars to refer to, not to forget the fact that you would need to download them and put them up in a lib folder, and then you may perhaps stand to get exposed to the same fully qualified class existing in multiple jars.. its a nightmare !)