How To Run Batch File Using Jenkins

denotes ant’s property task, which do have some other attribute e. How to test your Java Application using PMD, and Jenkins July 30, 2015 1 min read In the previous articles, Previous whilst working on various projects at IDR Solutions I went through the process of how to build your own Java Application with Apache Ant and also how to set up Jenkins. In the Windows the bat file executing the successfully and working fine. Any users with project configuration privilege can list files in the OS with the privilege of the OS user Jenkins run with. cmd file that we have created earlier. To provide you with better understanding on some usages of the Maven Release Plugin, you can take a look into the following examples: Prepare a Release. How can I view (open) binary files such as PDF or images on a Linux or Unix like system from command line? Also, How do I list the files in a directory stored on my Unix box? You can use any one of the following command to view a text file or any other files such as PDF, doc, image, video, music/mp3 and more. Use the page object pattern to create more reusable, easier to interpret test automation scripts Run/execute Robot Framework automated tests in many different ways, including from a command window, batch files, Jenkins, and Windows task scheduler. This information will be especially useful for ones, who want to create a Bash script that will be hosted locally on a one Linux machine but would be executed. The old-school way of looping on early versions of DOS was to use labels and GOTO statements. This video shows step by step process of integration of selenium test case with Jenkins. Running bat files in Jenkins. Then I created a shortcut using -no remote and -p command line arguments so that it would direct me to the specific profile and let me run multiple instances of firefox. How to build on Jenkins and publish artifacts via ssh with Pipelines. Steps are executed in the order that they appear in the bitbucket-pipelines. "echo Have a nice day!" would output "Have a nice day!" in the command window. xml tests from command line. Ant / Maven 4. to run JMeter: Browse to bin/ folder by double-clicking on it, double-click on jmeter. Use the page object pattern to create more reusable, easier to interpret test automation scripts Run/execute Robot Framework automated tests in many different ways, including from a command window, batch files, Jenkins, and Windows task scheduler. I recommend that you always use property in your build. bat," you can type "hope" to execute the batch file. We can turn off echo by including the following line in the beginning of the file. I give the below Jenkins pipeline groovy script: In the init stage, I want to kill the process. To transfer files between the two servers via local workstation. Run a Docker-enabled sample application on an Amazon ECS cluster behind a load balancer. There are many articles on the web explaining UAC and how programs interact with it using manifest files. SSH Via Command Prompt Or Batch File In Windows By Andy in Networking , Software I normally don’t leave all of my computers turned on through-out the night but sometimes turning them all off before I go to bed can be a nuisance. The approach is using the batch file execution from Jenkins This is in continuation to previous video i. If I run this batch file via a build step, it successfully calls the batch file, but the individual steps inside the batch file fail (it just skips over each one). fi allows to make choice based on the success or failure of a command. Mainframe Testing is usually performed on the deployed code using various data combinations set into the input file. The NuGet client tools provide the ability to produce and consume packages. and then in jenkins, provide start-build. By default, you can find it in the /bin directory. bat," you can type "hope" to execute the batch file. Since the batch file and PowerShell script will be in the same folder and have the same name, %~dpn0. Yet, there are ways to utilize some advanced features of WinSCP to achieve the task. And name Java class file as. In jenkins job configuration go to build section, click on the add build step there you can select the "execute the windows batch command " there give the full qualified path of your batch script. This will cause cmake to ask you to enter a value for each value in the cache file for the project. The signature for setup-x86. I recommend that you always use property in your build. We can run this from Eclipse itself. This seems like a very strange assumption for a plugin that will obviously run on multiple platforms. bat batch file. Click Generate Batch File to create a batch file, for example a. 1, there are two different file. xml file and we can handle all test case execution via testng. Drag and drop your. bat - shortcut ->Properties->Shortcut tab -> Advanced and click Run as administrator. The following table describes the optional switches you can use with xcopy and xcopy32 when you run the command in an MS-DOS window: source Specifies the file to copy. Scrip is executing successfully but bat file is not executed, I am using both type as below both are not working. EXIT without an ExitCode acts the same as goto:eof and will not alter the ERRORLEVEL. Subversion Commands and Scripts. xml file using Command Prompt Go to the project workspace, create a lib folder inside the project and paste all the selenium executable jar library files. Name a Jenkins environment variable you have used in a shell script or batch file. war file is present. It is on by default. I want to have a copy of the output of the batch file so I have a record that I can access later of all the files I have copied and when. With help of this plugin you are able to run a command or publish files at any assembling stage (you can see this details. If you run this you will be surprised to find that log. To run a batch file, move to the directory containing the file and type the name of the batch file. This tutorial covers version control with Subversion using the command line interface, GUI clients and scripts which interface Subversion with GUI diff tools. How to test your Java Application using PMD, and Jenkins July 30, 2015 1 min read In the previous articles, Previous whilst working on various projects at IDR Solutions I went through the process of how to build your own Java Application with Apache Ant and also how to set up Jenkins. All forum topics;. RunConfiguration /** * Execute a batch file situated in the KS How to pass exitCode from Katalon to Jenkins in order to. bat file of the remote system on to local system using C#. It may seems a little bit more complex but adds more flexibility to perform Windows - Linux tasks. It looks like the Slave Setup Plugin assumes that it is running sh (or possibly other shells) since -xe are flags for sh not for cmd. cmd -configuration=%DEPLOYCONFIGURATION% -source=%DeploySource% In case your Jenkins server run in unix/ Linux machine use "export" command to set environment variable for windows use "set" command like the below. In the context of batch programming, the environment is exploited for it's ability to store text strings within definable variables known as environment variables as illustrated in the above example, these variables can be used in batch files in much the same way as you would use variables in other programming languages albeit with less freedom. m tomorrow, do the following. If you are using Windows, you should look at Windows Prerequisites to ensure that you are prepared to use Maven on Windows. Then "Add build setup" under "Build" and select "Execute Windows batch Command" Then type "runSelenium. Install Apache Tomcat on Windows 10 7 Setup Java. My Pipeline) and select Multibranch Pipeline. and it will not stop processing even when you close your ssh connection while beeing at 1st screen. I would like to know, how I can use a batch file to firstly, open up the 'Notepad. xml file using Command Prompt Go to the project workspace, create a lib folder inside the project and paste all the selenium executable jar library files. bat files with elevate for example, to get Administrator privileges. How to download, install and use WGET in Windows. Something like, psexec @ If you dont have it on remote machine, you need to copy the batch file and then execute it using,. But what if the Jenkins server is authenticated by username/password ? EDIT: /setcredentials works, but one problem is that I can only use /create, /addfile, /resume, then /complete. If you run Ant as a background process (like ant &) and use the task with spawn set to false, you must provide explicit input to the forked process or Ant will be suspended because it tries to read from the standard input. my Jenkins server is Linux machine and slave node is Windows Server 2012 r2. Using Visual Studio, we can run the vb project once we build that project we will get the output as. Use the page object pattern to create more reusable, easier to interpret test automation scripts Run/execute Robot Framework automated tests in many different ways, including from a command window, batch files, Jenkins, and Windows task scheduler. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. The plugin requires at least one shell script or batch file to be created that can run a Visualworks image with the StoreCI-Polling package loaded. I resolved this problem. Although you can use the % symbol to specify a variable in a batch file, you must type in two % symbols in succession. So now that you have created the batch file you can choose to use this either on Jenkins or use it in your very own Scheduler system to automate it. Other scripts run after an event in order to deploy code, re-establish correct permissions (something git cannot track very well), and so forth. xml) which you are planning to run. exe can be used to verify the validity of this binary using this public key. Save it with Ctrl+Exit then Y. BAT file or any old. bat example are the same. To copy a folder with its content but excluding a specific folder, do the following: Open Start. we have one option that is if we run the jenkins as a service then we can make that to be continuously running. IF will append the following lines (in a batch file) or prompt you for more input (at the command line) until it gets a closing ). awesome !! can you please help me about how to launch slave agent automatically via Launch method "Let Jenkins control this Windows slave as a Windows service" with using admin user credentials. If you are confused about which approach to take, use Ewald’s way of doing this. I use this variable to make fully qualified filepaths to any other files in the same directory as our script. Get a copy of the list of switches [options] for xcopy using this command in a command prompt. If we launch Jenkins using war file through command prompt, we shut it down accidentally. Run batch scripts on a remote server (windows) from jenkins; How to run selenium server in the background using windows batch script in Jenkins? batch file - Running psexec on Windows Server 2008 R2 from Windows 7; windows - Running batch file to git pull from Jenkins slave; windows - Running a batch file from Jenkins hangs and does not return. For Linux and Mac versions of Jenkins it is a sign of failure when a build script exits with non-zero exit code. bat"(sometimes it can be *. This wikiHow teaches you how to run a batch file (. Tools Used : 1. The file is located at ~/. proj) and solution files (. How to run a batch file using a Groovy script How do I run a batch file, using a Groovy Script, from within a test case? 0 Kudos Reply. It's easy to do this for a 'one off' but if you have a list of computers that you want to run this on you can do it by creating a. exe file to the "bin" folder of your Java or JMeter installation you should be in position to run your JMeter test. Windows services don't work that you. Below you can find syntax of this command for various use cases. In jenkins job configuration go to build section, click on the add build step there you can select the "execute the windows batch command " there give the full qualified path of your batch script. bat file in Windows. xml from jenkins, Now we will publish the TestNG results using Jenkins TestNG Plugin. The modern way to loop through files or text uses the FOR command. To do this you’ll register the machines that execute tests with your own server/coordinator, which might or might not be your jenkins machine. You may also double click on your batch file to run it directly. Example, result should be code_gen_text_111. That is what soak testing is for; run load tests or even baseline tests over a long period of time and see how the target environment handles system resources and if it works properly. If you run that sample code in a directory with a lot of contents, a large number of new text files will be created. The runner uses the following command-line arguments: a : Commands the runner to export all generated test results. net; Any reason to favor calling a batch file VS running a CMD directly in A97 VBA?. exe file inside the win32 and win64 folder. To Run a qlikview file I am using batch file it is working fine ,I am using below command in batch file "path\qv. I'm assuming this is down to some permission issue between the user used when I run the file manually and the user used when Jenkins runs it. Step 1 − Go to the Jenkins dashboard and Click on New Item Step 2 − In the next screen, enter the Item name, in this case we have named it Helloworld. Running a batch file is a simple matter of just clicking on it. And at one step I was required to checkout code from source control and build the application. With help of this plugin you are able to run a command or publish files at any assembling stage (you can see this details. Jenkins - Check this post on Installation of Jenkins. I have installed Jenkins ver. I have trouble trying to run a specific test suite with Jenkins. 13 on window 10 64 BIT OS, Now I want to create folder and copy/past file from one source to destination through batch file using "Execute Windows batch command" plugin. exe can be used to verify the validity of this binary using this public key. Execute TestNG Tests in Jenkins | Selenium Easy. Here we are declaring and specifying property ,you can say variable every property has at least two attributes “name” and “value” , though you can define your all properties in a separate properties file and load from there as well. Once the workbook is open, I want to run the procedure called ""MergedFiles"" Thank. The course will briefly demonstrate the use of Jenkins and CSS selectors, so if you’re not familiar with those, please also take the Level 2 course. How to: Send Dos console output to *. jar file, Windows will typically ask what program you want to use to run the program. to execute the file you could use this command : start cmd. Luckily there are a couple easy solutions for fixing this. Using Jenkins to Build and Deploy Python Web Applications – Part 2 by Rom Freiman Jun 08, 2016 In our previous post, How to Deploy with Jenkins: Best Practices we discussed security, backup and other topics. bat /parameter 1 /parameter 2 /parameter 3 /parameter 4" Currently my bat file looks like this:. Download latest checkstyle-8. xml file in different ways. Jenkins writes this command line into a temporary created batch file and executes this batch file with cmd. To add necessary files for Jenkins X, the first thing you need to do is import the project. The command for rebooting your computer is also shutdown. Click on it. Logically speaking, it's a more obvious command to use to reboot your computer, but most people actually use the following command to reboot their computer:. Subversion (SVN) command summary cheat sheet, use, best practices, tips and scripts. Here’s how to redirect console program output to a file: s3. bat Arg1 Arg2 Arg3" which will keep the command shell open afterwards. Steps are executed in the order that they appear in the bitbucket-pipelines. I am using Jenkins 2. Getting Started New to OpenShift? Get your first application up and running and learn the basics. I am thinking there ought to be a way to collect the job parms using Jenkins (“build w/parameters”), then execute a batch file or something as a pre-build step that sets them into the windows environment, which I can then use system. Stop / disable jenkins from windows services 2. Mar 1 st, 2013 Jenkins Job to export Rackspace Cloud DNS Domain As BIND Zone Files; How to use Jenkins to. I use this variable to make fully qualified filepaths to any other files in the same directory as our script. If you have experience please let me know about your configuration! //D. my Jenkins server is Linux machine and slave node is Windows Server 2012 r2. proj) and solution files (. Clean a Release. This isn’t going to be straight forward unfortunately, because the Powershell executable itself doesn’t have any command line parameters to self elevate. Tools Used : 1. SVN checkout using BATCH and PowerShell F ew days back I was working on a script to automate project builds. Sorry to bother you guys but I'm trying to work out how to do 4 simple tasks that I currently manually do. How to lock your computer using command line. When I run build. runing cmd command using jenkins. To run a batch file, move to the directory containing the file and type the name of the batch file. Now here we will look into executing testng. 0 Kudos Reply. 1 I have a build pipeline plugin installed and I want to execute a Windows batch file in it. bat Arg1 Arg2 Arg3" which will keep the command shell open afterwards. Add bat file to jenkins. Jenkins allows to specify pipelines using a Jenkinsfile. txt or the INSTALL_PLUGINS environment variable. By doing this, Java –cp will compile and execute a. If you need to set credentials in a Pipeline for anything other than secret text, usernames and passwords, or secret files - i. cannot capture return code from command line in powershell OR batch GUI-based apps like TestComplete from the command prompt (not from a batch file/script), 1. I am trying to learn PostgreSQL administration and have started learning how to use the psql command line tool. I’ll run you through using some of these formats to compress and decompress files and directories on a Linux machine. Before using this option, use the –dry-run option and do testing to prevent data loss: rsync -a --delete source destination If you wish to exclude certain files or directories located inside a directory you are syncing, you can do so by specifying them in a comma-separated list following the –exclude= option:. exe /c C:\myprj\mybat. bat file from jenkins : Step 1:- In Jenkins, you have an option to create 'New Job' Item, Click on it. If the batch file is present in all machines at same location, then you could mention the list of machines in a text file and give it as an argument to this. dll, LockWorkStation. You can use the PowerShell add-content cmdlet to append data to a text file. Steps Go to the target machine (client Machine or VM machine where your scripts will run) and open command prompt. bat or prpcServiceUtils. To prepare a new batch script, save the file as plain ASCII text with the file extension. The following example illustrates the use of the PATH environment variable within a batch file:. Its a relatively new option and used to specify entry point i. The screenshot below shows what JMeter’s bin/ folder contains. Create a batch file by following the below steps: 1) Open the notepad and type-: Java –cp bin;lib/* org. By using CALL, it will return to the current batch file. How To Execute TestNG Tests Using Jenkins | Software Testing Material Last Updated on August 10, 2017 by Rajkumar 24 Comments In the earlier post, we have seen How To Run TestNG Scripts (testng. Example to execute shell command host -t a google. Invoke-Command allows to execute commands on the remote machine, but your file is on the local machine. But, what if you need to perform additional processing within the same job and you are running that batch processing in PowerShell?. First released as part of the Windows NT 4. A batch task consists of a shell script and a name. Batch files can also be run in a command prompt or the Start-Run line. bat" to run the script. One can use these mechanisms to write specific command processors for dedicated uses, and process external data files which reside in batch files. xml Let us learn how to create a batch file to run testng. General installation notes. Before we get started, Ewald Hofman has an excellent blog post on how to write your own custom activities to do the same thing, which is actually quite a lot more graceful than using a batch file. For targettargs, set your Unit Test's dll file. The freestyle build job is a highly flexible and easy-to-use option. CloudBees Jenkins Enterprise; Resolution. That just seems straightforward. To provide you with better understanding on some usages of the Maven Release Plugin, you can take a look into the following examples: Prepare a Release. bat) and a shell script for Linux and Mac (gradlew. How to execute Selenium Scripts using Jenkins,In this video you will learn how to execute Selenium scripts in Jenkins with the help of job and shell scripts. When setting the Powershell path from a declarative pipeline, one option is to call a batch file from the. awesome !! can you please help me about how to launch slave agent automatically via Launch method "Let Jenkins control this Windows slave as a Windows service" with using admin user credentials. How to schedule RFT (Rational Functional Tester) scripts to run using Jenkins / schedule 1. If you want to automate, you better look into Jenkins or equal tools. Make sure that your SQL batch follows a few rules. This will cause cmake to ask you to enter a value for each value in the cache file for the project. Execute the following command, (change the file path) Add-Content c:\scripts\test. For example, if the batch file is named "hope. This helps in automating things and reducing the. Integrating BDD Cucumber Test Suites in Jenkins in 3 Steps March 25, 2015 2018-08-17T11:32:31+0000 DevOps Behaviour Driven Development improves communication between Developers, Testers and the product owners and over a period of time we end up having a large suite of tests that need to be run very often. You can use up to 100 steps in a pipeline. The "goto" command. Using Jenkins built-in "Execute shell" you can run commands using unix shell. sh script and pass parameters to import or export the RAP:. If you are confused about which approach to take, use Ewald’s way of doing this. How to compress a folder from command prompt? As we know, there is an option in Sent To -> Compressed (zipped) folder. If you are interested in contributing your own example, please consult the README in the repository. But my problem here with the running the same code through Jenkins in client machines. exe file to the "bin" folder of your Java or JMeter installation you should be in position to run your JMeter test. I'm not proficient in scripting and haven't found a solution online. we start having Unity Pro license problems with Jenkins recently. Click Save. psexec \\10. By default echo is turned on for any batch file. Run a vb script from PowerShell: PS C:\> cscript c:\batch\demo. If this is successful then the problem is most likely with the batch file itself. This code create a file called C:\@IT\Batch\day. bat file: @echo on docker e…. In command line, type DTEXECUI. Our project is running in VB6 technology, we want a batch file which will run all of our VB6 projects at a short and needs to give us the output files. If we launch Jenkins using war file through command prompt, we shut it down accidentally. Although you can use the % symbol to specify a variable in a batch file, you must type in two % symbols in succession. Batch is kind of hard to maintain and monitor. Now open a batch file with block code which needs to be executed every day. CloudBees Jenkins Enterprise; Resolution. INI file stored on a network share which needs to be included when run, however that parameter does not get passed through correctly and EXE fails to open. TestNG testng. and then in jenkins, provide start-build. For example, find out if file exists (true condition) or not (false condition) and take action based on a condition result. The Mainframe application (otherwise called job batch) is tested against the test cases developed using requirements. To add a line to a batch file and to keep it from being displayed when the batch file is run, you must first turn the ECHO feature off. How to Use Global System Environment Variables in Windows Jason Faulkner November 16, 2010, 4:00pm EDT Any system administrator who spends a good bit of time in the command prompt or batch scripts is probably well aware of built in environment variables Windows offers (i. Any users with project configuration privilege can list files in the OS with the privilege of the OS user Jenkins run with. Hi I wondering if/how I can configure jenkins to execute Autoit scripts. So far it seems the best way would be to make a batch file to run the program as a different user and then set the keyboard shortcut to that batch command. This seems like a very strange assumption for a plugin that will obviously run on multiple platforms. Run batch scripts on a remote server (windows) from jenkins; How to run selenium server in the background using windows batch script in Jenkins? batch file - Running psexec on Windows Server 2008 R2 from Windows 7; windows - Running batch file to git pull from Jenkins slave; windows - Running a batch file from Jenkins hangs and does not return. The javac command in Java compiles a program from a command prompt. Dealing with automation, don’t you want your test cases to run automatically without you having to lift a finger?. To transfer files between the two servers via local workstation. I also prefer using ^ as the sed separator rather than /. A Complete Guide To Tomcat Start-Up Manual, Automatic, and Remote At first glance, starting up the Tomcat Server is a simple task. Note, it is probably a good idea to help others understand what is going on by using a descriptive GOTO label name. Countless functions and modules, helping to automate this or fix that or make your teams lives easier. Ever had that terrifying feeling you’ve lost vital assets from your website? Perhaps you need to move to a new web host and there’s some work to do to download and back up files like images or CSV files. The first thing that httpd does when it is invoked is to locate and read the configuration file httpd. In the script you can add shell commands and the scp instructions you want. The batch job runs as a non-interactive process. Use the below command to run the tests. Create a batch file by following the below steps: 1) Open the notepad and type-: Java –cp bin;lib/* org. A batch file can be run by simply double clicking in Windows explorer, or by typing the name/path at the command line, optionally passing any parameters needed. Creating a Project. bat with following lines SET JENKINS_HOME=C:\Program Files (x86)\Jenkins. Batch files can also be run in a command prompt or the Start-Run line. Subversion Commands and Scripts. Executing a command as a batch job using at. TestNG testng. And since Jenkins is starting the script from outside unity, I have no clue if the script is running correctly, or if my code in the script is coded wrong. I'm not proficient in scripting and haven't found a solution online. bat," you can type "hope" to execute the batch file. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. There are other ways to obscure the password in a batch file, /savecred is cut and dry the user can run anything they want without even knowing anything just click use saved credentials. Yes I have used "exec" but my problem did not solved yet. jar file (ready-api-license-manager-1. I am trying to execute a batch file to copy my files to another server under the "Execute batch or shell script" option of the "PostBuildScript" plugin of Jenkins. Now here we will see how to invoke batch file with Jenkins. Batch files can also be run in a command prompt or the Start-Run line. I am trying to learn PostgreSQL administration and have started learning how to use the psql command line tool. Search for Command Prompt, right-click the result and select the Run as administrator option. This plugin integrates Jenkins with Cincom Visualworks Smalltalk Store. When installing packages for the first time, setup*. Install Jenkins Plugins. In this article I will tell you how to run C and C++ program in CMD. Yet, there are ways to utilize some advanced features of WinSCP to achieve the task. Manage code throughout the lifecycle using Jenkins plugins. It may seems a little bit more complex but adds more flexibility to perform Windows - Linux tasks. TestNG testng. I’m not sure what you mean with “in the parameters option”. This command is similar to the Linux cp command, but it does not match with the full functionality of cp. EXIT without an ExitCode acts the same as goto:eof and will not alter the ERRORLEVEL. Hey everyone, this is a very simple tutorial which shows you how to execute. Select all the files and folders inside the compressed file. bat'); is above command is right to execute batch using JAVA API in Integrity server. Using the Execute Package Utility (DTEXECUI. We’ll also add a further level of diversity to our file system. Running Commands on Your Linux Instance at Launch. cmd will be “HelloWorld. Ant / Maven 4. Please read this post first to get a high level idea of basic QTP/UFT + Jenkins integration. This command is similar to the Linux cp command, but it does not match with the full functionality of cp. We can run this from Eclipse itself. Then open command prompt (typing “cmd” in run dialog box opens up the command prompt) and type your file name along with the extension to run it. In jenkins job configuration go to build section, click on the add build step there you can select the "execute the windows batch command " there give the full qualified path of your batch script. How To Execute TestNG Tests Using Jenkins | Software Testing Material Last Updated on August 10, 2017 by Rajkumar 24 Comments In the earlier post, we have seen How To Run TestNG Scripts (testng. Create a batch file and run the Jenkins job. For example, you must type for /L %%n IN (1,1,10) DO @ECHO %%n to tell the batch file to interpret the command as for /L %n IN (1 1 10) DO @ECHO %n. XMLReporter. Basic Solution to batch unlock multiple files The first post above by mason. *I want to know how to inplement batch file in Jenkins. If your organization uses Jenkins software in a CI/CD pipeline, you can add Automation as a post-build step to pre-install application releases into Amazon Machines Images (AMIs). Main-Class attribute in JAR's manifest file. The batch file should execute in a new command window and not on jenkins console output. On a click of a button it will create a batch file and run it. This target never starts. Then "Add build setup" under "Build" and select "Execute Windows batch Command" Then type "runSelenium. To run batch file continuously(bat file or Maven) 2. HOST Example. I give the below Jenkins pipeline groovy script: In the init stage, I want to kill the process. I need to schedule a daily merging of files using the windows task scheduler. In my case of using Jenkins as CI/CD server, I translate the above steps into pipeline script. To create new job in jenkins, click on create new jobs, enter an item name, select Freestyle project, and enter. Learn how to run your batch script or command in background where the command prompt window is not visible. To make this work, you need to set your %PATH% environment variable to include the directory of your Python distribution, delimited by a semicolon from other entries. bat or testrunner. How To install java in windows 7 8 10; Set java path variables.