B4J Tutorial UI apps packaging - self contained installers

Discussion in 'B4J Tutorials' started by Erel, Aug 2, 2015.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    Have you installed InnoSetup?
     
  2. micro

    micro Well-Known Member Licensed User

    Yes, if you re-read carefully, with Javapackager.exe(64 bit) work fine and the packager is created only that on the win7 32bit not work, while with
    Javapackager.exe(32 bit) run build and in a few second appears a window message "Package built successfully" but the folder is empty.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    This is why it is always better to post questions in a new thread.

    Are there any messages in the logs?
     
  4. micro

    micro Well-Known Member Licensed User

  5. Douglas Farias

    Douglas Farias Expert Licensed User

    @Erel
    exist a minimal version of mac to run this?
    i m making a public app and i need to know the minimal version of mac to run my app with this installer.
    thx
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I don't think so. Any Mac that can run Java 8 should work.
     
    Douglas Farias likes this.
  7. aaronk

    aaronk Well-Known Member Licensed User

    When I run the source code from post 1 I get the following error in the IDE log:

    Code:
    java.lang.ExceptionInInitializerError
    Caused by: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: org/controlsfx/glyphfont/GlyphFont : Unsupported major.minor version 
    52.0
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    114)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    82)
    at b4j.packager.main.<clinit>(main.java:
    17)
    Caused by: java.lang.UnsupportedClassVersionError: org/controlsfx/glyphfont/GlyphFont : Unsupported major.minor version 
    52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:
    800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
    142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:
    449)
    at java.net.URLClassLoader.access$
    100(URLClassLoader.java:71)
    at java.net.URLClassLoader$
    1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$
    1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:
    354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:
    425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
    308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:
    358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:
    190)
    at anywheresoftware.b4a.shell.Shell.getCorrectClassName(
    Shell.java:455)
    at anywheresoftware.b4a.shell.Shell.createObject(
    Shell.java:442)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:239)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
    at java.lang.reflect.Method.invoke(Method.java:
    606)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    93)
    ... 
    2 more
    Exception in thread "main"
    I have Inno Setup installed on my PC and I am running Windows 10.

    I then thought I would try and run the B4JPacker.jar from the command prompt like: java -jar B4JPackager.jar

    But that then returned the following:
    Code:
    Program started.

    main._process_globals (java line: 
    333)
    java.lang.UnsupportedClassVersionError: org/controlsfx/glyphfont/GlyphFont : Unsupported major.minor version 
    52.0
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$
    100(Unknown Source)
      at java.net.URLClassLoader$
    1.run(Unknown Source)
      at java.net.URLClassLoader$
    1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at b4j.packager.main._process_globals(main.java:
    333)
      at b4j.packager.main.initializeProcessGlobals(main.java:
    300)
      at b4j.packager.main.start(main.java:
    33)
      at com.sun.javafx.application.LauncherImpl$
    5.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$
    5.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$
    4$1.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$
    4$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$
    4.run(Unknown Source)
      at com.sun.glass.ui.InvokeLaterDispatcher$
    Future.run(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$
    100(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$
    3$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
    Anyone know what I am missing ?
    (I never get to see the form load on the screen and the above error happens as soon as the jar has run)
     
  8. Douglas Farias

    Douglas Farias Expert Licensed User

    Java Version installed on PC?
     
  9. aaronk

    aaronk Well-Known Member Licensed User

  10. Douglas Farias

    Douglas Farias Expert Licensed User

  11. Douglas Farias

    Douglas Farias Expert Licensed User

    @Erel
    its possible change the language of the installation? and the java LOGO black image?
     
  12. Erel

    Erel Administrator Staff Member Licensed User

  13. Douglas Farias

    Douglas Farias Expert Licensed User

    dont have language options, but i remember the inno setup on my old projects not on b4j.
    the setup auto select the language of the pc and make a instalation setup on the language of the pc.

    This option are not on this inno version?
    know about that?
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    These are the options exposed by javapackager.
     
  15. Douglas Farias

    Douglas Farias Expert Licensed User

    @Erel
    i need to compile on diferent pcs the installer?
    for example i made the .exe on my pc 64 bits now, and i have sent to my friend with win 32 and the .exe dont run.
    show a msg this app cant tun on your pc.

    i need to compile on
    - 64 Windows
    - 32 Windows
    - 64 Mac (dont know if this exist, i dont have mac XD)
    - 32 Mac (dont know if this exist, i dont have mac XD)
    - Any Linux version? i dont know if linux have 32 or 64 too, but id exist i need compile on linux 32 and 64 ?

    have a way to make this installer run on all windows versions and 32 & 64?


    and the .jar have this rule about 32 and 64?

    error image
    11949751_874688892616700_711764747_n.jpg
     
    Last edited: Aug 31, 2015
  16. Erel

    Erel Administrator Staff Member Licensed User

    You don't need to create a 64 bit installer. 64 bit computers support 32 bit applications as well.

    I haven't tested this tool with Linux. I think that it will be easier to distribute the jar file with linux.
     
    Douglas Farias likes this.
  17. Suntzu

    Suntzu Member Licensed User

    I am creating an installer for one of my apps but it is failing. Here is the log:
    Code:
    Program started.
    C:\Users\XXXX\AppData\Roaming\B4JPackager
    App identifier: XXX.XXX.XXXX.main
    Success: 
    true
    StdOut: Using base JDK at: C:\Program Files\Java\jdk1
    .8.0_51\jre
    Exception: java.io.IOException: Write error
    StdErr: Error: Bundler 
    "EXE Installer" (exe) failed to produce a bundle.
    ExitCode: -
    1
    C:\Users\XXXX\AppData\Roaming\B4JPackager folder contains these folders and files but without the actual bundled .exe file:

    bundles
    META-INF
    1.exe.html
    1.exe.jnlp
    XXXX.jar
    settings.txt

    Any ideas? I'm on jdk1.8.0_60.
     
    Last edited: Sep 6, 2015
  18. Erel

    Erel Administrator Staff Member Licensed User

    Is InnoSetup installed?
     
  19. Suntzu

    Suntzu Member Licensed User

    Yes, InnoSetup v5.5.6 is installed.
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    Try to add InnoSetup to windows path.
     
    Suntzu likes this.
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice