You want to use a theme that is not at the same location as the default libraries, you need to tell SAPUI5 where to find it.
You set this theme either by static declaring in the page or by using the Core.setThemeRoot() method. This is very much like using registerModulePath() for libraries that are at a different location.
This will cause SAPUI5 to load all theme resources from below this URL, for example the library.css file of the sap.ui.core library will be loaded from: http://url.to/the/root/dir/sap/ui/core/themes/my_theme/library.css
For easier usage this base directory can also be given as second argument to core.applyTheme(...) .
The first theme is completely at one location, while the second theme has the default location changed plus the location changed for the part of the theme that covers the sap.ui.core library.
Or it can be done (using the same object structure as JSON string) in an attribute of the SAPUI5 bootstrap script tag, for example:
Last but not least, the location of a theme can be specified with a URL parameter: