Menu

#566 Redesign Squirrel application bootstrapper

SQuirreL
open
nobody
None
5
2018-04-09
2018-04-04
No

Currently, Squirrel SQL is started by wrapper scripts squirrel-sql.sh on *nix and squirrel-sql.cmd on Windows.

These scripts contain considerable amount of shell and Windows CMD voodoo magic to locate the JAR files of the application, which is proven to be quite fragile and susceptible to issues caused by different OS flavours -- just a few examples:
* https://sourceforge.net/p/squirrel-sql/bugs/1321/
* https://sourceforge.net/p/squirrel-sql/bugs/1287/

Instead of parameterizing the java command with the path of the JAR files, JAR dependencies should be located by an approriately configured Java ClassLoader.

The application could simply start, locate all JARs in its lib directory, and set a URLClassloader with the files before showing the UI at all. This would eliminate the necessity of using shell script to collect the JAR files.

Implementing this would be a hughe step in making Squirrel SQL more stable.

Discussion

  • Peter G. Horvath

    Hello Gerd, OK, I'll test it once I have a little bit of time.

    I still believe it would make sense to incorportate as much of the bootstrap process into the Java application as possible instead of having a number of different wrapper scripts laying around.

    I might be wrong here, but in an ideal world, there would not be required to write a bootstrap script: for me, having a single runnable JAR that can load additional JAR files with the plugins seems to be the most stable way. (Java code can still check the actual platform and perform settings according to that.)

     

Log in to post a comment.