Intellij 排除文件被编译 [英] Intellij exclude file from being compiled

查看:15
本文介绍了Intellij 排除文件被编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将项目中的特定文件排除在编译之外.

I am trying to exclude a particular file in my project from being compiled.

根据 Intellij IDEA 文档,您可以通过将文件标记为纯文本"来执行此操作.

According to the Intellij IDEA documentation you do this by "marking the file as plain text".

但是,此功能所在的项目视图中的上下文菜单没有此类操作.我正在使用 Intellij 13.02 版.这是我的上下文菜单的样子:

However, the context menu in the project view where this functionality is supposedly located has no such action. I am using version 13.02 of Intellij. Here is what my context menu looks like:

推荐答案

在 File > Settings > Build, Execution, Deployment > Compiler > Excludes 下,添加一个条目.

Under File > Settings > Build, Execution, Deployment > Compiler > Excludes, add an entry.

任何尝试运行此处指定的路径都将导致 ClassNotFoundException,以及一个非常重要的类指示符.

Any attempts to run a path specified here will result in a ClassNotFoundException, and a very important class indicator as well.

这篇关于Intellij 排除文件被编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆