debug mode, fis = new FileInputStream (file); break point line debugging process can not be found by f5 into the jdk source
package com.lzl.spring.test; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.junit.Test; public class Test1 { private static String name="C:\\Study\\2401.jpg_wh1200.jpg"; public static void inputStream() { try { InputStream a=new FileInputStream(name); } catch (FileNotFoundException e) { String message = e.getMessage(); System.out.println(message); e.printStackTrace(); } } @Test public void test11() { // inputStream(); Person per=new Student("haha"); per.doSomething(); } public static void main(String[] args) { FileInputStream fis=null; try { File file=new File(name); fis=new FileInputStream(file); int available = fis.available(); System.out.println(available); long n=500000; fis.skip(n); int available2 = fis.available(); System.out.println("available2 is "+available2 ); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); }finally { if(fis!= null) { try { fis.close(); } catch (IOException e) { e.printStackTrace(); } } } }
After checking the information found:
eclipse default is java environment using JRE (Java Runtime Environment that is java runtime environment) environment, jre environment does not support debugging; you need to replace the JDK eclipse environment. View eclipse operating environment as follows: window -> preference -> java -> Installed JREs -> right side will see the eclipse of java environment.
Since it will eclipse JRE does not allow debugging environment into jdk configuration is as follows:
The first step to find the JREs environment configuration Installed
Step two: the reference environment to debug the project into the jdk (ie Buil Path) as shown:
You can now debug and trace the source of the jdk