Wednesday, August 30, 2017

Maven Error: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Have you came across below Maven error while running maven install or build command through Eclipse.


The error states that : No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

This error message clearly tells us two things:
  • "No compiler is provided in this environment.": While running maven install or build command for our project, it couldn't detect the required compiler due to some missing/incorrect Eclipse configuration. 
  • "Perhaps you are running on a JRE rather than a JDK?": It states the probable root cause of the issue i.e maybe JRE is added to the build path of the newly created java project. 

This article is a How To Guide to show the steps with screenshots to fix the above issue.

Sunday, August 6, 2017

How To Install kubectl (Kubernetes command-line tool) using Chocolatey

kubectl stands for Kubernetes command-line tool, used for running commands against Kubernetes clusters. In this article, we would discuss how to install kubectl in Windows system using Chocolatey, a Windows package manger. Install Chocolatey if you don't have it in your system.

Install kubectl using Chocolatey



C:\Windows\system32>choco install kubernetes-cli

Verify Your kubctl Installation


C:\Windows\system32>kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.2", 
GitCommit:"922a86cfcd65915a9b2f69f3f193b8907d741d9c", GitTreeState:"clean", 
BuildDate:"2017-07-21T08:23:22Z", GoVersion:"go1.8.3", Compiler:"gc", 
Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: 
No connection could be made because the target machine actively refused it.
C:\Windows\system32>

Thank you for reading this article. Now you have kubectl in your system to deploy and manage application in Kubernetes and also manage the different Kubernetes resources. Happy Learning!!

Saturday, August 5, 2017

6 Useful Chocolatey Command for Windows Package Management With Examples

In the our previous posts, we have discussed What, Why & How (installation) of Chocolatey, a windows package manger. In this article, we would see Chocolatey in action i.e. different Chocolatey commands with examples.

Although we would discuss the basic Chocolatey commands here, one can easily find more details regarding Chocolatey commands, How To Pass Options / Switches and Default Options and Switches by simply hitting the choco -? command in their command prompt.

Chocolatey Commands

choco list                        // lists remote or local packages
choco search [package_name]      //searches remote or local packages
choco info [package_name]        // retrieves package information 
choco install [package_name]     // installs packages from various sources
choco uninstall [package_name]   // uninstalls a package
choco upgrade [package_name]     // upgrades packages from various sources
choco outdated                  //retrieves packages that are outdated

Chocolatey Installation

In our previous post, we had a discussion regarding What & Why of Chocolatey, a windows package manger. In this article, we would discuss how will we get Chocolatey!😀

System Requirements

  • Windows 7+ / Windows Server 2003+
  • PowerShell v2+
  • .NET Framework 4+

 

Install Chocolatey (Let's get Chocolatey 😀)

  1. Open the Command Prompt as administrator
    Click on the Start button >> Type "cmd" in search bar >> Right-click on the cmd.exe and choose "Run as administrator". Now Command Prompt window would open with C:\Windows\system32>
  2. Copy the below text to your command prompt and hit enter
    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    
  3. If No errors in your command prompt then you are ready to use Chocolatey

Verify Your Installation

choco or choco -? 

C:\Windows\system32>choco
Chocolatey v0.10.7
Please run 'choco -?' or 'choco  -?' for help menu.

 Thank you for reading this article. Now you have Chocolatey  in your system! In the next article of this series, we would see how easily one can install/search/ list/upgrade software packages in Windows system using Chocolatey!  Happy Learning!!

Chocolatey: A delightful Windows package manager

If you have worked with Linux based systems then you already know how easily one can install, uninstall, search and update the software packages using package manager utility like apt-get, dpkg, rpm, yum, etc. But can you vouch the same thing for Windows system? Does Windows system provides any similar utility for managing the software application. The answer would be NO. 

Question to the Windows user: Do you really like the traditional way (easy but time & effort taking) of installing, uninstalling, searching and upgrading the software application that generally involves below steps:
  • Search the desired version of software from internet 
  • Download the respective exe or MSI file (wait until it gets downloaded)
  • Install it manually i.e. click, click, click our way through the installation. If we are upgrading /downgrading the software version then uninstall the earlier version
  • Now follow the same process for EVERY piece of software that we want in our system.
In this article, we would discuss the solution of this problem. Now we have Chocolatey at our disposal that takes away all the pain of manually installing/uninstalling/searching/listing and upgrading the software packages in the Windows systems.