Fix jar and shell script
Brought to you by:
billrich
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
Logged In: YES
user_id=1102878
Yes, please send the files you have. I will see that it gets
updated. Thanks. Bill
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