Energy consumption time series forcasting
If you just want to get a forecast, use automatic forecasting software like Autobox, ForecastPro, SCA, etc.  


Comparison of different software: https://stats.stackexchange.com/questions/68253/expert-forecasting-software-evaluation
Worked example: http://people.duke.edu/~rnau/autocomp.htm  


If you are doing research on forecasting techniques, there are some Java packages, for example:


JMotif http://code.google.com/p/jmotif/
JTSA http://sourceforge.net/projects/jtsa/


However, Java is not very widely used for this; if you must use Java you will likely have a feeling of being out in the cold.   R and Python would have much more packages, examples, etc.  A tiny sample of what is available in R:


http://www.amazon.com/Introductory-Time-Series-Paul-Cowpertwait/dp/0387886974/
http://a-little-book-of-r-for-time-series.readthedocs.org/en/latest/
http://www.r-bloggers.com/time-series-analysis-and-mining-with-r/