Skip to content
Advertisement

Tag: environment-variables

Mvn is not recognized as a command on Github Actions on Windows a self hosted runner

I set up a simple Github Actions workflow simply to check if my self-hosted Windows Virtual Machine is able to recognize the installed java/git/maven versions. Versions in the Virtual Machine: Microsoft Windows 64 bit Java version: jdk1.8.0_202 Maven version: 3.8.5 Java and Git are correctly recognized however the step checking for maven version fails: it fails with the following log:

Maven error: Could not find or load main class And Unable to Edit System Variables

I have Maven installed, and it was working fine yesterday, however now it is displaying the infamous (Maven error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher) error… In other solutions, it seems that the system variable needs to be edited from M2_HOME to M3_HOME. Yet, I am unable to edit my system environment variables (also pictured). Any suggestions for

Java path problems, ‘java’ is not recognized as an internal or external command, operable program or batch file. (javac too)

I know there are lot of questions like this but i tried their solutions and nothing. While i try to javac file.java i get ‘javac’ is not recognized as an internal or external command, operable program or batch file. And java file ‘java’ is not recognized as an internal or external command,operable program or batch file. My environment path is

Does gradle.properties have access to environment variables

I looked around and could not find any way of accessing environment variables in my gradle.properties. What I can do: In my build.gradle I can access environment variables like this System.getenv(“MY_VAR”). I would like to do the same in my gradle.properties. Example of what I want to do: In my gradle.properties replace build.foo=bar with build.foo=System.getenv(“BAR”) So far all my attempts

Switching between different JDK versions in Windows

I’m working on few projects and some of them are using different JDK. Switching between JDK versions is not comfortable. So I was wondering if there is any easy way to change it? I found 2 ways, which should solve this problem, but it doesn’t work. First solution is creating a bat files like this: And after running this bat,

Setting JAVA_HOME

I’m having a problem when running programs that use Java from the command line. I get back a message saying Java.exe could not be found. I’ve followed the instructions found in several places for setting JAVA_HOME in Windows 7. As can be seen in the image I’m pointing to the JDK folder as instructed, I’ve also tried several variations including

how to start stop tomcat server using CMD?

I set the path for the tomcat and set all variables like JAVA_HOME=C:Program Files (x86)Javajdk1.6.0_22 CATALINA_HOME=G:springworkserverapache-tomcat-6.0.29 CLASSPATH=G:springworkserverapache-tomcat-6.0.29libservlet-api.jar;G:springworkserverapache-tomcat-6.0.29libjsp-api.jar;.; When I go to bin folder and double click on startup.bat then my tomcat starts and when I double click on shutdown.bat tomcat stops. But I want using CMD start and stop the tomcat. And in any folder I write command startup.bat the

How do I set environment variables from Java?

How do I set environment variables from Java? I see that I can do this for subprocesses using ProcessBuilder. I have several subprocesses to start, though, so I’d rather modify the current process’s environment and let the subprocesses inherit it. There’s a System.getenv(String) for getting a single environment variable. I can also get a Map of the complete set of

Advertisement