B4J Question Compiled program won't start

oldeast

Active Member
Licensed User
Longtime User
I am running the B4j packager with the IDE and get no errors. On Win 10, the program seems to install but there is no .."program installed " message at completion. The program shortcut appears but the program won't run. The jar file runs ok too.
The project uses an SQLite database and I move that to a readable location. I tried renaming the program and restarting win after install .. anyone have any suggestions where to start looking...
thanks...
 

oldeast

Active Member
Licensed User
Longtime User
Works fine on my win 10, so I asked a friend to try it on another Win10 machine but it won't install on that system...he tried install and run as admin, checked the uploaded file by downloading and reinstalling on my sys with no problems, the install includes java runtime right so there should not be anything else needed?

Thanks
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
so I asked a friend to try it on another Win10 machine but it won't install on that system
Did he get any error message?

You still haven't fixed the paths issue:

SS-2016-12-20_08.47.00.png
 
Upvote 0

oldeast

Active Member
Licensed User
Longtime User
I did change the code for the file copy ...

I uninstalled the program and deleted File.DirApp folder
I checked that the database was in the objects (File.DirApp) folder.
After installation and the first execution, the folder File.DirData("CMS") is created but the database is not copied, it is copied using .jar

B4X:
Public Sub DBFilePath
    'check if Db already created
        If File.Exists(File.DirData("CMS"),"cms.db3") =False Then
    File.Copy(File.DirApp,"cms.db3",File.DirData("CMS"),"cms.db3")
    End If
End Sub
 
Last edited:
Upvote 0

oldeast

Active Member
Licensed User
Longtime User
cms.db3 is in the CMS/Objects folder...its not copied when the .exe runs the first time
 

Attachments

  • folder.jpg
    folder.jpg
    18.1 KB · Views: 189
  • debug.jpg
    debug.jpg
    71.7 KB · Views: 207
Last edited:
Upvote 0

oldeast

Active Member
Licensed User
Longtime User
sorry Erel, I completely misunderstood, apologies.

I was using basing my code on the dbutils example...

File.MakeDir(File.DirApp, "data")
SQL1.InitializeSQLite(File.DirApp, "data/1.db", True)

also a post from Aug 10 2016
The file.DirApp is read only
You're right but you can create a sub dir in DirApp and write there:
Code:
Dim MySubDir AsString = File.Combine(File.DirApp, "SubDir")
IfNot(File.Exists(MySubDir, "")) Then
File.MakeDir(MySubDir, "")
End If

So I have to create the db in file.dirdata if Iwant to compile the program.
Graham
 
Last edited:
Upvote 0
Top