Program including following code works on ubuntu but i am not friendly with ubuntu. I want to make it work in windows. In windows it is showing exception as grep is not windows command.can it be solved??
for(int i=0;i<list.size();i++)
{
    //System.out.println(list.get(i));
    try{
    str="grep -c -w "+ list.get(i) +" 1.txt";   
    Process p=Runtime.getRuntime().exec(str);
BufferedReader in1=new BufferedReader(new InputStreamReader(p.getInputStream()));
    int line=Integer.parseInt(in1.readLine());
    if(line==0){
    b="0,".getBytes();
    out.write(b);       
    }
    else{
    b="1,".getBytes();
    out.write(b);       
    }
}catch(Exception e){
System.out.println(e);
}
}
 
     
    