Oracle Enterprise Manager EMCLI on Mac OS X

EMCLI is not certified or supported on Mac OS X, but I wondered if it is possible to run on my new macbook. I searched metalink, googled and couldn’t found any useful information. I thought it should be easy because EMCLI is a java application certified to run almost all enterprise operating systems including HP-UX, AIX, Linux, Windows, Solaris, and we all remember “write once, run everywhere” slogan of Java. Unfortunately it wasn’t as easy as I expected 🙂

I have downloaded emclikit.jar from my Enterprise Manager web console, and tried to install it. Here’s the output:

UnsupportedOperationException? What kind of unsupported operation could it be? For a Java application which its primary duty is to communicate with a web service, this error was surprising for me.

As you can see from the error stack, the exception was thrown in getFiles method. So I though there could be something about permissions of the files, or maybe something about how java access to folders. After some hours of debugging, I found that this exception was thrown intentionally when the emcli installer detects an unsupported operating system. So we hit an artificial barrier which is put there by the developer.

Is it possible to tell emcli installer that we use a supported OS (ie Linux)? Not always, but most Java developers uses system property called “” to detect the operating system, and our emcli developer also uses this method. We can add “” parameter to fake the installer:

I like these kind of challenges 😉 It didn’t work because the jar file, calls another jaf file so our parameter doesn’t affect to the method. We need to change permanently for our terminal session. The JAVA_TOOL_OPTIONS environment variable helps us to do it:

Hurray! We beat the detection. Have you noticed that two “Picked up JAVA_TOOLS_OPTIONS”? This is why the parameter “” didn’t work. Anyway, because we have successfully installed the emcli, let’s run it:

I use Java 1.8.x, so why does it say that it requires version 1.6 or greater? After examining the emcli script, I see that the developer finds the java version by running “java -version” and parsing the output. Unfortunately our output has an extra line:

The JAVA_TOOL_OPTIONS variable already served us well. We have installed the emcli, so I unset that variable, and include “” into emcli script itself. Search for exec “$JAVA_PROGRAM” line in the file. You’ll find two. One for windows, one for Unix. You can easily understand it by reading the comment lines. Then add “” after -DoracleHome=”$OracleHome”:

After this change, I have successfully issued the following commands:

Everything looks OK! I haven’t tested all EMCLI verbs but for now it seems it works successfully. I also installed emcliadvancedkit (the one supporting Jpython scripting) with same method. Let me know if you encounter any problems. Of course, this is an unsupported and non-certified installation and you shouldn’t rely on it, and use it on production systems.

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.


  1. Roland Evers

    Hi Gokhan,

    Nice article! I wonder if create_plugin and validate_plugin steps would work though, as there are a couple of .sh or .bat scripts being triggered in the background.

    Still nice to see this though!

    Kind regards,


  2. Here we are 3 years later, and still no support for emcli on Mac OS. I use MacOS for all my testing needs (with brew). I don’t plan on running this for production scripting, but I shouldn’t need a Linux or Windows box to test out some scripting. Very insightful and is getting me up and running with the 13.2 emcli

  3. Sourabh

    Hello Gokhan Atil,

    I am getting an error when I followed these steps for emcli installation on mac

    user@user-mac emcliadvanced % ./emcli setup -url=https:///em -username=user -trustall
    Oracle Enterprise Manager 13c Release 3.
    Copyright (c) 1996, 2018 Oracle Corporation and/or its affiliates. All rights reserved.

    Enter password

    Error: Some required configuration is missing, corrupt, inaccessible, or insecure (access permissions are too liberal).

    When I checked the .emcli.log file it has the following error

    user@user-mac .emcli % cat .emcli.log
    Aug 29, 2021 7:07:51 PM oracle.sysman.emCLI.verb.SetupVerb execute
    SEVERE: java.lang.ClassNotFoundException: sun/nio/fs/LinuxFileSystemProvider
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getConnection(
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPageInternal(
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPageCommon(
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPage(
    at oracle.sysman.emCLI.verb.LogoutVerb.doLogout(
    at oracle.sysman.emCLI.verb.SetupVerb.execute(
    at oracle.sysman.emSDK.emCLI.CLIController.execute(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at oracle.sysman.emCLI.StandAloneLaunchHandler.invoke(
    at oracle.sysman.emCLI.StandAloneLaunchHandler.launch(
    at oracle.sysman.emSDK.emCLI.CLIController.launch(
    at oracle.sysman.emSDK.emCLI.CLIController.main(

    Could you please help..

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.