B4J Question Problem with B4J 8.30 Beta Built-in packager

GuyBooth

Active Member
Licensed User
Longtime User
I ran this with my project, and in the simplest mode it worked the first time I ran it.
I then added an instruction to write the resulting exe to a different folder, and received an "access denied" error.
I then removed this instruction - to go back to the original simplest mode and now get these errors:
B4X:
B4JPackager11 Version 1.20
Exe name: DesktopMusicMachine.exe
InputJar: C:\Local B4X\B4J Desktop Music Machine\Objects\DesktopMusicMachine.jar
main$ResumableSub_PrepareFolders.resume (java line: 1213)
java.io.FileNotFoundException: C:\LOCALB~1\B4JDES~1\Objects\temp\FindDosPath.exe (Access is denied)
    at java.base/java.io.FileOutputStream.open0(Native Method)
    at java.base/java.io.FileOutputStream.open(FileOutputStream.java:291)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:234)
    at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:439)
    at anywheresoftware.b4a.objects.streams.File.Copy(File.java:337)
    at b4j.example.main$ResumableSub_PrepareFolders.resume(main.java:1213)
    at b4j.example.main._preparefolders(main.java:1047)
    at b4j.example.main$ResumableSub_Start.resume(main.java:1518)
    at b4j.example.main._start(main.java:1497)
    at b4j.example.main._appstart(main.java:125)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
    at b4j.example.main.main(main.java:28)
I did recompile before running this last attempt. The complete path is C:\Local B4X\B4J Desktop Music Machine
 

GuyBooth

Active Member
Licensed User
Longtime User
I deleted it.
I ran the Build Standalone Package again, and received the same error, which seems to indicate it is looking for an exe called FindDosPath.exe.
When I look in the temp folder, the only file is jar.jar
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
This file is copied from the packager to the temp folder.
It is probably your anti-virus fault. Try to disable it.
I am using BitDefender.
It does appear to be associated with BitDefender, but even when I turn off the protection the problem persists.
I have tracked the following sequence:
  1. Compile the app
  2. Run the Build Standalone Package
  3. These first two steps can be run multiple times as long as the next steps are NOT taken
  4. Run the EXE created by the Standalone Package from where it has been created in ...\temp\build
  5. As soon as the exe has been run, Bitdefender identifies it as a threat and puts it in quarantine.
  6. Restore the files identified - including the exe and FindDosPath.exe. This puts the files into Bitdefender's exception list.
  7. From this point on, nothing I have done will allow me to rebuild the exe in this location, including disabling Bitdefender and the Windows Firewall.
  8. Change any name in the file path for the application
  9. Go to Step 1 and repeat.
I'm at a loss as to how to overcome this problem.

[Added] Well almost. If I copy the build files to a totally different folder BEFORE I run the exe that was created, and run it in the new location,
  1. Bitdefender identifies it as a threat.
  2. I restore it, and Bitdefender marks it as an exception.
  3. I can now run it from its new location without problems
  4. I can rebuild it in the B4J folder structure without problems.
I just have to make sure I never run it from the temps\build location under the B4J application folder structure.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…