<div dir="ltr">Thanks for the help everyone..<div><br></div><div>It works..  I have a little bit of polishing up but it is printing out the correct information.</div><div> </div><div>The money portion ...</div><div><br></div><div><div>Class.forName("org.postgresql.Driver");</div><div><span class="" style="white-space:pre">                      </span>con = DriverManager.getConnection(</div><div><span class="" style="white-space:pre">                                 </span>"jdbc:postgresql://myserver/mydb", "user", "password");<span class="" style="white-space:pre">                                                             </span></div><div><span class="" style="white-space:pre">                   </span></div><div><span class="" style="white-space:pre">                   </span>st = con.createStatement();</div><div><span class="" style="white-space:pre">                        //This has to be in a single line to work.</span></div><div><span class="" style="white-space:pre">                 </span>String myQuery = "SELECT row_to_json(fc) FROM (SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM (SELECT 'Feature' As type, ST_AsGeoJSON(lg.geog)::json As geometry, row_to_json((ani_id, name, lat, lon, animalpref)) As properties FROM animals As lg   ) As f )  As fc;";</div><div><span class="" style="white-space:pre">                    </span></div><div><span class="" style="white-space:pre">                   </span></div></div><div><div>rs = st.executeQuery(myQuery);</div><div><span class="" style="white-space:pre">                       </span></div><div>String returnValue = "";</div><div><span class="" style="white-space:pre">                  </span></div><div>while(rs.next()){</div><div>    String myResults = rs.getString(1);</div><div><span style="white-space:pre">    </span>returnValue = myResults;</div><div>}</div><div><span class="" style="white-space:pre">                    </span></div><div>System.out.println(returnValue);</div></div><div><br></div><div><br></div><div>Andy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 3:21 PM, Andrew Davis <span dir="ltr"><<a href="mailto:drsockmonkee@gmail.com" target="_blank">drsockmonkee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks...  i will</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Oct 6, 2015 3:21 PM, "Walter Nordmann" <<a href="mailto:walter.nordmann@web.de" target="_blank">walter.nordmann@web.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">have a look at JDBC. thats's the right software library to use.<br>
<br>
Walter<br>
<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote></div>
</div></div></blockquote></div><br></div>