Search

Search results

How to read Perl command-line arguments

Perl FAQ: How do I read command-line arguments in Perl? Note: If you want to handle simple Perl command line arguments , such as filenames and strings, this tutorial shows ... can also use: foreach $argnum (@ARGV) Shift I find it easier most of the time to use shift: my variable = shift; ...

Blog - alvin - Jul 22 2014 - 3:20pm - 8 comments

Java exec - execute a system command pipeline in Java

... how to execute a Unix or Linux system pipeline (pipe) command from a Java application, you're in the right place. How to exec ... not locate it. SystemCommandExecutor class You can find it in the "Download" section near the bottom of this page: ...

Blog - alvin - Jun 14 2014 - 3:43am - 2 comments

Converting a Scala class file to decompiled Java source code

... at the result Java class file with the javap command. Towards the end of this tutorial I'll also convert the Scala ... earlier, for a new Scala developer like myself, I find it very helpful to see what Scala is doing under the covers. Seeing the ...

Blog - alvin - Jun 14 2014 - 3:52am - 0 comments

A Java MySQL DELETE example

... demonstrating how to issue a SQL DELETE command from your Java source code. I just worked up a Java MySQL DELETE ... Browsed through a lot of codes in the net and couldn't find code sets that could work with my existing GUI java file. This one works ...

Blog - alvin - Jun 12 2014 - 5:01pm - 1 comment

A Java String regex pattern search example

... and Matcher classes, specifically using the find method of the Matcher class. This is shown in the following source code ... the initial String. In this case we use the find command to simply determine whether the original String contains the pattern we ...

Blog - alvin - Jun 10 2014 - 9:28am - 0 comments

keytool import - import a certificate into a keystore file

... Can you share some examples of the Java keytool import command and process? When you're working with Java public and private ... that file for an alias named "foo". If you find the alias "foo", import the information into the keystore named ...

Blog - alvin - Jun 10 2014 - 6:52pm - 0 comments

A Mac Java Applescript example - how to execute Applescript from Java

... program (a Java program that runs an Applescript command). In this case I'm running the Applescript say command, which ... search here for "applescript", and you'll find quite a few, including this Applescript tutorial about an alarm clock ...

Blog - alvin - Jun 10 2014 - 6:08pm - 0 comments

Java URL example - Download the contents of a URL

... real URL here, or better yet, read it as a // // command-line arg, or read it from a file. // ... for basic contents downloading example using java and find this page. I tested at OpenJDK 7(1.7.0_09) on Linux and I got warning ...

Blog - alvin - Jun 10 2014 - 8:47am - 4 comments

Build an executable Java jar file by referencing your dependencies

... -- so your users can just type something like this at the command line: java -jar my-application.jar to run your Java ... I didn't have to update my Ant script, it would find it automatically. I was able to build the classpath dynamically using ...

Blog - alvin - Jun 10 2014 - 9:15am - 2 comments

JDBC Timestamp - How to select a Java Timestamp field from a database timestamp column

... table commands ( id int auto_increment not null, command_name varchar(128) not null, command_line varchar(1024) not null, ... method to perform this mapping. I hope you find this Java/MySQL Timestamp tutorial helpful. If you have any questions ...

Blog - alvin - Jun 10 2014 - 9:33am - 0 comments