Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Java_Home #22657

Closed
skin27 opened this issue Jun 23, 2023 · 1 comment
Closed

Setting Java_Home #22657

skin27 opened this issue Jun 23, 2023 · 1 comment

Comments

@skin27
Copy link

skin27 commented Jun 23, 2023

When I run the generator I get the following warning:

Error: JAVA_HOME not found in your environment.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

My JAVA_HOME is set JAVA 11 (as this is the default version we use in the company). I have other Java version (including Java 17) on my machine. When developing I use the toolchain file in Maven. Than in my pom file I have:

				<plugin>
					<artifactId>maven-toolchains-plugin</artifactId>
					<version>3.1.0</version>
					<executions>
						<execution>
							<goals>
								<goal>toolchain</goal>
							</goals>
							<configuration>
								<toolchains>
									<jdk>
										<version>17</version>
									</jdk>
								</toolchains>
							</configuration>
						</execution>
					</executions>
				</plugin>

Maybe it's good that the generator ask me where the location of my Java 17+ is and then I can provide that location or that I can say I use the toolchain (not support by the wrapper?) Of course I work around through manually set the JAVA_HOME in the cmd or on the command line, but I think there maybe good be a more interactive way to ask the user for the java home.

@mraible
Copy link
Contributor

mraible commented Jun 23, 2023

I don't think we should prompt for and hard-code a JAVA_HOME location in the app. This will make it non-portable between developer machines and operating systems.

@mraible mraible closed this as completed Jun 23, 2023
@DanielFran DanielFran added this to the 8.0.0-beta.2 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants