Other How execute java application from b4j by command line from dos.

Status
Not open for further replies.

netsistemas

Active Member
Licensed User
Longtime User
I have a little application with no windows interface.
Only connect with a webservice and send a message (https://fcm.googleapis.com/fcm/send)

How execute this mini soft from cmd.

This is part of my code to send a message from java (it is irrelevant for this message)

B4X:
Private Sub SendMessage(Topic As String, Title As String, Body As String)
    Dim Job As HttpJob
    Job.Initialize("fcm", Me)
    'Dim m As Map = CreateMap("to": $"/topics/${Topic}"$)
    Dim m As Map = CreateMap("to": $"/topics/${Topic}"$, "priority": "high")
    
    Dim data As Map = CreateMap("title": Title, "body": Body)
    m.Put("data", data)
    
    
    Dim jg As JSONGenerator
    jg.Initialize(m)
    Job.PostString("https://fcm.googleapis.com/fcm/send", jg.ToString)
    Job.GetRequest.SetContentType("application/json")
    Job.GetRequest.SetHeader("Authorization", "key=" & API_KEY)
End Sub
 

netsistemas

Active Member
Licensed User
Longtime User
Sorry, mi question is more easy.
I'm reading mi post, are as ambiguios. True

I am referring to an application made with Basic4Java. How to run it outside the IDE? Sure it's obvious .

----
i think that a need this:

but when i download de las b4j es 8.1 version, and in the post, you talk about 8.3 and the new feature for generate EXE.
 
Last edited:
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…