The invention discloses a method for displaying a method call relation graph when a java bytecode is viewed, which comprises the following steps of: 1, decompressing a jar file, and disassembling a class file in the jar file to generate a corresponding code text file; 2, performing text analysis on the code text file, analyzing all methods in all classes, and setting each method as a node in a topological structure; 3, analyzing the method calling code in each method, finding out the calling method, and establishing association in the topological graph; 4, according to the topological graph, drawing each node in the image by using a unified graph, and connecting the nodes; And 5, adding a mouse click trigger event processing function to each node graph in the image, and when a user clicksthe graph, automatically opening a file where the method is located by the processing function and jumping to the method to define a corresponding line number. And decompiling byte codes of the classfile of java to realize automatic logic analysis and generate a function relationship call graph, and presenting the function relationship call graph to a developer in a graphical manner.