Welcome to the Appium tutorial for beginners! We will start of with Java as a first step. We will also talk about using the command line gitbash to find out some details about your system. I hope I clear some of the questions you had on Appium and Java installation on Windows 11

Appium tutorial for beginners appium logo purple, aqua, and light blue

First things, first:

Alright, on a Windows 11, this is what you do. Download and install GitBash – my personal favorite 😍

Mobile applications

Types of mobile applications

1 / 1

What are the types of mobile applications?  Select all that apply

appium logo all purple

Your score is

The average score is 40%

0%

Reasons to use gitbash:

This is faster and more productive as you will find out later.

Check for the Java version:

Before we take the dreaded step. Let us check for the following:

Install Java 21:

Wait… or is it already installed ? How do we know ? 🤔

Open GitBash and type:

java -version

This should give an output similar to:

It looks like java 1.8 is installed on the computer, but no worries. I am going to remove it and use Java 21.

End the confusion:

For beginners, multiple java installations can be managed, but it can be confusing. So let us go with one Java version. Incidentally, there is no need to download the jre separately for Java 21. Just the JDK 21 should be enough.

If you would like to know where the java executable is you need to type:

which java

Hit enter, and it will show you the path where java executable is installed. It also shows the man pages for java etc.

A small exercise for Mac users:

Open the terminal app. In addition to the java -version, and which java. Try to use whereis java and see what these different commands have to say.

Here is a video on the which command

In case you get an output saying

whereis not found

whereis command. I use the package manager scoop on GitBash to install it on the system. For more details on scoop, please click here.

For mac users, one of the package managers you can try is homebrew.

Environment and Path variables for Java

If you see an error message like java is not recognized etc. It means Java is not installed on the system, or the system does not know where to find it. You need to set path and environment variables for this. If you have not installed Java, you need to download and install Java development Kit (JDK) from here

Let us suppose you downloaded it to: C:\Users\username\ 📂

unzip the file and rename it to java-21, if necessary. (Tip select a pathname that does not have gaps in them ex: C:\Program Files\java 📂

This java-21 folder should have a sub-folder called bin 📂

The bin sub-folder should have an application 📂

In case you installed Java now, go to Control Panel->System properties->Advanced of your Windows Machine. Go to the section Startup and recovery Click on the button, Edit Environment Variables

Create a new System variable, under variable name enter JAVA_HOME. Under variable value, enter the full path C:\Users\username\java-21\bin\java You can also browse for the path where java is installed

To confirm, go to the GitBash terminal and enter

echo $JAVA_HOME

Hit enter and you should see

C:\Users\username\java-21\bin\java

Done:

Phew! we are done with the Java part, and GitBash for now. Mac users can also use these commands.

Feedback:

Alright, calling all mac, linux and Windows users what was your experience with the installation process? Please comment

One Response

Leave a Reply

Discover more from Test Pulse

Subscribe now to keep reading and get access to the full archive.

Continue reading