[英]No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
I'm compiling a project in Eclipse using m2eclipse.我正在使用 m2eclipse 在 Eclipse 编译一个项目。 I set the JDK path in Eclipse like this:
我像这样在 Eclipse 中设置 JDK 路径:
Windows-->preferences-->installed jres--> jdk1.7.xx path
But this is showing an error但这显示错误
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.424s
[INFO] Finished at: Tue Oct 29 15:21:01 IST 2013
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:3.1:compile (default-compile) on project TEST-WEB: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
Additionally, you may have to change Maven JRE (see @jlars62 answer) which is as follows.此外,您可能需要更改 Maven JRE(请参阅 @jlars62 答案),如下所示。 Goto Run -> Run Configurations, selecting the Maven Build I was running (from the left panel).
转到 Run -> Run Configurations,选择我正在运行的 Maven Build(从左侧面板)。 Then, I clicked the JRE tab and selected the option Workspace default JRE
然后,我单击 JRE 选项卡并选择了选项 Workspace default JRE
For me, it is exactly what the maven of eclipse complains对我来说,这正是 eclipse 的专家抱怨的
So, I press Edit
button and change path to the JDK Folder, then clean project and everything starts to work所以,我按
Edit
按钮并更改 JDK 文件夹的路径,然后清理项目,一切开始工作
JAVA_HOME
environment variable to the JDK root folder - required if you run command line or maven ( mvn
).JAVA_HOME
环境变量设置为 JDK 根文件夹 - 如果您运行命令行或 maven ( mvn
),则这是必需的。
JAVA_HOME
for more info) JAVA_HOME
了解更多信息)For me, nothing worked until I made this change to my pom.xml:对我来说,在我对 pom.xml 进行更改之前,什么都不起作用:
<build>
...
<plugins>
...
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe</executable>
</configuration>
</plugin>
</plugins>
</build>
Other Notes其他注意事项
I could see that m2e was executing in a JRE, not the JDK.我可以看到 m2e 在 JRE 中执行,而不是在 JDK 中执行。 Nothing I did changed this, including adding this to the eclipse.ini:
我没有做任何改变,包括将它添加到 eclipse.ini:
-vm
C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe
In the end I never got m2e to execute in a JDK, but setting the Java compiler explicitly (as above) did the trick.最后,我从来没有让 m2e 在 JDK 中执行,但是显式设置 Java 编译器(如上所述)可以解决问题。
I was getting this error when trying to do a maven build from within eclipse.尝试从 Eclipse 中进行 Maven 构建时出现此错误。
For me, the answer was going to Run
-> Run Configurations
, selecting the Maven Build
I was running (from the left panel).对我来说,答案是
Run
-> Run Configurations
,选择我正在运行的Maven Build
(从左侧面板)。 Then, I clicked the JRE
tab and selected the option Workspace default JRE
然后,我单击
JRE
选项卡并选择了选项Workspace default JRE
Go to windows -> Preferences -> Java -> Installed JREs
转到 Windows -> 首选项 -> Java -> 已安装的 JRE
may be jre is already added可能是 jre 已经添加了
click on Add -> Standard VM -> Next -> Directory
点击添加 -> 标准虚拟机 -> 下一步 -> 目录
and browse for the JDK in my case path was C:\\Program Files\\Java\\jdk1.8.0_111
并在我的案例中浏览 JDK 路径是
C:\\Program Files\\Java\\jdk1.8.0_111
then Click on finish.
然后点击完成。
you will see window like this你会看到这样的窗口
select JDK -> Apply -> Ok
选择 JDK -> 应用 -> 确定
And You are done.你已经完成了。
I got same issue and i just add JAVA_HOME
to environment variables .我遇到了同样的问题,我只是将
JAVA_HOME
添加到环境变量中。
JAVA_HOME
open command prompt from project directory and run mvn clean install
(don't use intellij terminal).JAVA_HOME
后从项目目录打开命令提示符并运行mvn clean install
(不要使用 intellij 终端)。I tried all of the above, however, still getting the same error message.但是,我尝试了上述所有方法,仍然收到相同的错误消息。
In my case an actual JRE was incorrectly used as JRE System Library in the project-specific build path which was obviously overriding all those other settings discussed here.在我的例子中,一个实际的 JRE 在项目特定的构建路径中被错误地用作 JRE 系统库,这显然覆盖了这里讨论的所有其他设置。
If that is so in your case try the following:如果您的情况是这样,请尝试以下操作:
An alternative if jaipster's answer does not work is to go to:如果 jaipster 的答案不起作用,另一种方法是转到:
Window > Preferences > Java > Installed JREs窗口 > 首选项 > Java > 已安装的 JRE
Then to edit the jre so that it points to the jdk and not the jre (the jre home filed in the jre package editor)然后编辑 jre,使其指向 jdk 而不是 jre(在 jre 包编辑器中归档的 jre home)
That worked for me.那对我有用。
If you are running the Maven
command from cmd
, make sure you set the jdk path before running the command.如果您从
cmd
运行Maven
命令,请确保在运行该命令之前设置 jdk 路径。 In my case, I have created a .bat
file containing the following:就我而言,我创建了一个包含以下内容的
.bat
文件:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
start cmd.exe /k "cd c:\aem_proj\sis\aau"
I faced the same issue while trying to build a jar file of my project application using mvn clean install
, though the application was working fine while running from Eclipse.我在尝试使用
mvn clean install
构建我的项目应用程序的 jar 文件时遇到了同样的问题,尽管该应用程序在从 Eclipse 运行时运行良好。
The issue was, indeed too naive, that I had not set the JAVA_HOME environment variable.问题是,确实太天真了,我没有设置JAVA_HOME环境变量。 All I had to do is set JAVA_HOME environment variable to JDK directory, make sure it is not till "\\bin" and without semi-colon ";"
我所要做的就是将 JAVA_HOME 环境变量设置为 JDK 目录,确保它不是直到“\\bin”并且没有分号“;” .
.
How I understood it is as:我的理解是这样的:
The application worked fine in Eclipse as JRE System Library was referring to JRE inside the JDK folder instead of external JRE folder without JDK.该应用程序在Eclipse工作细如JRE系统库指的是JRE的JDK文件夹,而不是外部JRE文件夹中没有JDK里面。 [As explained very well in other answers]
[正如在其他答案中很好地解释的那样]
This configuration does not apply to maven command that we run on command prompt.此配置不适用于我们在命令提示符下运行的maven命令。 It will still look for JAVA_HOME variable to access the JRE System library and when it is not found it refers to external JRE folder without JDK.
它仍然会寻找 JAVA_HOME 变量来访问 JRE 系统库,当找不到它时,它指的是没有 JDK 的外部 JRE 文件夹。
My answer pertains to the Eclipse in Windows environment.我的回答与 Windows 环境中的 Eclipse 有关。
I went to Preferences --> Java --> Installed JREs I did NOT see the JDK in here.我去了首选项 --> Java --> 安装的 JRE 我在这里没有看到 JDK。 I only saw the JRE here.
我只在这里看到了 JRE。 So I added the JDK and then unchecked the JRE.
所以我添加了JDK,然后取消选中JRE。 Then checked JDK.
然后检查JDK。 Then I ran the POM file using Run Configurations.
然后我使用运行配置运行 POM 文件。 Choose the tab JRE and select the option "Workspace Default..." Here are the images
选择选项卡 JRE 并选择选项“工作区默认...”这是图像
There are several options to specify.有几个选项可以指定。
Steps: Right on project in project explorer Go to Run-> Run Configuration -> Click Maven Build -> Click on your build config/or create a new config.步骤:在项目资源管理器中的项目上转到运行-> 运行配置-> 单击 Maven 构建-> 单击您的构建配置/或创建一个新配置。 You will see the window as the given snapshot below, click on JRE tab there.
您将看到作为下面给定快照的窗口,单击那里的 JRE 选项卡。
You see you have 3 options 1) Workspace Default JRE 2)Execution Environment 3)Alternate JRE您会看到有 3 个选项 1) 工作区默认 JRE 2) 执行环境 3) 备用 JRE
1) Workspace Default JRE is set from 'Window' menu on the top -> Preferences -> Java -> Installed JREs -Here you can add your jdk
1) 工作区默认 JRE 是从顶部的“窗口”菜单设置的 -> 首选项 -> Java -> 已安装的 JRE - 在这里您可以添加您的 jdk
2) Execution Environment jdk can be set in pom.xml as mentioned by @ksnortum
2)执行环境jdk可以在@ksnortum提到的pom.xml中设置
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe</executable>
</configuration>
</plugin>
</plugins>
3) Alternate JRE can be used to select a jdk from your directory 3) 替代 JRE 可用于从您的目录中选择一个 jdk
Problem statement = No compiler is provided in this environment.问题陈述= 此环境中未提供编译器。 Perhaps you are running on a JRE rather than a JDK?
也许您在 JRE 而不是 JDK 上运行? intellij
智能
Solution解决方案
Please set the Environment variabl e like below to solve the issue请像下面这样设置环境变量来解决问题
Variable name : JAVA_HOME变量名:JAVA_HOME
Variable Value : C:\\Program Files\\Java\\jdk1.8.0_202变量值:C:\\Program Files\\Java\\jdk1.8.0_202
Variable name : M2_HOME变量名:M2_HOME
Variable Value : C:\\Program Files\\apache-maven-3.6.0变量值:C:\\Program Files\\apache-maven-3.6.0
Moreover , Add Java and maven path in " System Variables " like below:此外,在“系统变量”中添加 Java 和 maven 路径,如下所示:
C:\\Program Files\\Java\\jdk1.8.0_202\\bin C:\\Program Files\\Java\\jdk1.8.0_202\\bin
C:\\Program Files\\apache-maven-3.6.0\\bin C:\\Program Files\\apache-maven-3.6.0\\bin
Though the question is about the error with Eclipse
setup but thought an answer of fixing this error with IntelliJ
and Windows 10 setup may also be helpful here.虽然问题是关于
Eclipse
设置的错误,但认为使用IntelliJ
和 Windows 10 设置修复此错误的答案在这里也可能有所帮助。
1 . 1 . Go to
File
--> Settings
--> Build, Execution, Deployment
--> Build Tools
--> Maven
--> Importing
转到
File
--> Settings
--> Build, Execution, Deployment
--> Build Tools
--> Maven
--> Importing
2 . 2 . Set
JDK
for Importer
as shown below to JAVA_HOME
如下图设置
Importer
JDK
为JAVA_HOME
Also JAVA_HOME
should be set to JDK
path at Environment Variables --> System variables and also add %JAVA_HOME%\\bin
to Path System variables此外,
JAVA_HOME
应该在 Environment Variables --> System variables 中设置为JDK
路径,并将%JAVA_HOME%\\bin
添加到路径系统变量
For me the JRE was in the PATH environment variable before the JDK path对我来说,JRE 在 JDK 路径之前位于 PATH 环境变量中
So I removed 1. Probably swapping them would fix it too.所以我删除了 1. 可能交换它们也会修复它。
There is another possible answer to this question, and I may be the only person foolish enough to have stumbled upon this, but I think it's worth adding, since none of the other answers applied as I already had those settings correct.这个问题还有另一个可能的答案,我可能是唯一一个愚蠢到偶然发现这个问题的人,但我认为值得补充,因为没有其他答案适用,因为我已经正确设置了这些设置。
When you install a JDK, the installer asks you where you want to install the files.安装 JDK 时,安装程序会询问您要将文件安装到何处。 By default, on Windows, this is something like C:\\Program Files\\Java\\jdk1.8.0_74 (or whatever version you are installing).
默认情况下,在 Windows 上,这类似于 C:\\Program Files\\Java\\jdk1.8.0_74(或您正在安装的任何版本)。
It then asks you for a directory to install the JRE to, which by default is something like C:\\Program Files\\Java\\jre1.8.0_74.然后它会要求您提供一个用于安装 JRE 的目录,默认情况下该目录类似于 C:\\Program Files\\Java\\jre1.8.0_74。
Note that one is jdk 1.8.0_74 and the other is jre 1.8.0_74注意一个是jdk 1.8.0_74,另一个是jre 1.8.0_74
I was rushing things, and thinking the installer was asking me the same question twice, set both my JDK and JRE install locations to D:\\devtools\\jdk\\jdk1.8.0_74, resulting in the installer overwriting the JDK with the JRE.我很着急,认为安装程序两次问我同样的问题,将我的 JDK 和 JRE 安装位置都设置为 D:\\devtools\\jdk\\jdk1.8.0_74,导致安装程序用 JRE 覆盖了 JDK。 This resulted in (among other things) a missing javac.exe in my JDK bin, and the same error the OP reported here in all my maven builds.
这导致(除其他外)我的 JDK bin 中缺少 javac.exe,并且 OP 在我的所有 maven 构建中报告了相同的错误。
I got a solution.我得到了解决方案。
The most common solution for this problem is to change jdk location as my Installed JREs instead of the JRE location but that did not solve my problem this one time.此问题最常见的解决方案是将jdk 位置更改为我安装的 JRE而不是JRE 位置,但这一次并没有解决我的问题。
So I did the below to solve the problem.所以我做了下面的事情来解决这个问题。 Expand the Installed JREs tab and you will find a Execution environments tab.
展开已安装的 JRE选项卡,您将找到一个执行环境选项卡。
Click on your favourite execution environment.单击您最喜欢的执行环境。 In my case it was JAVASE-1.8 .
就我而言,它是JAVASE-1.8 。 There it shows 2 options.
在那里它显示了 2 个选项。 JDK and JRE .
JDK 和 JRE 。 Select JDK there and the problem is solved.
在那里选择JDK ,问题就解决了。
I tried most of the answers without success.我尝试了大部分答案都没有成功。 What worked for me was (after following https://stackoverflow.com/a/21279068/2408893 ):
对我有用的是(在关注https://stackoverflow.com/a/21279068/2408893 之后):
I just wasted 3 hours with this problem until I managed to make it work.我只是在这个问题上浪费了 3 个小时,直到我设法让它发挥作用。 I had this error in the Eclipse Terminal when issuing a mvn compile command:
发出 mvn compile 命令时,我在 Eclipse 终端中遇到此错误:
No compiler is provided in this environment.此环境中不提供编译器。 Perhaps you are running on a JRE rather than a JDK?
也许您在 JRE 而不是 JDK 上运行?
So I read here that I have to make a new system variable called JAVA_HOME and make it point towards the jdk installation folder.所以我在这里读到我必须创建一个名为 JAVA_HOME 的新系统变量,并使其指向 jdk 安装文件夹。 However this generated another error:
然而,这产生了另一个错误:
Source option 1.5 is no longer supported.不再支持源选项 1.5。 Use 1.6 or later
使用 1.6 或更高版本
Couldn't find a fix for this one so...找不到解决这个问题的方法,所以......
So the fix to make it all go away is install Java SE Development Kit 8!因此,让这一切消失的修复方法是安装 Java SE Development Kit 8! I was using 9 thinking that if it's the latest it must be better...
我在使用 9 时认为如果它是最新的,它一定会更好......
Anyway...反正...
Install JDK8 from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html从这里安装 JDK8: http : //www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Then define the JAVA_HOME system environmental value - tutorial here: https://docs.oracle.com/cd/E19509-01/820-3208/inst_cli_jdk_javahome_t/然后定义JAVA_HOME系统环境值——教程在这里: https : //docs.oracle.com/cd/E19509-01/820-3208/inst_cli_jdk_javahome_t/
Restart Eclipse and enjoy!重新启动 Eclipse 并享受! (at least that's what I did)
(至少我是这样做的)
Hoping this spares some poor wanderer of some trouble.希望这能让一些可怜的流浪者免于麻烦。
In my case I had system variable path has "C:\\ProgramData\\Oracle\\Java\\javapath" location.就我而言,我的系统变量路径具有“C:\\ProgramData\\Oracle\\Java\\javapath”位置。
In "C:\\ProgramData\\Oracle\\Java\\javapath" location java, javaw only there.在“C:\\ProgramData\\Oracle\\Java\\javapath”位置java,javaw只在那里。 So I am getting the same error.
所以我得到了同样的错误。
Once I removed all files in "C:\\ProgramData\\Oracle\\Java\\javapath" folder my error got resolved.一旦我删除了“C:\\ProgramData\\Oracle\\Java\\javapath”文件夹中的所有文件,我的错误就得到了解决。
Try this.尝试这个。
<build>
...
<plugins>
...
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable> path to jdk \bin\javac.exe</executable>
</configuration>
</plugin>
</plugins>
</build>
我遇到了同样的问题,我犯的错误是我只在路径 var 中添加了 jre 路径,而不是 jdk 路径。当 jdk 路径添加到路径并构建 Maven 项目时,它的工作完美。谢谢大家
Add new JRE definition (select path JDK), worked for me.添加新的 JRE 定义(选择路径 JDK),对我有用。
http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-add_new_jre.htm http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-add_new_jre.htm
I was getting the same error when I created a new EC2 ubuntu 16.04 instance with Java already installed on it and while running mvn clean package, I encountered this issue and the below solution worked for me.当我创建一个新的 EC2 ubuntu 16.04 实例并且已经安装了 Java 并且运行 mvn clean package 时,我遇到了同样的错误,我遇到了这个问题,下面的解决方案对我有用。
If you are working on an Ubuntu server, then you can try installing Java again and for that you can use this answer How to install the JDK on Ubuntu Linux如果您在 Ubuntu 服务器上工作,那么您可以尝试再次安装 Java,为此您可以使用此答案如何在 Ubuntu Linux 上安装 JDK
In Windows 7 - 64 bit, there is a permissions problem which prevents the installer from unpacking the file C:\\Program Files\\Java\\jdk1.6.xx\\lib\\tools.jar into your local.在 Windows 7 - 64 位中,存在一个权限问题,它阻止安装程序将文件 C:\\Program Files\\Java\\jdk1.6.xx\\lib\\tools.jar 解压到本地。 This jar file is what maven-compiler-plugin version 3.x uses instead of the usual javac
这个 jar 文件是 maven-compiler-plugin 版本 3.x 使用的,而不是通常的 javac
Solution: Run, as an administrator, the Java JDK installer!解决方案:以管理员身份运行 Java JDK 安装程序! And make sure the tools.jar is sitting in the C:\\Program Files\\Java\\jdk1.6.xx\\lib\\
并确保 tools.jar 位于 C:\\Program Files\\Java\\jdk1.6.xx\\lib\\
In case you are using m2e maven integration plugin, you want to see the file is visible to Eclipse via the following steps inside Eclipse:如果您使用的是 m2e maven 集成插件,您希望通过 Eclipse 中的以下步骤查看该文件对 Eclipse 可见:
Go to Window -> Preferences -> Java -> installed JREs Select the JDK you are using (C:\\Program Files\\Java\\jdk1.6.xx) Press Edit to see the list of jars including tools.jar, OR you can add it as Add External JAR Then configure the maven run through these steps:转到 Window -> Preferences -> Java -> installed JREs 选择您正在使用的 JDK (C:\\Program Files\\Java\\jdk1.6.xx) 按 Edit 查看包含 tools.jar 的 jar 列表,或者您可以将其添加为 Add External JAR 然后通过以下步骤配置 maven 运行:
Run->Run configurations->Fill in Name, Base directory and Goals.运行->运行配置->填写名称、基本目录和目标。 Then in the same window move to the JRE tab and point to the JDK \\jdk1.6.xx\\
然后在同一个窗口中移动到 JRE 选项卡并指向 JDK \\jdk1.6.xx\\
In addition to answer above, I could say that just try to run Maven from the terminal (outside of Eclipse).除了上面的回答,我可以说只是尝试从终端(Eclipse 之外)运行 Maven。 In this way, if it builds from outside but not in Eclipse, you can understand that the problem should be in Eclipse.
这样,如果是从外部构建而不是在Eclipse中构建,则可以理解问题应该在Eclipse中。
There are several answers regarding this question but all are related to right path configuration of JDK, but with JRE only we can solve this problem.关于这个问题有几个答案,但都与JDK的正确路径配置有关,但只有JRE才能解决这个问题。
We just need to make use of deployment assembly to configure the path of packaged war file of the Java EE Project and then re-run the maven-install.我们只需要利用部署组件配置Java EE项目打包war文件的路径,然后重新运行maven-install即可。
Steps to make use of deployment assembly:使用部署程序集的步骤:
Right click on the Jave EE project --> click on Properties --> click on Deployment Assembly右键单击 Java EE 项目 --> 单击属性 --> 单击部署程序集
Click on Add button --> Click on Archives from the File System --> Click on next --> Click on Add --> Go to the .m2\\respository directory and search for the war file generated --> Select war file --> Click on Open button --> Click on Apply --> OK点击添加按钮-->点击文件系统中的档案-->点击下一步-->点击添加-->进入.m2\\respository目录并搜索生成的war文件-->选择war文件--> 点击打开按钮 --> 点击应用 --> 确定
Right click on the project --> Click on Maven Install under Run As右击项目-->点击Run As下的Maven Install
This will build your project successfully, without any compiler error.这将成功构建您的项目,而不会出现任何编译器错误。
Hope this solves the problem without JDK.希望这可以解决没有 JDK 的问题。
Are you missing any maven build. 你错过了任何maven构建吗?
Apart from above JRE changes.I still faced similar issue.I was missing JUnit dependency after adding it is working fine. 除了上面的JRE更改。我仍然遇到类似的问题。我添加它后工作正常,我缺少JUnit依赖。
Hope this will help. 希望这会有所帮助。
I went to Preferences --> Java --> Installed JREs I did NOT see the JDK in here. 我去了Preferences - > Java - > Installed JREs我没有在这里看到JDK。 I only saw the JRE here.
我这里只看到了JRE。 So I added the JDK.
所以我添加了JDK。
here we have to mandatory remove JRE instead of just unchecking. 在这里我们必须强制删除JRE而不是仅仅取消选中。
In Linux, doing a docker example, I must not have had the JDK installed just the JRE.在 Linux 中,做一个 docker 示例,我一定不能只安装 JRE 的 JDK。 After
sudo apt install openjdk-8-jdk
and setting JAVA_HOME in profile and adding JAVA_HOME/bin to the path, it built!在
sudo apt install openjdk-8-jdk
并在配置文件中设置 JAVA_HOME 并将 JAVA_HOME/bin 添加到路径之后,它就构建了!
对我来说,我已经升级到 Big Sur Mac OS,我必须删除它,然后它运行良好。
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
This is because it is looking for JDK and is founding JRE.这是因为它正在寻找 JDK 并正在创建 JRE。
Recommended Solution:推荐解决方案:
Window > Preferences > Java > Installed JREs > Edit > Click on directory > Browse JDK path....窗口 > 首选项 > Java > 已安装的 JRE > 编辑 > 单击目录 > 浏览 JDK 路径...。
That should work fine.那应该可以正常工作。
It worked fine for me!!它对我来说很好!
While building the project, make sure to point the jre to jdk path.在构建项目时,确保将 jre 指向 jdk 路径。 This can be done in Run configuration section for the particular project.
这可以在特定项目的运行配置部分中完成。
Please for windows uses请为windows使用
If you are using intellij, just after adding JAVA_HOME open command prompt from project directory and run mvn clean install(don't use intellij terminal).如果您使用的是 intellij,只需在添加 JAVA_HOME 后从项目目录打开命令提示符并运行 mvn clean install(不要使用 intellij 终端)。
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202设置 JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.