Machine learning-based software is vital for future Internet of Things (IoT) applications and Connected and Autonomous Vehicles (CAVs) as it provides the core value of these services by leveraging the enormous amount of data collected on the edge. These services utilize various machine learning models which make it computationally intensive on the edges. There has been a lot of work to make the hardware efficient. No matter how efficient is the hardware, an inefficient machine learning model can account for high energy consumption and overheating problem. However, there are very few tools available that can help software developers or researchers to make the machine learning models energy efficient.Our main contributions of this paper are two-fold: First, we summarize the state-of-the-art techniques about energy-efficient machine learning on the edges. Second, targeting specific Java programming language, we present an Eclipse plugin named Java Energy Profiler & Optimizer (JEPO) which can help in profiling and optimizing machine learning source code written in Java. JEPO can automatically measure the energy consumption of source code at method granularity. It provides energy efficiency suggestions for data types, operators, control statements, String, exception, objects, and Arrays in Java. JEPO evaluation has shown up to 14.46% improvement in energy consumption when used to optimize the machine learning software WEKA with only 0.48% drop in accuracy.