Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi all,
I'm faced with an issue concerning our Arbortext Editor extension which is written in Java and uses JavaFX 2 for its UI.
My issue is that I need to have jfxrt.jar in the classpath in order for this to work.
Since this jar is part of the runtime since at least Java 1.7 I thought I needed to do nothing to work with the classes defined in this jar, but AE is not seeing them. When I manually add the jar to the classpath using
APTCLASSPATH=D:\Program Files\PTC\Arbortext Editor\bin\x86\jre\lib\jfxrt.jar
Then I can use them.
Is this expected behaviour ?
If so is there a way to add it programmatically ?
I would need to retrieve the Installation path of Arbortext Editor in ACL in order to be able to do this.
I tried "set classpath" and "append_java_classpath", but both did not work.
Any ideas ?
René
Solved! Go to Solution.
Hi everybody,
Bit of a late answer, but I was actually able to solve this using the tips from Jerry and forgot to share it.
I created the below acl script that I placed in the "custom\init" folder and that works for me.
function init()
{
local jfxrt = $aptpath;
jfxrt = jfxrt."\\bin";
if ($arch == "i386") {
jfxrt = jfxrt."\\x86";
}
else {
jfxrt = jfxrt."\\x64";
}
jfxrt = jfxrt."\\jre\\lib\\jfxrt.jar";
append_javaclass_path($jfxrt,1);
}
init();
kind regards
René
Hi René,
Take a look at this article. It should help you with this issue.
https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS96956
Sincerely,
Jerry Tippie
Hi Jerry,
thanks for the Tip, but unfortunately it does not work.
But maybe I'm doing something wrong.
I have added the following call to my ACL in the "custom\init" folder
set javaendorseddirs="D:\Program Files\PTC\Arbortext Editor\bin\x86\jre\lib\jfxrt.jar"
this gets called prior to the java_init() call in my code.
When evaluating the resulting classpath, it still does not include the jfxrt.jar.
But maybe I need to place this someplace else (i.e. the classpath is already fixed when my code is called) ?
The documentation of AE 6.1 does not show any entry for javaendorseddirs, so is this some hidden feature (that maybe doesn't work anymore for 6.1) ?
And I would still need solve the issue of how to obtain the path to the AE installation directory in ACL (as I need it in order to pass in the correct path for the jfxrt.jar).
Is there some global variable pointing to the AE install dir or something like that ?
I have currently no idea how to obtain the AE install dir in ACL
kind regards
René
Hi René,
Arbortext Editor has some built-in variables, one of which is to capture the install path. At the command line, type
show vars
One of them is aptpath. You can use that.
It sounds to me like you would benefit by filing a technical support case to discuss this in more detail. Here is the link to file a case:
https://www.ptc.com/appserver/cs/case/case_logger.jsp
Regards,
Jerry Tippie
Hi Jerry,
thanks again for the tipp with the vars.
That will come handy later on, I guess.
I have opened a case with the local distributor, as the support contract does not allow me to open a case directly with PTC (I tried first ).
kind regards
René
Hi everybody,
Bit of a late answer, but I was actually able to solve this using the tips from Jerry and forgot to share it.
I created the below acl script that I placed in the "custom\init" folder and that works for me.
function init()
{
local jfxrt = $aptpath;
jfxrt = jfxrt."\\bin";
if ($arch == "i386") {
jfxrt = jfxrt."\\x86";
}
else {
jfxrt = jfxrt."\\x64";
}
jfxrt = jfxrt."\\jre\\lib\\jfxrt.jar";
append_javaclass_path($jfxrt,1);
}
init();
kind regards
René