0

So, I'm trying to start building a project using the jhipster generator with React framework on the front end and Spring Boot on the back end. I am on a Windows computer but am using the Ubuntu Bash Shell to set up the project.

I was able to successfully generate my jhipster project and am on the first steps of the README where it is telling you steps on how to build the project. These are the steps that they show to run.

I ran npm install fine and then I tried the ./mvnw and the first time it was running it said at the very beginning that the JAVA_HOME path was not set up. This confused me since I knew that I had one set up on my Windows computer. However, it seemed that I had to install and create a new path for a different java just for the Ubuntu Bash shell.

So I went ahead and installed a version of Java and then set the path. Here is a picture of the path I set to it.]2 So, I went back and ran the ./mvnw command again and the "no JAVA_HOME path" error was no longer showing. However after 5 mins of it running the build, it sent out a BUILD FAILED followed by No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

I have done some research on the error and they all seem to discuss changing settings while working in Eclipse, but this doesn't apply to me because I have the project open in IntelliJ . Also, since I am running the command in the Ubuntu Bash shell I would imagine that IntelliJ has nothing to do with this. I have also installed maven through the bash shell as well in case you need that to help troubleshoot the issue.

Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49
mtibo
  • 61
  • 1
  • 2
  • 7
  • Does this answer your question? [No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?](https://stackoverflow.com/questions/19655184/no-compiler-is-provided-in-this-environment-perhaps-you-are-running-on-a-jre-ra) – Anish B. Jun 13 '20 at 18:11
  • @AnishB. I just looked through it. the answers on that thread only seemed to suggest changing settings found in the Eclipes IDE. I am not using that so I don't think it would apply with mine. – mtibo Jun 13 '20 at 18:20
  • As you know, WSL2 is much more than just a shell, how did you install the jdk in Ubuntu? I'm not sure why you don't run mvnw from IntelliJ either from dedicated tab or from integrated terminal, there are many benefits for doing it this way. – Gaël Marziou Jun 13 '20 at 20:27
  • @GaëlMarziou Sorry, I'm pretty new to this and Im not too familiar with WSL2 and all it can do. All I have used it so far is setting up my Ubuntu shell. As for installing java I ran "sudo apt-get install openjdk-8-jdk" and it installed it. Also, I tried running the mvnw command in Intellij and there was no difference. – mtibo Jun 14 '20 at 01:02
  • 1
    Commenting "there was no difference" does not give any hint to those who try to help you: we don't have a crystal ball. Please edit your question with details and paste errors if any. I indicated you 2 ways to run maven from IntelliJ, did you try both? The way you installed the JDK is correct, it could be an issue with your PATH, what does print `mvnw -v`? Also please paste text rather an images – Gaël Marziou Jun 14 '20 at 09:21
  • Why using WSL 2 shell if you're a newbie? What is the problem you're trying solve with it? Using WSL 2 just for a shell consumes much memory, and you could then also have issues with networking or nodejs. It's always better to start with a simpler setup then when it's working, you add more sophistication if needed. – Gaël Marziou Jun 14 '20 at 09:23

0 Answers0