Eclipse运行文件出现No embedded stylesheet instruction for file错误

时间:2024-04-05 18:47:53

16:28:27,001 INFO  [main] Main  - javax.xml.transform.TransformerFactory=null
16:28:27,002 INFO  [main] Main  - java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_60\jre\lib\endorsed
16:28:27,005 INFO  [main] Main  - launchFile: F:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
16:28:27,290 FATAL [main] Main  - No embedded stylesheet instruction for file: file:/F:/eclipse/workspace/TestMyBatis/src/batis.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/F:/eclipse/workspace/TestMyBatis/src/batis.xml
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:189)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:75)
Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/F:/eclipse/workspace/TestMyBatis/src/batis.xml
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:215)
    ... 2 more


╮( ̄▽ ̄")╭,这是一个比较蠢的错误,在点击运行的时候当前打开的文档为xml文件,应该运行Java文件,运行错误。

点击Java文件运行成功

Eclipse运行文件出现No embedded stylesheet instruction for file错误