This is why beginners are recommended not to use IDEs - you have two learning curves, Java and the IDE.
So, dump the IDE for the moment and just use a good programming editor - Notepad++ is one that is often recommended around here but there are others as well. Search the forums for Notepad++ and you will find posts that list the others.
archit thakur wrote:and what if was not using netbeans
To get javac to find your jar file you need to include it in your classpath. You can specify this using the -cp option.