There are many libraries for calling java code from python and there are many articles that try to provide a preview on their syntax. I’ve worked with JPype and Javabridge which seems to be two of the more famous ones. While JPype is by far more use friendly that javabridge I have personally had problems with it when trying to add some jar files to the class path. Especially if the jar file is packaged by maven or the project’s structure …
Category: Java
The Problem So recently I posted the following blog post explaining my approach to determining of an value is instance of a custom class. I also posted a reddit question asking if my solution made sense and whether I was missing some cases. This had become a hard thing to do since it Python pretty much everything is an object and is an instance of a class. It was even harder in Python 3x. At least in Python 2.7 you could check type of …
I’m currently working on a project for which I need to read the CPU usage by applications. There are question and answers on this topic but I could’t find any tutorials on it so I decided to write one. Basically, there are many things that you can’t do using the Java api, but, with a quick tweak you can. In order to read cpu usage of applications you will need to run a bash command on the device. Java Runtime class provides this feature …