write java app that does the equivalent of wget http://www.someurl.com/download.json, then parses it into field1, field2, field3, field4, field5, field6, field7 in String format and inserts it into somedb.sometable in mysql. I could write the stupid thing in 15 minutes in bash, but am new to Java and am on page 39 of the book I bought which has taught me mostly irrelevant things related to this simple task, tired of screwing with it. I mean, do I need 1 class for wget, 1 for parsing json and 1 for the db insert, or just 1 big one, and then how to I tell java to use the classes and do something useful. And how do I tie all those classes together? I guess I need to create a few classes, then do something in public static void main(String args) that ties it all together, something like
wget -o filename url
cat filename | while read i;
while $i do;
grep sed and awk the format into field1, field2, etc
db insert statement field1, field2
why's this so complicated in java? But in java how do I handle errors, and what do I need to do to write a file after downloading? Once I learn all this stuff I could probably write the thing myself in java in 15 minutes, but right not it seems more complicated than I'm sure I'm making it. Comment everything you write so I can figure it out later. My main purpose is to pay for a tutor to help me along so I can learn faster. I started this in Python, but want to learn java, otherwise I'd just do it in bash. I can provide an example json download for formatting info. I'm importing
but I doubt I need half of those. I'm using Netbeans 6.8/Linux for my dev platform.