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.
Putting all jars of a directory on the class path was made much easier by the introduction of "Class Path Wild Cards" (see https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html#A1100762 )
SQuirreL's launch scripts now make use of this and thus got rid of the 'voodoo magic'.
Peter:
I'm just releasing a snapshot with these changes, see:
https://sourceforge.net/projects/squirrel-sql/files/3-snapshots/snapshot-20180406_0118/
It would be very nice if you could try out the installer and plain zip MAC scripts and let me know if they still work alright.
Thanks Gerd
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.)