'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
#AdditionalJar: mp3transform
Sub Process_Globals
End Sub
'https://code.google.com/archive/p/mp3transform/downloads
Sub AppStart (Args() As String)
File.Copy(File.DirAssets,"01-Billet Doux.mp3",File.DirApp,"01-Billet Doux.mp3")
Dim Player As Reflector
Player.Target = Player.CreateObject("org.mp3transform.awt.PlayerNoCover")
Dim jFile As JavaObject
jFile.InitializeNewInstance("java.io.File",Array(File.DirApp,"yoursongfile.mp3"))
Player.RunMethod4("run",Array(Array As String("")),Array As String("[Ljava.lang.String;"))
Dim FrameR As Reflector
FrameR.Target = Player.GetField("frame")
FrameR.RunMethod2("setVisible",False,"java.lang.boolean")
Player.RunMethod4("play",Array(jFile),Array As String("java.io.File"))
StartMessageLoop
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub