当尝试从 Windows 资源管理器打开 .java 文件时,我收到“未找到可打开文件的项目”消息。错误信息
因此,当我双击 Windows 资源管理器中的文件时,Intellij 会启动,但不是只显示我想要查看的文件,而是显示以下消息:
我想我明白它的意思:这意味着这个给定的 .java 文件与 Intellij 项目无关。
这确实是事实,但即便如此,我还是希望能够打开该文件并通过语法突出显示等方式查看它。
如何克服这个问题呢?
谢谢
So, when I double click a file in windows explorer, Intellij fires up, but instead of just showing me the file I want to see, shows up the following message:
I think I get what it means: it means this given .java file isn't associated with an Intellij project.
That's actually true, but even so I'd like to be able to open the file and see it with syntax highlighting and such.
How to overcome this problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个已知的限制,我们计划在未来的版本中解决该限制,以允许在没有项目上下文的情况下打开和编辑单个文件。
请观看/投票相关问题。
It's a known limitation which we plan to address in the future versions to allow opening and editing individual files without project context.
Please watch/vote the related issue.
我不认为你默认
不能可以。我假设您正在打开下载的文件等。我想要的是在桌面上创建一个项目(例如Scrapbook
是一个好名字),然后我会将我想要在相应的 src 文件夹中查看的文件放入/下载。这样当我点击它时它就会正确打开。大多数语法突出显示和如此好的想法都来自正确的项目设置(正确的 JDK 路径、库等)。
I don't think you
can'tcan by default. I'm assuming you are opening downloaded files or such. What I would is create a project (Scrapbook
for example is a good name) on desktop and I would put/download the file I want to see in the corresponding src folder. That way when I'm clicking it would open properly.Most of the syntax highlight and such goodness of idea comes from a proper project setup (proper JDK paths, libraries, etc).