I have created RESTful services in java/netbeans using the Jersey Library. Now i want to secure this service using oAuth 2.0.
Are there any libraries or any tutorial to achieve that? I couldn't find anything useful in google.
You can use Apache Oltu (formerly Apache Amber): https://cwiki.apache.org/confluence/display/OLTU/Documentation
The Authorization Server and Resource Server sections explain how to secure your REST services.
Check this example Jersey + Oltu + Oauth: https://bitbucket.org/dobromyslov/oauth2-example/src/
Explanation how it works is located here:
http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-i.html
And here:
http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-ii.html