I would like to make a simple modification to the JSGFDemo.jar so that it can load in and use .gram files that are in the same folder as the .jar rather than having to be bundled in the .jar. I need to hand off a grammar driven system that a non-Java savvy person will only have to update words in the .gram file and not rebuild the whole .jar after each change. Could anyone advise me on how I need to alter the grammarLocation value in the config file to grab a .gram file from outside the .jar?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
there's only a workaround but not a real solution: you can specify a location outside the jar by using a file-system url (like "file:/c:/foo/bar.gram"). Doing so it is imho not possible to define relative locations. This is not a java bug but a non-optimal ValidatingPropertySheet implementation (c.f. line 376 which handles such cases). It's annoying from time to time also for others (like some of my colleagues and me), so maybe you could file a bug about this behavior.
Best regards,
Holger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to make a simple modification to the JSGFDemo.jar so that it can load in and use .gram files that are in the same folder as the .jar rather than having to be bundled in the .jar. I need to hand off a grammar driven system that a non-Java savvy person will only have to update words in the .gram file and not rebuild the whole .jar after each change. Could anyone advise me on how I need to alter the grammarLocation value in the config file to grab a .gram file from outside the .jar?
Thanks.
Hi xncroft,
there's only a workaround but not a real solution: you can specify a location outside the jar by using a file-system url (like "file:/c:/foo/bar.gram"). Doing so it is imho not possible to define relative locations. This is not a java bug but a non-optimal ValidatingPropertySheet implementation (c.f. line 376 which handles such cases). It's annoying from time to time also for others (like some of my colleagues and me), so maybe you could file a bug about this behavior.
Best regards,
Holger