Warning: include(/var/chroot/home/content/89/8178489/html/wp-content/cache/db/000000/all/45d/924/title.php) [function.include]: failed to open stream: No such file or directory in /home/content/89/8178489/html/wp-config.php on line 86

Warning: include() [function.include]: Failed opening '/var/chroot/home/content/89/8178489/html/wp-content/cache/db/000000/all/45d/924/title.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/89/8178489/html/wp-config.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/content/89/8178489/html/wp-config.php:1) in /home/content/89/8178489/html/wp-includes/feed-rss2-comments.php on line 8
Comments for Java Logs http://weblog4j.com We love it when you visit. Thu, 26 Jun 2014 11:15:21 +0000 hourly 1 https://wordpress.org/?v=4.7.3 Comment on Having Fun with Google Custom Search API and Java by Niraj Singh http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-132585 Thu, 26 Jun 2014 11:15:21 +0000 http://weblog4j.com/?p=554#comment-132585 Hi,

It is difficult to say without look at your setting. Were you able to create the maven project successfully? Can you do following?

1. Send your pom.xml
2. Explode your project in the eclipse and send across a print screen..
3. Right click on your project in project explorer -> Maven -> Enable Dependency Management.

You can send these on my email ‘singh.niraj@aranin.com’

Regards
Niraj

]]>
Comment on Having Fun with Google Custom Search API and Java by shruthi http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-132484 Wed, 25 Jun 2014 14:50:01 +0000 http://weblog4j.com/?p=554#comment-132484 Hi,
I did everything mentioned above , but still i am getting import errors.
Can you please tell me how i can rectify it?
Thank you

]]>
Comment on Having Fun with Google Custom Search API and Java by Niraj Singh http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-132174 Mon, 23 Jun 2014 07:12:50 +0000 http://weblog4j.com/?p=554#comment-132174 Hi Shruti,

No problem. You need to create a stand alone java maven project in your eclipse. This will generate a pom.xml for you. You can add in the dependencies in this post in pom. You will know the place where to add once you have a look.

Please follow the steps below.
1. Try to create a simple java project using steps in http://weblog4j.com/2014/06/23/create-a-simple-maven-java-project-in-eclipse-using-m2eclispe/
2. Open pom and add dependencies provided in this post in pom.xml.
3. Add the java code in src/main/java package.
4. Try running as “GoogleSearchClient ” as simple java application.

Happy Learning
Niraj

]]>
Comment on Having Fun with Google Custom Search API and Java by shruthi http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-131993 Sat, 21 Jun 2014 21:53:18 +0000 http://weblog4j.com/?p=554#comment-131993 I even tried – “You can download the search API library from here” , but no use.
There is no option to run as web application in the eclipse I have and localhost is giving me error.

]]>
Comment on Having Fun with Google Custom Search API and Java by shruthi http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-131992 Sat, 21 Jun 2014 21:48:17 +0000 http://weblog4j.com/?p=554#comment-131992 Hi,
I’m new to all this and new to eclipse as well.
I have a few questions and it will be much appreciated if you can help me out with them.
Firstly I have done everything till the Libraries and Dependencies. I have no clue as to what to do next.
Where do I add the dependencies ?
I copy pasted the code and it gave me errors for the imports.
I release it is because those dependencies aren’t there but I have no clue how to fix them.
I have installed m2 for eclipse.
Pardon my ignorance and please help me.
Thank you.

]]>
Comment on Having Fun with Google Custom Search API and Java by Swathi http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-131120 Mon, 16 Jun 2014 18:17:25 +0000 http://weblog4j.com/?p=554#comment-131120 Yes it did. Thank you!

]]>
Comment on Having Fun with Google Custom Search API and Java by Niraj Singh http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-131097 Mon, 16 Jun 2014 14:33:03 +0000 http://weblog4j.com/?p=554#comment-131097 Hi Swathi,

You can set the number of links returned to 1.

list.setNum(1L);

Comment out the next line which is used for paginating i.e

//list.setStart(10L);

Now you have a list of one record which is the first record of the search. Just return resultList.get(0) instead of the list.

Hope this helps

Regards
Niraj

]]>
Comment on Having Fun with Google Custom Search API and Java by swathi http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-131094 Mon, 16 Jun 2014 14:00:21 +0000 http://weblog4j.com/?p=554#comment-131094 I wanted to know how to select the first link in the set of links through a program?
I am making this android app and i wanted to select the first link in the search result and go to that page directly. I don’t want a large set of links.

]]>
Comment on Having Fun with Google Custom Search API and Java by Niraj Singh http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-129829 Thu, 05 Jun 2014 04:52:21 +0000 http://weblog4j.com/?p=554#comment-129829 Hi Felipe,

Thanks for the kind comment. To return more than 10 result you need to use CSE List.setNum() method. Please have a look at the getSearchResult() method. Uncomment the second line and if you want 25 results per page then use

//num results per page
list.setNum(25L);

Please Note – Google puts a restriction of maximum 100 results per call. Hope this helps.

Regards
Niraj

]]>
Comment on Having Fun with Google Custom Search API and Java by Felipe http://weblog4j.com/2014/06/03/having-fun-with-google-custom-search-api-and-java/#comment-129782 Wed, 04 Jun 2014 18:07:19 +0000 http://weblog4j.com/?p=554#comment-129782 Olá,

excelente tutorial! Como faço para retornar mais que 10 resultados?

Obrigado!

]]>