@@ -1275,18 +1275,12 @@ public static void AssertNonNull(Object var, String message) throws NullPointerE
12751275 * @throws URISyntaxException
12761276 */
12771277 public static Environment GenerateStandaloneEnvironment () throws IOException , DataSourceException , URISyntaxException , Profiles .InvalidProfileException {
1278- File jarLocation ;
1279- if (Static .class .getProtectionDomain ().getCodeSource ().getLocation () != null ) {
1280- jarLocation = new File (Static .class .getProtectionDomain ().getCodeSource ().getLocation ().getFile ()).getParentFile ();
1281- } else {
1282- jarLocation = new File ("." );
1283- }
1284- File platformFolder = new File (jarLocation , Implementation .GetServerType ().getBranding () + "/" );
1278+ File platformFolder = MethodScriptFileLocations .getDefault ().getConfigDirectory ();
12851279 Installer .Install (platformFolder );
12861280 ConnectionMixinFactory .ConnectionMixinOptions options = new ConnectionMixinFactory .ConnectionMixinOptions ();
12871281 options .setWorkingDirectory (platformFolder );
12881282 PersistenceNetwork persistenceNetwork = new PersistenceNetwork (MethodScriptFileLocations .getDefault ().getPersistenceConfig (),
1289- new URI ("sqlite://" + new File (platformFolder , "persistence.db" ).getCanonicalPath ().replace (" \\ " , "/" )), options );
1283+ new URI ("sqlite://" + new File (platformFolder , "persistence.db" ).getCanonicalPath ().replace ('\\' , '/' )), options );
12901284 GlobalEnv gEnv = new GlobalEnv (new MethodScriptExecutionQueue ("MethodScriptExecutionQueue" , "default" ),
12911285 new Profiler (MethodScriptFileLocations .getDefault ().getProfilerConfigFile ()), persistenceNetwork , platformFolder ,
12921286 new Profiles (MethodScriptFileLocations .getDefault ().getProfilesFile ()), new TaskManager ());
0 commit comments