How can I fix “Compilation unit name must end with .java, or one of the registered Java-like extensions”?
2016-08-26 17:02
806 查看
How can I fix “Compilation unit name must end with .java, or one of the registered Java-like extensions”?
![](http://static.adzerk.net/Advertisers/35b68952b0d94bb48aa30e57e3e30873.png)
![](http://engine.adzerk.net/i.gif?e=eyJhdiI6NDE0LCJhdCI6NCwiYnQiOjAsImNtIjo0NzE0OTMsImNoIjoxMTc4LCJjayI6e30sImNyIjoxNjI3NzU5LCJkaSI6ImM1NTdiZDFkMDE2NTRkZmI5YjgwZGU0Y2ZiNmYzMDM5IiwiZG0iOjEsImZjIjoxOTI0NDM3LCJmbCI6MjE0MjMxMiwiaXAiOiIxODAuMTY2LjIzLjkiLCJrdyI6ImVjbGlwc2UiLCJudyI6MjIsInBjIjowLCJlYyI6MCwicHIiOjE2MDQsInJ0IjoxLCJyZiI6Imh0dHBzOi8vd3d3LmJhaWR1LmNvbS9saW5rP3VybD1vZl9zS19Cakc5a1VVUG1QTHlEMDh3anJSN3RRMzV4NjNMSVIyWW5hYXFWNzRCM0NIR0xaLXhGUFNNRHp2cXhVY2R2dVVwS2djbVNBR2lnejdMZjZ0WGpjcnNxTW5xclA4VkNER1VMOFlJZ3VpcDFRNWpLLXRqNmd0UzZXWHlUbFVtRWloSkk5SW9ZOEptX2NvcldiS1lHWHFFaWdsRGZHNWRnbTU0Wjl6UXNEYnRhSnk5TVpuVFBVTXEzbnUyY0kmd2Q9JmVxaWQ9YTVlZjc5NzAwMDAyZTU5ODAwMDAwMDA0NTdjMDAzYzMiLCJzdCI6ODI3NywidWsiOiJ1ZTEtZWE0ZjFlMDg3MGM1NGJiYTgyN2FlMTQ4N2Q1YWViMjAiLCJ6biI6NDMsInRzIjoxNDcyMjAxODM0NjI1LCJiZiI6dHJ1ZSwicG4iOiJhZHplcmsxNTIyMjU2MjE4IiwiZnEiOjB9&s=vRJPFc1AE2rC4oFRUp11lOO4sE0)
up vote7down votefavorite 1 | This error comes up in an alert box when I try saving my js file in eclipse: Compilation unit name must end with .java, or one of the registered Java-like extensions In the breakpoints view I see this: /module-foo/src/main/resources/frontend/foo/foo_base.js [entry] - ___anonymous() eclipse
| |||
3 Answers 3
active oldest votesup vote22down voteaccepted | I had an errant breakpoint set in the file. Removing the breakpoint resolved the problem. The answer comes from a comment in another post, but was a bit obscure in the comments of a lower ranked answer here: JavaScript editor within Eclipse Hopefully putting it here will make it easier to find as I didn't find much when I was trying to resolve this before.
| ||||||||||||||||||||
|
![](http://static.adzerk.net/Advertisers/78e105390cf2426896c5fc38ae85a4f6.png)
![](http://engine.adzerk.net/i.gif?e=eyJhdiI6NDE0LCJhdCI6NCwiYnQiOjAsImNtIjo0NzE0OTMsImNoIjoxMTc4LCJjayI6e30sImNyIjoxNjM4OTgyLCJkaSI6Ijc4NmVmMGE3MzBjMDQ4NDg4M2I4ZGQ1YjQ1NzQ0YTIyIiwiZG0iOjEsImZjIjoxOTQzNDMwLCJmbCI6MjE0MjMxMiwiaXAiOiIxODAuMTY2LjIzLjkiLCJrdyI6ImVjbGlwc2UiLCJudyI6MjIsInBjIjowLCJlYyI6MCwicHIiOjE2MDQsInJ0IjoxLCJyZiI6Imh0dHBzOi8vd3d3LmJhaWR1LmNvbS9saW5rP3VybD1vZl9zS19Cakc5a1VVUG1QTHlEMDh3anJSN3RRMzV4NjNMSVIyWW5hYXFWNzRCM0NIR0xaLXhGUFNNRHp2cXhVY2R2dVVwS2djbVNBR2lnejdMZjZ0WGpjcnNxTW5xclA4VkNER1VMOFlJZ3VpcDFRNWpLLXRqNmd0UzZXWHlUbFVtRWloSkk5SW9ZOEptX2NvcldiS1lHWHFFaWdsRGZHNWRnbTU0Wjl6UXNEYnRhSnk5TVpuVFBVTXEzbnUyY0kmd2Q9JmVxaWQ9YTVlZjc5NzAwMDAyZTU5ODAwMDAwMDA0NTdjMDAzYzMiLCJzdCI6ODI3NywidWsiOiJ1ZTEtZWE0ZjFlMDg3MGM1NGJiYTgyN2FlMTQ4N2Q1YWViMjAiLCJ6biI6NDQsInRzIjoxNDcyMjAxODM0NjI2LCJiZiI6dHJ1ZSwicG4iOiJhZHplcmsxMDc3MDc5MTQ2IiwiZnEiOjB9&s=JbK0nLhoCpmJQfAsLhjafEj4X2g)
up vote3down vote | I also fixed this by removing breakpoints. The interesting thing was, I wasn't able to remove the breakpoint by double clicking on it as you normally would. I had to go into the Breakpoint View and right click and remove the breakpoint from this file. Directly afterwards, I tried to save again, and it was the first time the task completed.
| ||
up vote0down vote | I had an breakpoint set in the file.By Removing the breakpoint resolved the problem.
| ||
draft saved
draft discarded
相关文章推荐
- Compilation unit name must end with .java, or one of the registered Java-like extensions
- 保存文件报错:Compilation unit name must end with .java, or one of the registered Java-like extensions
- eclipse报: Compilation unit name must end with .java, or one of the registered Java-like extensions
- Myeclipse 保存jsp异常Save FailedCompilation unit name must end with .java, or one of the registered Java-like extensions
- Save Failed Compilation unit name must end with .java, or one of the registered java-like extensions
- Compilation unit name must end with .java, or one of the registered Java-like extensions (a error分析)
- Compilation unit name must end with .java, or one of the registered Java-like extensions (a error分析
- eclipse报错:Compilation unit name must end with .java, or one of the registered Java-like exten
- Save Failed Compilation unit name must end with .java, or one of the registered java-like extension
- Compilation unit name must end with .java, or one of the registered Java-like extensions (a error分析)
- eclipse报错:Compilation unit name must end with .java, or one of the registered Java-like exten
- The file name must end with .xml or .png
- java.lang.IllegalArgumentException: Registered more than one instance with the same objectName
- java异常:The processing instruction must begin with the name of the target.
- struts2下载文件错误信息java.lang.IllegalArgumentException: Can not find a java.io.InputStream with the name
- struts2文件下载出现Can not find a java.io.InputStream with the name的错误
- The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain(转)
- struts2文件下载出现Can not find a java.io.InputStream with the name的错误
- How to replace the boot screen with one of your own
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosi