Results 1 to 11 of 11

Thread: Qt Jambi Manifest problem

  1. #1
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt Jambi Manifest problem

    I've installed the standard Java edition of Eclipse Europa and Jambi 4.3.3 as well as the Jambi integration for Eclipse.

    I clearly have a "main" function defined and when I export to a .jar file I specify the class to be used as an entry point, yet when I try to execute the .jar file it claims that no entry point has been included.

    Any faced this issue before?
    I'm building against JRE 1.6.0_03.
    I know it's probably more of a Java issue, but I wasn't sure if it's because of the Qt integration or what. I've never done Java with Eclipse so I thought I'd ask here.

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    Create a META-INF folder in your project and in it create a custom MANIFEST.MF.
    You should add in it a main class entry, something like this:
    Qt Code:
    1. Main-Class: your_main_class_name
    To copy to clipboard, switch view to plain text mode 

    Next, when you build the jar, when the wizard asks you for the manifest file, specify the one you just created, from the workspace.

  3. #3
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    In the .jar files I've been getting, if I open it with 7zip or whatever, there is a META-INF containing a MANIFEST.MF that has the correct <package.class name> path.

    Is this different in some way to doing it explicitly the way you're suggesting?

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    Is this <package.class name> the "Class-Path" property or the "Main-Class" property?

  5. #5
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    The contents of the MANIFEST.MF file being generated is:

    Manifest-Version: 1.0
    Main-Class: FirstJambiTest.MainDialog


    I've attached my test project.
    TIA for any help you can give,

    Steve
    Attached Files Attached Files

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    OK, the project looks good, both the source and the binaries. Also, the manifest seems to be correct so far.

    The only thing that is missing is the "Class-Path" entry in MANIFEST.MF, which should contain the path to the Jambi jar, the complete path, such as: "Class-Path: c:\qtjambi_installdir\qtjambi.jar".

    You should try editing the jar after it is created and add this entry.
    Also, can you paste here the error you initially got? I don't have Jambi installed.

  7. #7
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    The error is "Could not find the main class. Program will exit."

    I get the same error even with the Class-Path set as you suggested.

  8. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    It doesn't make any sense... I've done this a lot of times(not with jambi, though) and never had any problems.

    Can you attach the jar? I'll test it here.

  9. #9
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    Here tis.

    I'm starting to wonder if it's a general Java thing.
    I might try building my Java project against version 1.5 and see what happens.
    Attached Files Attached Files

  10. #10
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Jambi Manifest problem

    Well, it's definitely a Jambi issue. I just created a vanilla Java project which displayed a dialog. After exporting it worked fine by double clicking hte .jar file. The was without including a specific MANIFEST.MF file.

    There probably isn't anything WRONG with Jambi, just that I'm missing something.
    I'll do a little more reading.

  11. #11
    JuanC Guest

    Default Re: Qt Jambi Manifest problem

    In Trolltech documents , there are this info :

    http://doc.trolltech.com/qtjambi-4.4...e-java-archive

    Anyone knows how to pack into a single .jar file , myapplication.jar , qtjambi-4.4.0_01.jar , qtjambi-win32-msvc2005-4.4.0_01.jar , qtjambi-linux32-gcc3.3-4.4.0_01.jar and this .jar file runs?

    I tried it several times and no luck.

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.