1 The forecast error is related to sample size (in your case 18, which is very small), and the true underlying model (is the model you used to generate the data an ARIMA model?) It is helpful that you can provide the true underlying model and its parameters, and also the estimated parameters. If the parameter are not estimated accurately, the forecast will naturally be far way from real.
2 This is an open question, there is no standard answer. One way to determine the order is to check the PACF and ACF of the series. Here is a good explanation: http://people.duke.edu/~rnau/411arim2.htm.
3 Please refer to the javadoc of the meaning of forecast.var. The var term here is not |real – forecast|. You should know this from your program. You did not pass the real value (2.78) to the model “arima” or the forecaster “forecast”, therefore |real – forecasst| cannot be computed.