B4J Question B4JPackager- Not listed in StartMenu, needs Administrator

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

I have created my first installer and it does install but..
1. The program is not shown in the StartMenu
2. Starting the exe file directly requires that it be run as Administrator.

I am assuming that this isn't the way it should work. I found this issue raised in the Tutorial but did not find a solution.

Any suggestions?

Regards Roger

PS In the Packager input there are two fields, Name and Title. Which applies to what?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
1. See this post: https://www.b4x.com/android/forum/t...contained-installers.56854/page-2#post-359572

2. Are you referring to the installer executable?



The parameters are documented here: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html#BGBIJBHF
It only says that name is the application name and title is the application title.

Erel,

1. Are you refering to Roycefers sugestion of using a 32-bit JDK?

2. Yes.
The installer is built sucessfully.
The installer installs MyApp.exe in program files.
The App is not listed in Start/AllApps
When I try to execute the directly it will only run if run as administrator.

Regards Roger
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Sorry Erel,


I have no idea what this means or where args.AddAll exists.

Try this for the menu name. Add the following line after the args.AddAll line:
Code:

args.AddAll(Array("-BmenuHint=true", "-Bwin.menuGroup=Test"))


Regards Roger
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Erel,

The code is indeed simple and so may be I.

In what screen should I be when I press Ctrl + F?
Not this one.
Not the B4J source code.
Not the B4JPackager.
As I said, I have no idea where args.AddAll exists.

Regards Roger
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
If you load the B4JPackager into the IDE , the lines you are looking for are 130 - 138 (assuming you haven't edited the file).

they start with
B4X:
<line 130>   Dim args As List

and end with
B4X:
<line 138>  End If

Hope this helps you find the code.
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Erel/Daestrum,

I see the comminication issue, I had downloaded the jar, but not the B4JPackager code therefore it was not in the picture.
Downloaded source code, found the relevant line and inserted new code. Easy.

Next problem: Running the B4JPackager code IDE calls for iArchiver library. No problem downloaded zip copied xml file to C:\Program Files\Anywhere Software\B4J\Libraries.
Now IDE calls for jar file, no such file in zip.

Regards Roger

jar.jpg
 
Last edited:
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi Erel

Don't worry about library mix up, it's good to see you are not infallible.
Unfortunately I still have the same situation.

The installer is built sucessfully.
The installer installs MyApp.exe in program files.
The App is not listed in Start/AllApps
When I try to execute the directly it will only run if run as administrator.

I don't know.:(

Regards Roger
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This code adds the menu shortcut:
B4X:
args.AddAll(Array("-BshortcutHint=true", "-BmenuHint=true", "-Bwin.menuGroup=B4J_Example"))

You might need to change the package name if it is already installed on your computer.

Please check it with this example: www.b4x.com/b4j/files/GoogleMapsExample.exe
I've updated it and added the menu.
See whether it fixes the administrator issue as well (after installation).
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Erel,

All seems to be working if I don't use the original name in the B4JPackager. I didn't need to change the Package Name.
I have created several installation files under various names and they all install sucessfuly except when I use the original name.
I can't find any residual files that could be the cause.

I will go with a variation of the original name.

Thanks for all the help.

Regards Roger
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Erel,

Administrator permission was not required with my app. Creating the installer or installing the app.
No joy with GoogleMapsExample, I couldn't install it. Result of trying to run GoogleMapsExample.exe [administrator no ddifferent].
GMapEx.jpg

Regards Roger
 
Upvote 0
Top