Menu

#1 Fix jar and shell script

open
Packaging (2)
5
2005-11-26
2005-11-26
No

Hi,

Currently the editor is launched in the jar file by
including the complete URL to it
(com.g11ntoolkit.xxx.yyy).

This is unnecessary. The editor in the jar can simply
be launched with java -jar <path>/g11ntoolkit.jar if
you enter the class path in the jar's manifest file.

I did this myself and it works fine.

I also changed the shell script to invoke the jar.

It would be a good idea to do it this way, don't you
think?

I can send the needed files/examples to you.

Raymond

Discussion

  • Bill Rich

    Bill Rich - 2005-11-26
    • labels: --> Packaging
    • assigned_to: nobody --> billrich
     
  • Bill Rich

    Bill Rich - 2005-11-26

    Logged In: YES
    user_id=1102878

    Yes, please send the files you have. I will see that it gets
    updated. Thanks. Bill

     
  • Raymond Martin

    Raymond Martin - 2005-12-04

    Logged In: YES
    user_id=1111672

    The jar is too large to attach here. Of course, the most
    important change is just the jar's manifest file. Don't
    know how you are doing things, but under Eclipse it is a
    simple matter to have a default mainfest file that is
    used when the app is exported as a jar file.

    The jar's META-INF/MANIFEST.MF file just needs the line

    Main-Class: com.g11ntoolkit.xliffutil.xlfEditor.xlfEditor

    added in.

    Here is the script to invoke this from /bin:

    #!/bin/bash

    cd ../lib

    java -jar g11ntoolkit.jar

    cd -

    exit 0

    Might want to add a few options to that, but now there is
    no need for an environment variable to be set by the user.
    Under Linux/UNIX the user can just execute the script in
    place or make a symbolic link to it that is in the
    excutables path (e.g. in /usr/local/bin) so that the app
    can be launched from anywhere. I'm not sure exactly about
    Windows, but I think you can do something similar.

    Cheers.

    Raymond

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.