Possible Duplicate:
MongoDB (Java) - How to run query saved in javascript file?
I have written java code to search/insert values into a collections in java.But what i want is that i have a .js file containing raw MongoDB queries ex:db.collectionname.find(fieldname: fieldvalue) and now i want to read the .js file line by line and execute the raw mongoDB queries. Please help me with any idea or about functions which will execute raw Mongo DB statements in java like statement.executequery("select * from tablename"); in sql