functionality of App class is not working on Windows Server 2012 R2

Asked by Sahil Doshi on 2019-03-26

When I try to run App.listApps() following error is appeared

 [debug] Screen: initScreens: starting
 [debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment()
 [debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
 [debug] Screen: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
 [debug] Screen: Monitor 0: (0, 0) 1440 x 900
 [debug] Screen: initScreens: ending
 [debug] RunTimeINIT: version: 1.1.4-SNAPSHOT build#: 225 (2019-03-07_10:14)
 [debug] RunTimeINIT: global init: entering as: API
 [debug] RunTimeINIT: runningAs: JAR (sikulixapi.jar) in: C:\workspace\SikuliTest\externalJAR
 [debug] RunTimeAPI: global init: leaving
 [debug] RunTimeAPI: initAPI: entering
 [debug] RunTimeAPI: initAPI: leaving
 [13843 debug] RunTimeAPI: addToWindowsSystemPath: added to systempath:
 C:\Users\Administrator\AppData\Roaming\Sikulix\SikulixLibs
 [13844 debug] RunTimeAPI: checkJavaUsrPath: added to ClassLoader.usrPaths
 [13845 debug] RunTimeAPI: libsExport: folder exists: C:\Users\Administrator\AppData\Roaming\Sikulix\SikulixLibs (1.1.4 - 201903071014)
 [13847 debug] RunTimeAPI: loadLib: WinUtil.dll (success)
 Exception in thread "main" java.lang.NullPointerException
  at org.sikuli.natives.WinUtil.getApps(WinUtil.java:426)
  at org.sikuli.script.App.listApps(App.java:387)
  at com.opshub.Test.main(Test.java:78)
 [16925 debug] RunTimeAPI: ***** final cleanup at System.exit() *****

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Sahil Doshi
Solved:
2019-03-26
Last query:
2019-03-26
Last reply:
2019-03-26
RaiMan (raimund-hocke) said : #1

not official API ;-)
... and apparently not working
... and hence not useable :-(

Sahil Doshi (sahil13) said : #2

Any workaround for this?

RaiMan (raimund-hocke) said : #3

no.

use the tasklist command

Sahil Doshi (sahil13) said : #4

Thanks😊

I am marking it as solved