NavigationUser loginscreen-scraper.com welcomes...
Currently online
There are currently 0 users and 5 guests online.
|
Tutorial 3: Page 4: Interacting with Screen-Scraper from Java
The Java class we'll be writing will simply substitute for the "Initialize scraping session" script we wrote previously. That is, our Java class will invoke our scraping session remotely, passing in a value for the "TEXT_TO_SUBMIT" session variable. Create a new Java class on your computer, and paste the following code into it: import com.screenscraper.scraper.*;For the most part this Java code is virtually identical to our script. The one notable difference is that we need to explicitly disconnect from the server so that it knows we're done. OK, we're ready to give our Java class a try. After you've successfully compiled the class (remember to include the "screen-scraper.jar" file in your classpath), start screen-scraper running as a server. If you need help or have trouble with this refer to the documentation page here: Running screen-scraper as a server. If you've succeeded in starting up the server go ahead and run the Java class from a command prompt or console. After a short pause you should see the "Hi everybody!" message output. If something goes wrong please refer to the "Related pages" section found below for help.
|
SearchNew Video!Tags Throughout this Site |
Recent comments
15 hours 37 min ago
15 hours 54 min ago
16 hours 42 min ago
16 hours 50 min ago
17 hours 39 sec ago
17 hours 11 min ago
2 days 13 hours ago
3 days 20 hours ago
3 days 20 hours ago
5 days 16 hours ago