import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
 
 
public class Sysdetail {
 
    public static void main(String args[]) {
        Properties systemProps = System.getProperties();
        Set<Entry<Object, Object>> sets = systemProps.entrySet();
        System.out.println("systems properties:");
        for(Entry<Object,Object> entry : sets) {
            System.out.println("name: " + entry.getKey() + ", value: " + entry.getValue());
        }
    }
}

by addressing the correct jdbc drivers, and using the correct code while passing on the correct information, such as username and password.
whether or not your program uses properties files has nothing to do with the accessing of a database.
you might want to take a look at this site, you'll find some explanations about the use of jdbc there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.