User (Legacy) Posted April 25, 2006 Report Share Posted April 25, 2006 Hi, I do develop an java application using chartFX (version 6.2) using the well known IDE Eclipse (3.1). I've copied the license files for chartFX into the same directory than chartfx.jar and therefore the charts are rendered successfully. If I try to put the application in an executable jar file, the license files won't be found anymore. The resulting chart is showing the message "Invalid License (A000000). Please contact SoftwareFX Support". I've also tried to pack the license files into the root directory in the jar file without success. The third approach I've tried was to pack the license files into a directory within the jar file and set the configFilePath before creating the chart in Java[1]. What's the solution for packaging the chartFX jars together with the application classes into one executable jar file? Where should the license files be placed? Any help appreciated, Kurt [1] Code to set the configuration directory: URL url = ClassLoader.getSystemResource("config/cfxjava.lic"); String fileName = null; try { fileName = URLDecoder.decode(url.getFile(),"UTF-8"); } catch (UnsupportedEncodingException e1) { log.error("Couldn't decode URL to license dir for chartFX",e1); } String licDir = fileName.replace("cfxjava.lic",""); log.info("lic dir: "+licDir); Chart.setConfigPath(licDir); Link to comment Share on other sites More sharing options...
Software FX Posted April 25, 2006 Report Share Posted April 25, 2006 Kurt, Chart FX looks for the license file in the file system, and there is no support to getting the file from a jar file. Right now, you would have to copy the lic file to the same folder where the executable jar is. We will look into this feature and we will try to add support for jar files. It looks like you are using Chart FX for Java in a client application, and I wonder if you are aware of the licensing implications. Chart FX for Java license model is server based, but client licenses are an option, and you will be able to go around the problem you are having right now. Please contact us at sales@softwarefx.com for more details. Regards, GA Software FX, Inc. "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message news:8OdpdJJaGHA.1536@webserver3.softwarefx.com... > Hi, > > I do develop an java application using chartFX (version 6.2) using the > well known IDE Eclipse (3.1). I've copied the license files for chartFX > into the same directory than chartfx.jar and therefore the charts are > rendered successfully. > If I try to put the application in an executable jar file, the license > files won't be found anymore. The resulting chart is showing the message > "Invalid License (A000000). Please contact SoftwareFX Support". > I've also tried to pack the license files into the root directory in the > jar file without success. The third approach I've tried was to pack the > license files into a directory within the jar file and set the > configFilePath before creating the chart in Java[1]. > What's the solution for packaging the chartFX jars together with the > application classes into one executable jar file? Where should the license > files be placed? > > Any help appreciated, > > Kurt > > [1] Code to set the configuration directory: > URL url = ClassLoader.getSystemResource("config/cfxjava.lic"); > String fileName = null; > try { > fileName = URLDecoder.decode(url.getFile(),"UTF-8"); > } catch (UnsupportedEncodingException e1) { > log.error("Couldn't decode URL to license dir for chartFX",e1); > } > String licDir = fileName.replace("cfxjava.lic",""); > log.info("lic dir: "+licDir); > Chart.setConfigPath(licDir); Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 29, 2006 Author Report Share Posted April 29, 2006 Thank you, copying the license to the same directory solved the problem, it would be nice to have the lic file packed inside the jar though. Even if I set the configuration directory of ChartFX to a directort inside the jar, ChartFX wouldn't read the lic file. The license model is not an issue here because it's just a server application that generates some charts in batch mode - no clients involved. But thank you for the pointer and your concerns. Regards, Kurt on 25.04.2006 23:46 SoftwareFX Support stated: > Kurt, Chart FX looks for the license file in the file system, and there is > no support to getting the file from a jar file. Right now, you would have > to copy the lic file to the same folder where the executable jar is. We will > look into this feature and we will try to add support for jar files. > > It looks like you are using Chart FX for Java in a client application, and I > wonder if you are aware of the licensing implications. Chart FX for Java > license model is server based, but client licenses are an option, and you > will be able to go around the problem you are having right now. Please > contact us at sales@softwarefx.com for more details. > > Regards, > GA > Software FX, Inc. > > > > > > "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message > news:8OdpdJJaGHA.1536@webserver3.softwarefx.com... >> Hi, >> >> I do develop an java application using chartFX (version 6.2) using the >> well known IDE Eclipse (3.1). I've copied the license files for chartFX >> into the same directory than chartfx.jar and therefore the charts are >> rendered successfully. >> If I try to put the application in an executable jar file, the license >> files won't be found anymore. The resulting chart is showing the message >> "Invalid License (A000000). Please contact SoftwareFX Support". >> I've also tried to pack the license files into the root directory in the >> jar file without success. The third approach I've tried was to pack the >> license files into a directory within the jar file and set the >> configFilePath before creating the chart in Java[1]. >> What's the solution for packaging the chartFX jars together with the >> application classes into one executable jar file? Where should the license >> files be placed? >> >> Any help appreciated, >> >> Kurt >> >> [1] Code to set the configuration directory: >> URL url = ClassLoader.getSystemResource("config/cfxjava.lic"); >> String fileName = null; >> try { >> fileName = URLDecoder.decode(url.getFile(),"UTF-8"); >> } catch (UnsupportedEncodingException e1) { >> log.error("Couldn't decode URL to license dir for chartFX",e1); >> } >> String licDir = fileName.replace("cfxjava.lic",""); >> log.info("lic dir: "+licDir); >> Chart.setConfigPath(licDir); > > Link to comment Share on other sites More sharing options...
Software FX Posted May 2, 2006 Report Share Posted May 2, 2006 Thanks, we are going to add the functionality to load the lic file from a jar file in a future service pack. Regards, GA Software FX "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message news:uzJpIn1aGHA.3508@webserver3.softwarefx.com... > Thank you, copying the license to the same directory solved the problem, > it would be nice to have the lic file packed inside the jar though. Even > if I set the configuration directory of ChartFX to a directort inside the > jar, ChartFX wouldn't read the lic file. > The license model is not an issue here because it's just a server > application that generates some charts in batch mode - no clients > involved. But thank you for the pointer and your concerns. > > Regards, > > Kurt > > on 25.04.2006 23:46 SoftwareFX Support stated: >> Kurt, Chart FX looks for the license file in the file system, and there >> is no support to getting the file from a jar file. Right now, you would >> have to copy the lic file to the same folder where the executable jar is. >> We will look into this feature and we will try to add support for jar >> files. >> >> It looks like you are using Chart FX for Java in a client application, >> and I wonder if you are aware of the licensing implications. Chart FX >> for Java license model is server based, but client licenses are an >> option, and you will be able to go around the problem you are having >> right now. Please contact us at sales@softwarefx.com for more details. >> >> Regards, >> GA >> Software FX, Inc. >> >> >> >> >> >> "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message >> news:8OdpdJJaGHA.1536@webserver3.softwarefx.com... >>> Hi, >>> >>> I do develop an java application using chartFX (version 6.2) using the >>> well known IDE Eclipse (3.1). I've copied the license files for chartFX >>> into the same directory than chartfx.jar and therefore the charts are >>> rendered successfully. >>> If I try to put the application in an executable jar file, the license >>> files won't be found anymore. The resulting chart is showing the message >>> "Invalid License (A000000). Please contact SoftwareFX Support". >>> I've also tried to pack the license files into the root directory in the >>> jar file without success. The third approach I've tried was to pack the >>> license files into a directory within the jar file and set the >>> configFilePath before creating the chart in Java[1]. >>> What's the solution for packaging the chartFX jars together with the >>> application classes into one executable jar file? Where should the >>> license files be placed? >>> >>> Any help appreciated, >>> >>> Kurt >>> >>> [1] Code to set the configuration directory: >>> URL url = ClassLoader.getSystemResource("config/cfxjava.lic"); >>> String fileName = null; >>> try { >>> fileName = URLDecoder.decode(url.getFile(),"UTF-8"); >>> } catch (UnsupportedEncodingException e1) { >>> log.error("Couldn't decode URL to license dir for chartFX",e1); >>> } >>> String licDir = fileName.replace("cfxjava.lic",""); >>> log.info("lic dir: "+licDir); >>> Chart.setConfigPath(licDir); >> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.