Please try the attached B4J app. It depends on Java 7 (update 6+).
If Java is installed then you should just double click on it and it should run.
It should work on Windows, Mac or Linux.
The code:
B4X:
Sub Process_Globals
Private MainForm As Form
Private fx As JFX
Dim cvs As Canvas
Private smiley As Image
Private Timer1 As Timer
Dim deg, x, y, vx = 10dip, vy = 10dip As Double
Dim size As Double = 40dip
End Sub
Sub AppStart (Form1 As Form)
MainForm = Form1
smiley = fx.LoadImage(File.DirAssets, "smiley.gif")
MainForm.Width = 500dip
MainForm.Height = 700dip
MainForm.MaxHeight = 1000dip
MainForm.MaxWidth = 1000dip
MainForm.Title = "Smiley"
cvs.Initialize("cvs")
MainForm.RootPane.AddNode(cvs, 0, 0, MainForm.Width, MainForm.Height)
MainForm.Icons.Add(smiley)
MainForm.Show
x = MainForm.Width / 2
y = MainForm.Height / 2
Timer1.Initialize("Timer1", 15)
Timer1.Enabled = True
End Sub
Sub MainForm_Resize (Width As Double, Height As Double)
cvs.Width = Width
cvs.Height = Height
End Sub
Sub Timer1_Tick
cvs.ClearRect(x, y, 50dip, 50dip)
If x + size > cvs.Width Then
vx = -Abs(vx)
Else If x < 0 Then
vx = Abs(vx)
End If
If y + size > cvs.Height Then
vy = -Abs(vy)
Else If y < 0 Then
vy = Abs(vy)
End If
x = x + vx
y = y + vy
deg = deg + 1
cvs.DrawImageRotated(smiley, x, y, size, size, deg)
End Sub
Does it work for you???