Clojure is hosted on the Java Virtual Machine (JVM) and as such can access Java libraries and classes quite easily. Some of Java is built in so to speak and included in Clojure. Look inside of the clojure.java.io namespace. A good example is file which returns a java.io.File object.
These and other examples are useful to understand. But, what if you have an external Java library which you'd like to use. Here is an example:
The commons lang library provides among other things a host of utilities for working with the Java API. Let's pick something within it that we'd like to use from within our Clojure program to demonstrate the process of working with an external Java library.
As a final post about the new Yahoo Finance quote download page and how to access the historical data I thought to offer a bit of a summary.
The four previous posts with examples for Bash, Python, Java and Clojure are available at the following urls. Please visit them if you have just arrived at this post without seeing them. At the very least, read the beginning of the first one for more details on the issue with the new Yahoo Finance download data page and the technique to call it programmatically.
Today's post is a final version of the Yahoo Finance Quote Download application written using the Clojure programming language. If you are interested there are three previous versions of this application using Bash, Python and Java.
For the impatient you can find the source for this post in the following git repo.
Today's post includes and overview of a Java implementation created to support the new Yahoo Finance page changes. Previous posts include implementations in Bash and Python. Please review them if curious or if you feel the following doesn't have enough of an explanation of the issue created when Yahoo changed their finance page back in May.
For the impatient you can find the program in the following git repo.
Picking up the thread after yesterday's post on the new Yahoo Finance page changes http://blog.bradlucas.com/posts/2017-06-02-new-yahoo-finance-quote-download-url/ I thought it would be useful to repeat the exercise from yesterday and build the new download script in Python.
For the impatient you can find the script in the following git repo.