11 Replies Latest reply on Feb 12, 2018 3:08 PM by Gary_A

    How to start FSAL as signed EXE?

    Gary_A

      Recently Frank made a post about using a third party product called launch4j that bundles up a whole bunch of things like icon, etc. in a stand alone executable for run Forms as FSAL.

       

      This thread will hopefully help anyone who would like to implement (such as me!) or have questions about it.

        • 1. Re: How to start FSAL as signed EXE?
          Frank Hoffmann-colognedata

          Gary,

           

          I think this is currently the best way to deploy Oracle Forms 12 on the Client. This deployment does not need a browser, starts on every windows version in 5-10 seconds and can be started in every Environment because it is capsulated (whatever is set in Path, whatever you have as installed as Java Versions, whatever you use as different Proxy Setting etc. has no influence) and has its own error handling.

           

          FH>  comment on 28.3.2018

          FH> The forms demo Server has moved to Oracle Cloud EU-Frankfurt-1. The new address is https://forms-demo.com. Please change the "forms12c.com" links in this thread to the new address if you want to run FSAL against demo Server

          FH> The old adress has only the Webserver running

           

          Here we go...

           

          1.) Get a Program to generate an EXE File from a JAVA Call

          a.) First get the program to wrap a Java StartCall to an EXE, for this example get the Open Source program "launch4j" from here https://sourceforge.net/projects/launch4j

          b) Install it

           

          2.) Prepare an Environment for a FSAL EXE File

          a) Lets make a demo for the forms12c demo server to start demo0001 / example from here https://forms12c.com

          b) Get the necessary files  for this demo from the demoserver (splash Screens, Start Icons, FSAL Windows Jarfile)  https://forms12c.com/frmsal_startup.zip  (Forms 12.2.1.3)

          c) Get an JAVA File Archiv (tar.gz / ZIP File) from Oracle like from here (I use 32 Bit Java 1.8.152): Java SE Runtime Environment 8 - Downloads

          d) Create for three directories:

          c:\oracle\fsal\          (Location for forms12c_demo001.xml and final forms12c_demo001.exe file)
          c:\oracle\fsal\jre\     (Location for a JRE Filesystem)
          c:\oracle\grafiken\   (Location to include application Icon and splash screen as ressources to the exe File - not needed to be downloaded from weblogic)

           

          e) Copy the Java Runtime Filearchiv to the jre directory (all content below jre18xxx:  complete stuff like bin and lib directories)
          f) Copy the Standalonelauncher (here fsal_windows_12213.jar from fsal_startup.zip) to c:\oracle\fsal\jre\bin
          g) Copy the two graphics "forms12c_splash.bmp" and "cd_128.ico" from the zip File fsal_startup.zip to c:\oracle\grafiken\

           

          3.) Use a pre configuration

          You can generate the config file as an XML File. Create forms12c_demo001.xml from this and copy it into c:\oracle\fsal\

           

          <?xml version="1.0" encoding="UTF-8"?>

          <launch4jConfig>

            <dontWrapJar>true</dontWrapJar>

            <headerType>gui</headerType>

            <jar>.\jre\bin\fsal_windows_12213.jar</jar>

            <outfile>C:\ORACLE\fsal\forms12c_demo0001.exe</outfile>

            <errTitle>The Oracle Forms Demo application could not be startet, Java is missing</errTitle>

            <cmdLine>start .\jre\bin\javaw -jar .\jre\bin\fsal_windows_12213.jar -url &quot;https://www.forms12c.com/forms/frmservlet?config=DEMO0001"</cmdLine>

            <chdir>.</chdir>

            <priority>normal</priority>

            <downloadUrl>http://java.com/download</downloadUrl>

            <supportUrl>www.forms12c.com</supportUrl>

            <stayAlive>false</stayAlive>

            <restartOnCrash>false</restartOnCrash>

            <manifest>C:\ORACLE\fsal\forms12c_demo0001.manifest</manifest>

            <icon>..\grafiken\cd_128.ico</icon>

            <jre>

              <path>.\jre</path>

              <bundledJre64Bit>false</bundledJre64Bit>

              <bundledJreAsFallback>false</bundledJreAsFallback>

              <minVersion></minVersion>

              <maxVersion></maxVersion>

              <jdkPreference>jreOnly</jdkPreference>

              <runtimeBits>32</runtimeBits>

              <opt>-Djava.net.useSystemProxies=true</opt>

            </jre>

            <splash>

              <file>..\grafiken\forms12c_splash.bmp</file>

              <waitForWindow>true</waitForWindow>

              <timeout>40</timeout>

              <timeoutErr>true</timeoutErr>

            </splash>

            <versionInfo>

              <fileVersion>1.0.2017.07</fileVersion>

              <txtFileVersion>1.0.2017.07.16</txtFileVersion>

              <fileDescription>Forms12.com demoserver</fileDescription>

              <copyright>Cologne Data GmbH</copyright>

              <productVersion>5.1.2017.07</productVersion>

              <txtProductVersion>5.1.2017.07.16</txtProductVersion>

              <productName>Forms12c.com Webutildemo</productName>

              <companyName>Cologne Data, ORACLE</companyName>

              <internalName>Webutildemo</internalName>

              <originalFilename>forms12c.exe</originalFilename>

              <trademarks>ORACLE,  COLOGNE DATA GMBH</trademarks>

              <language>GERMAN</language>

            </versionInfo>

            <messages>

              <startupErr>Error calling the Forms demo</startupErr>

              <bundledJreErr>Sorry, the Java Runtime Environment is not found as a filesystem where expected</bundledJreErr>

              <jreVersionErr>Wrong Java Version</jreVersionErr>

              <launcherErr>The Runtimeenvironment is corrupted</launcherErr>

              <instanceAlreadyExistsMsg>The Application is already running</instanceAlreadyExistsMsg>

            </messages>

          </launch4jConfig>

           

          Create a manifest file as forms12c_demo0001.manifest in the same directory (c:\oracle\fsal\)

           

          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

          <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

          <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="forms12c_demo0001.exe" type="win32"/>

          <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">

          <security><requestedPrivileges><requestedExecutionLevel level="asInvoker"/></requestedPrivileges></security>

          </trustInfo>

          </assembly>

           

          Start launch4j ... Load the forms12c_demo0001.xml file

           

          fsal1.jpg

           

          fsal2.jpg

           

           

          4) Generate the EXE File by the Generation button

           

          fsal2.jpg

           

          Click the start button .. Forms Demo0001 from Forms12c.com should start with a splash Screen from forms12c_demo0001.exe

           

          fsal4.jpg

           

          5.) Further Suggestions
          ===================

          a) Sign the EXE

          Download a sdk from Windows (example is for windows 7)

          make a batch file to sign the exe File (example from a comodo certificate):

           

          C:\progra~1\micros~2\windows\v7.0\bin\signtool sign /p my_code_sign_password /f my_comodo_code_Signing_certificate.pfx /d "Forms12c_demo0001.exe" /du "http://www.forms12c.com/" /tr http://timestamp.comodoca.com/3141 /v forms12c_demo0001.exe"

          pause

          Hint: This will create a SHA1 certificate, protects the "exe" from Manipulation (the signature will disappear if the exe file is changed) and passes Firewalls and Anti Virus Scanners

           

          Result (example .. passwords and hash key modified):

          C:\oracle\12c\colognedata\codesigning>C:\progra~1\micros~2\windows\v7.0\bin\signtool sign /p xxxxx /f yyyyyy.pfx /d "Forms12c_demo0001.exe" /du "http://www.forms12c.com/" /tr http://timestamp.comodoca.com/3141 /v "forms12c_demo0001.exe"
          The following certificate was selected:
              Issued to: Cologne Data GmbH
              Issued by: COMODO RSA Code Signing CA
              Expires:   Wed Sep 23 00:59:59 2020
              SHA1 hash: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

          Done Adding Additional Store
          Successfully signed and timestamped: forms12c_demo0001.exe

          Number of files successfully Signed: 1
          Number of warnings: 0
          Number of errors: 0

           

          Example if you have no code signing certificate you can get this exe from here:

          https://forms12c.com/forms12c_demo0001.exe

           

          If you start it without a JRE you get an error handling (with a link to forms12c.com) so make sure you have a JRE in the same Directory with the directory Name "jre" with the frmsal_windows_12213.jar in the bin directory:

           

          no jre:

          fsal.jpg

          no frmsal.jar file:

          fsal5.jpg

           

          b) Generate a Windows MSI File to deploy the FSAL Client Installation

          Use a program like Installshield to pack the complete package in one MSI file with a size of 50 MB
          Sign the MSI File like in the first example
          Deploy the package with silent installation (on a fast network in less than 4 seconds)

          It can install the FSAL package (the jre and the FSALlauncher), generate a Desktop Icon and can be deinstalled by the Windows Options under "Forms 12c Demo"

          Possible Problem : Norton might bring up a warning because your MSI might be not very well known

           

          c) Change the network parameter for special local proxy settings

          Change jre\lib\net.properties before or after the deployment to allow local special proxy Settings

           

          Please give me a feedback Gary if it works,

          Frank

          • 2. Re: How to start FSAL as signed EXE?
            Gary_A

            Thank you. I am sure plenty can benefit from this.

            • 3. Re: How to start FSAL as signed EXE?
              Gary_A

              The zip file link does not work. file doesn't exist.

              I used my own .bmp and .ico.

              When I try to build I get manifiest doesn't exist and cannot go further.

              • 4. Re: How to start FSAL as signed EXE?
                Frank Hoffmann-colognedata

                I have corrected the link to the graphics and frmsal.jar file, added the manifest file and modified the XML file to use forms12c_demo0001.manifest

                 

                Please give it another try .. a demo is always as good as it was tested by someone else

                • 5. Re: How to start FSAL as signed EXE?
                  Gary_A

                  Still no good. your relative file paths do not seem to work.

                  It cannot the icon file, so I just hit the folder icon next to Icon and found it, but then:

                   

                  Specify minimum JRE version and/or bundled JRE path.

                   

                  I have modified your instructions to use my frmsal jar file.

                   

                  Also, your command line args are not complete in the attached image. What is the full value you used? I tried to use what is in the target of how I launch my own FSAL.

                   

                  I was able to generate but when running, I get the old generic unhelpful error:

                   

                  an error occurred while starting the application.

                   

                  Error log simply states:

                   

                  Version: 3.10

                  CmdLine: c:\oracle\fsal\forms12c_demo0001.exe --l4j-debug

                  WOW64: yes

                  Working dir: c:\oracle\fsal\.

                  Java min ver: 1.8.0_00

                  Java max ver: 1.9.0_00

                  64-bit search: SOFTWARE\JavaSoft\Java Runtime Environment...

                  Check: SOFTWARE\JavaSoft\Java Runtime Environment\1.8

                  Ignore: 1.8

                  Check: SOFTWARE\JavaSoft\Java Runtime Environment\1.8.0_144

                  Check launcher: C:\Program Files\Java\jre1.8.0_144\bin\javaw.exe (OK)

                  Match: 1.8.0_144

                  64-bit search: SOFTWARE\JavaSoft\Java Development Kit...

                  Check: SOFTWARE\JavaSoft\Java Development Kit\1.8

                  Ignore: 1.8

                  Check: SOFTWARE\JavaSoft\Java Development Kit\1.8.0_121

                  Ignore: 1.8.0_121

                  64-bit search: SOFTWARE\JavaSoft\JRE...

                  64-bit search: SOFTWARE\JavaSoft\JDK...

                  Runtime used: 1.8.0_144 (64-bit)

                  Launcher: C:\Program Files\Java\jre1.8.0_144\bin\javaw.exe

                  Launcher args: -jar "c:\oracle\fsal\.\jre\bin\frmsal_linux.jar" -url "http://10.x.x.x:7777/forms/frmservlet?config=webutil_standaloneapp&form=XXX"

                  Args length: 138/32768 chars

                  Error msg: An error occurred while starting the application.

                  Open URL: www.forms12c.com

                  • 6. Re: How to start FSAL as signed EXE?
                    Frank Hoffmann-colognedata

                    Hi Gary,

                     

                    my example is Windows32, with a 32 Bit JRE and relative paths to the JRE Filearchiv. Did you change the XML File?

                     

                    This call is missing in your log:

                     

                    "start .\jre\bin\javaw -jar .\jre\bin\fsal_windows_12213.jar"

                     

                    It seems by coyping it to the Post it has changed .. the second XML quot; was converted to "

                     

                    <cmdLine>start .\jre\bin\javaw -jar .\jre\bin\fsal_windows_12213.jar -url &quot;

                     

                    start .\jre\bin\javaw -jar .\jre\bin\fsal_windows_12213.jar -url "https://www.forms12c.com/forms/frmservlet?config=DEMO0001"

                     

                    Version: 3.10

                    CmdLine: C:\ORACLE\fsal\forms12c_demo0001.exe --l4j-debug

                    WOW64:  no

                    Working dir: C:\ORACLE\fsal\.

                    Java min ver:

                    Java max ver:

                    Bundled JRE: .\jre

                    Check launcher: C:\ORACLE\fsal\.\jre\bin\javaw.exe (OK)

                    Launcher: C:\ORACLE\fsal\.\jre\bin\javaw.exe

                    Launcher args: -Djava.net.useSystemProxies=true -jar "C:\ORACLE\fsal\.\jre\bin\fsal_windows_12213.jar" start .\jre\bin\javaw -jar .\jre\bin\fsal_windows_12213.jar -url "https://www.forms12c.com/forms/frmservlet?config=DEMO0001"

                    Args length: 212/32768 chars

                    Exit code: 259

                     

                    Also you do not seem to work with a Java file archiv.

                    (Bundled JRE: .\jre)

                     

                    Can you please try firsat to run my demo on forms12c with fsal_Windows_12213 so we make sure it works.

                    • 7. Re: How to start FSAL as signed EXE?
                      Gary_A

                      Frank, I got it to work...kind of.

                      What I was hoping for is that the executable was going to bundle the entire package together so that I can just give it to another user and have them run it, that they didn't need JRE, they didn't need to the frmsal.jar file, etc.

                      When I gave it to another user, it said it could not find the .jar file in the relative path from the location they run the .exe (in this case, the Desktop), so I created a jre/bin directoriy on the desktop and put the .jar file there and it worked.

                      But, not only is it looking for the frmsal.jar file, it expects an installed JRE. Isn't the purpose of this bundle so it can just run on any PC?

                      Am I doing something wrong, or it is this expected?

                      • 8. Re: How to start FSAL as signed EXE?
                        Gary_A

                        Just to update, because I have been playing around...

                        I tried with turning off the "don't wrap the jar" option, but I get a FRM-93143 checksum failed" error.

                        I tried with "fallback option" in the JRE tab, but get an error about buildled JRE is missing or corrupted when I run on a machine without JRE installed.

                        • 9. Re: How to start FSAL as signed EXE?
                          Gary_A

                          Installshield is not freeware, so will will not be creating an MSI.

                          We'll stick with our original plan and just push out JRE 1.8.0_151 to machines, along with the fsal jar file and then just use a desktop link for the FSAL.

                          • 10. Re: How to start FSAL as signed EXE?
                            Frank Hoffmann-colognedata

                            I have checked you requirement and got the same result

                             

                            Executing: C:\ORACLE\fsal\start_demo1.exe will lead to the checksum error
                            FRM-93143: Prüfsumme des Standalone-Oracle Forms-Launchers nicht erfolgreich.

                            Wenden Sie sich an den Systemadministrator.

                             

                            Because ORACLE wants to make a Client/Server checksum compare with frmsal.jar the call fails

                             

                            But like very often there is a workaround for this limiitation

                             

                            try this:

                             

                            Generate a Startexe with wrapped FSAL.jar. This one will search for a JRE installed on the Client with Minimum Version 1.8.131 (as certified with 12.2.1.3) and compares it during start with a frmsal.jar on the server. Here is the trick: Copy your EXE on the Forms-Server in the "/forms/java" directory and rename it from start_demo1.exe to frmsal.jar. Restart weblogic / Forms - and voila - it works.

                             

                            Guess what will happen - the checksum between the Starting EXE File (something like 370KB) will exactly match with modified frmsal.jar on the server and will run.

                            But with this trick you have two limitations - first one : only one exe with the exact checksum will run and the second limitation is, that signing of an wrapped JAVA/EXE does not work (error invalid corrupt jar file)

                            But even for this there is a hack: https://sourceforge.net/p/launch4j/discussion/332683/thread/4e9e2558/ or maybe other commercial Tools like java2exe will do this Job better,

                             

                            But for me this is to much hacking .  I would still prefer the original solution.

                             

                            Example for the workaround.

                             

                             

                            <?xml version="1.0" encoding="UTF-8"?>

                            <launch4jConfig>

                              <dontWrapJar>false</dontWrapJar>

                              <headerType>gui</headerType>

                              <jar>C:\ORACLE\fsal\frmsal.jar</jar>

                              <outfile>start_demo1.exe</outfile>

                              <errTitle></errTitle>

                              <cmdLine>start javaw -jar frmsal.jar -url &quot;https://forms12c.com/forms/frmservlet?config=demo0001"</cmdLine>

                              <chdir>.</chdir>

                              <priority>high</priority>

                              <downloadUrl>http://java.com/download</downloadUrl>

                              <supportUrl></supportUrl>

                              <stayAlive>false</stayAlive>

                              <restartOnCrash>false</restartOnCrash>

                              <manifest></manifest>

                              <icon>C:\ORACLE\grafiken\cd_128.ico</icon>

                              <jre>

                                <path></path>

                                <bundledJre64Bit>false</bundledJre64Bit>

                                <bundledJreAsFallback>false</bundledJreAsFallback>

                                <minVersion>1.8.0_131</minVersion>

                                <maxVersion></maxVersion>

                                <jdkPreference>jreOnly</jdkPreference>

                                <runtimeBits>64/32</runtimeBits>

                              </jre>

                              <splash>

                                <file>C:\ORACLE\grafiken\forms12c_splash.bmp</file>

                                <waitForWindow>true</waitForWindow>

                                <timeout>60</timeout>

                                <timeoutErr>true</timeoutErr>

                              </splash>

                            </launch4jConfig>

                            • 11. Re: How to start FSAL as signed EXE?
                              Gary_A

                              Thanks Franks, but I do not want to do a hack. We are perfectly happy with a shortcut to FSAL for every user. We are all on the same OS, version of java, etc. These machines are carbon copies of each other.

                               

                              Thanks for all the info. I learned a lot. I might re-address this in the future.