B4J Question What is the main class to select, when using JSmooth?

Discussion in 'B4J Questions' started by B4JExplorer, Sep 25, 2018.

  1. B4JExplorer

    B4JExplorer Active Member Licensed User

    Hi,

    According to the manifest file in a B4J Gui jar, the main class in a Release Jar is anywheresoftware.b4a.keywords.Common.

    There's also a JavaFX-Application-Class, which is b4j.example.main.

    Which is the main class that we should use, when embedding the main jar inside the Windows executable?



    Regards,
     
  2. MarkusR

    MarkusR Well-Known Member Licensed User

    "when embedding the main jar inside the Windows executable?"
    u can start a .jar file by double click if u have installed the runtime / jre from oracle.com
    its started by ....\bin\javaw.exe" -jar "path\file.jar"
    a executable .jar is generated in the Objects folder if u start in release mode from b4j ide.

    i googled JSmooth even but think its some kind of unnecessary tool.
     
    Last edited: Sep 25, 2018
    B4JExplorer likes this.
  3. B4JExplorer

    B4JExplorer Active Member Licensed User

    Markus, thanks but I know all this.

    The JSmooth tool generates a Windows executuable from a .jar file. It's asking for a main class, and I'm 99% certain that's the Common class. But I wanted to confirm.

    It might not matter, though. It's possible that JSmooth is unusable. My jre is 1.8, but when I run it (on the same PC that it was created), it still asks if the jrm needs to be downloaded. It appears that 1.5 is the last jre it supports.

    I'm going to try a commercial package (I've already played with Launch4J) Java2Exe, and see if that works ok.
     
    MarkusR likes this.
  4. DonManfred

    DonManfred Expert Licensed User

    it is most probably b4j.example.main as the common is probably th b4j core.
    Exactly it is: [package from Project Configuration (b4j.example in your case)].main

    See
    [​IMG]
     
    B4JExplorer likes this.
  5. B4JExplorer

    B4JExplorer Active Member Licensed User

    Fyi,

    I used Java2Exe Standard, and it works great. It's the simplest generator, after trying JSmooth and Launch4j.

    It does cost, but I just wanted to get this done quickly, and it does the job.


    Thanks for everyone's assistance.
     
    Last edited: Sep 25, 2018
    MarkusR likes this.
  6. MarkusR

    MarkusR Well-Known Member Licensed User

    B4JExplorer likes this.
  7. B4JExplorer

    B4JExplorer Active Member Licensed User

  8. BPak

    BPak Active Member Licensed User

    How big was the finished file?
     
    B4JExplorer likes this.
  9. B4JExplorer

    B4JExplorer Active Member Licensed User

    The original jar is around 5,850,000. The final exe is around 9,700,000. It includes the embedded jars sqlite-jbdc-3.7.2.jar 3,201,128 and sqljdbc4.jar 584,207.
     
    BPak likes this.
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