1. The PATH to the Java Runtime (JRE) bin catalogue should be set when installing it. At least it declares the system environment variable JAVA_HOME that can be used in your start script.
2.
You should set the classpath for the application when you start the application and NOT in the system classpath. Use a launcher or a bat-file for this.
3. You should not use a system DNS (
JDBC DBC type 1 DB driver) in your programs. Instead, you should take a look at DataSource and have a configuration file that holds the data on how to connect to the database and then have a declared DataSource that any part of your application that needs to access the database needs to access.