1

I want to run uiautomatorviewer from command Prompt.

But it gives an error:

-Djava.ext.dirs=..\lib\x86_64;..\lib is not supported. Use -classpath instead. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Please guide.

Al Imran
  • 882
  • 7
  • 29
  • 1
    have you set the environment variables for android home or not ? – Amit Jain Apr 30 '19 at 12:02
  • Can you share the command you are running? – Sushant Somani May 03 '19 at 04:21
  • I have the same problem. Typing cmd from C:\Users\ME\AppData\Local\Android\Sdk\tools\bin , then uiautomatorviewer.bat in the command line window. My JAVA_HOME = C:\Program Files\Java\jdk-13.0.1 and JRE_HOME = C:\Program Files\Java\jre1.8.0_231 . – Adamantus Oct 20 '19 at 15:56

1 Answers1

0
  1. Download JDK 8 version & install it
  2. Set Environment variable as [JAVA_HOME : C:\Program Files\Java\jdk1.8.0_65]
  3. Path = %JAVA_HOME%\bin & %JAVA_HOME%\lib and provide uiautomatorviewer.bat command in cmd

The above scenario will work.

David Buck
  • 3,752
  • 35
  • 31
  • 35