google chrome - URL search through java program -


just quick question. part of program i'm building java opens chrome. wondering if after program opened chrome, there way search specific url or regular keywords (example: recipes, images, or google question.)

you can code below.but work on windows

string question="what this?";          question= question.replace(' ', '+');           try {             runtime.getruntime().exec(new string[]{"cmd", "/c","start chrome https://www.google.com/search?q="+question});         } catch (exception e) {          } 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -