You don't have to do anything for that to work, regardless of whether the game engine and the physics engine use same classes (by name) and/or static class fields in same classes.
First: There is no such thing as a "library" when the JVM starts up. It will just search for classes by name when during execution, starting with the main method, it sees that another class is needed.
Second: The JVM searches in all .jar files (not necessarily the boundary of a library) and file system directories specified in the classpath/cp VM argument to find the .class file of a requested class to load it. Whenever there are multiple locations containing the same .class file, then the first location (specified in the classpath/cp) will be used.
Third: The JVM and its classloader hierarchy (you likely only use the system class loader) takes care that the same class referenced in different locations/classes will always be "the same"/identical class. And therefore, when a class in your physics engine references a static field of the engine and the game also references the same field in the engine, then it will be the same/identical field.