B4J Question Standalone Server + AdditionalJar?

ilan

Expert
Licensed User
Longtime User
hi

if i need an AdditionalJar in my server when i create a standalone package is it automatically copied to the standalone folder? do i need to do it manually?

this is my Project Attributes:


B4X:
#Region Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
    #AdditionalJar: bcprov-jdk15on-1.57
    #PackagerProperty: AdditionalModuleInfoString = provides org.slf4j.spi.SLF4JServiceProvider with org.eclipse.jetty.logging.JettyLoggingServiceProvider;
    #PackagerProperty: AdditionalModuleInfoString = provides org.eclipse.jetty.io.ssl.ALPNProcessor.Server with org.eclipse.jetty.alpn.java.server.JDK9ServerALPNProcessor;
    #PackagerProperty: AdditionalModuleInfoString = provides org.eclipse.jetty.http.HttpFieldPreEncoder with org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder, org.eclipse.jetty.http.Http1FieldPreEncoder;
    #PackagerProperty: AdditionalModuleInfoString = uses org.eclipse.jetty.util.security.CredentialProvider;
    #PackagerProperty: AdditionalModuleInfoString = uses org.eclipse.jetty.io.ssl.ALPNProcessor.Server;
    #PackagerProperty: IncludedModules = jdk.charsets, jdk.crypto.ec
    #CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, www temp\build\bin\www /E
#End Region


used libraries:

1768983435189.png


is something missing?

thanks
 

ilan

Expert
Licensed User
Longtime User
It is merge to your code.
if i press the result.exe a dos window opens and stay open can i do it in background ? like we did with the non stand alone package?

B4X:
start "MyServer" java\bin\javaw -jar server.jar
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
if i press the result.exe a dos window opens and stay open can i do it in background ? like we did with the non stand alone package?

B4X:
start "MyServer" java\bin\javaw -jar server.jar
Then i think you need to change to "start /B app.exe" or edit the parameter in shortcut.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
"start /B app.exe"
I tried create a standalone exe as it is but the command window still stay opened.

Here is an alternate solution. Create a vbs file like this:
run_in_background.vbs:
Set Shell = CreateObject("WScript.Shell")
Shell.Run "C:\path\to\your\app\server.exe", 0, False
 
Upvote 0
Top