I have to make a java program to find the shortest path between to points to avoid the landmine field. The path must not pass inside of the landmine field but to a go around it. Also, I have to give the coordinates of the landmines and the two points. To be honest I have no idea where to start, so I would like to help me to figure it out. Thanks in advance.
Finding the shortest path while avoiding obstacles is known as a "pathfinding" or "path search" problem.
Check out this website: http://qiao.github.io/PathFinding.js/visual/
I'd say either use A*, Breadth-First Search, or Dijkstra. Of course, that site is in Javascript... but you could use it as a starting point to translate it into C++, Java, or whatever.
Or (probably easier): Search the internet for tutorials on those algorithms. You probably don't need it to be the most efficient algorithm ever, it just needs to get the job done.