write java app that does the equivalent of wget [login to view URL], then parses it into field1, field2, field3, field4, field5, field6, field7 in String format and inserts it into [login to view URL] 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
done;
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
import net.sf.json.*;
import java.io.*;
import java.net.*;
import java.sql.*;
import [login to view URL];
but I doubt I need half of those. I'm using Netbeans 6.8/Linux for my dev platform.
Hi! I realize that you need understanding of how these things are done in Java. Here is my explanation. If you like it then choose me.
1) You don't need to write many classes. You don't have a big number of objects, so writing just one class with the 'main' method will do. You will also include some helper methods in this class. Classes are useful when you have a big model consisting of complicated relations between different types of objects. Your task is just a simple action.
2) About handling errors: there is a very complicated error handling system in Java, but here we can do nothing and just let the error message show in the command line (this is the default behavior of a Java application). But we can include one try-catch clause if you want you application to do something when an error occurs.
3) You will have to use the JDBC technology for INSERT statements and you will have to pick up an appropriate driver for your MySQL database.
4) You don't need to import anything while you are writing Java code. There is a function which imports every class that you have used in any IDE, including Netbeans.
5) It will take much more than 15 minutes, because in Java you always have to deal with lots of configuration and different technologies. For example here you will have to use JDBC API, I/O API and, probably, error handling API.
So, if you like my explanation, please choose my bid
Best Regards,
Ruslan
I am pretty experienced in Java, but new to this JSON thing. But if it is in Java, I can do it for sure. I can make it a good learning curve for both of us. Let me know.
Dear Sir,
I'm a software developer and I have a master degree in computer science.
I've done different projects in Java (data base manag. system, Swing, AOP, design patterns) using Eclipse IDE and NetBeans.
- database management system (MySql+Java using NetBeans)
- manipulating data structures - stack, queue, binary trees (graphical interfaces, add, delete, search)
- Windows calculator
- java network communication
- Java collections
- Java Swing
I'm looking forword to work for you.
Regrds,
Mariu
Hi there,
I'm a Java software developer currently employed as such in Toronto Canada for one of the telecommunications companies here.
I have expertise in Enterprise Java, Ajax, CSS, Relational DB, and Webservice technologies...
Would love to work on this project with you.
Let me know if you have any questions