Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Which databases are the most used with Java Date: Fri, 18 Aug 2017 15:31:04 +0200 Organization: Decebal Computing Lines: 43 Message-ID: <87ziaxhujr.fsf@munus.decebal.nl> References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <87a833wzcx.fsf@munus.decebal.nl> <87pobz9yv5.fsf@munus.decebal.nl> <87h8x9pfi8.fsf@munus.decebal.nl> <87mv70n5pd.fsf@munus.decebal.nl> <87k222lloh.fsf@munus.decebal.nl> <87k221jx6m.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="4e79c97da8fb74945529c91ed76be274"; logging-data="27575"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18c7pFdVVWPIKBXJ+8cTPGD7NV219iq1kw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:QouAUhzygNfwc5iyjS4F9OTPArU= sha1:9k3FDLpAp94dCVt6WY3CHeroj3U= X-Homepage: http://www.decebal.nl/ Xref: csiph.com comp.lang.java.programmer:37271 Arne Vajhøj writes: > On 8/18/2017 12:51 AM, Cecil Westerhof wrote: >> Arne Vajhøj writes: >>> On 8/17/2017 3:04 AM, Cecil Westerhof wrote: >>>> That is why I started with the wrapper: to make sure that a Statement >>>> is implicit generated. >>> >>>> I also added a main so that I can use the classes from a script. For >>>> example to check about 20 SQLite3 databases about being locked: >>>> java -cp ${_classpath} nl.decebal.sql.SQLite3 --areDBsLockedShowErr ${_databases[*]} >>>> >>>> If I want a message about the databases that are locked. >>>> >>>> And: >>>> java -cp ${_classpath} nl.decebal.sql.SQLite3 --areDBsLocked ${_databases[*]} >>>> >>>> If I want a message for every database. >>> >>> Have you consider instead of having a Java main then do the scripting >>> in a JVM scripting language - Python (Jython), JavaScript (Nashorn or >>> Rhino) or whatever you happen to have skills in? >> >> On linux bash (or another shell) is mostly used for crontab jobs and >> the like. Because I am thinking about publishing it I think I should >> at least have a bash implementation. But I could also write a groovy >> implementation of-course. > > Java is good at many things. > > But for this sort of scripting I would go for a script language. > > And JVM script languages can use your class directly. But then I have to maintain two programs: the Java and the scripting language. For me it would not be a problem to work with (for example) Groovy, but for other people it could be. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof