Subject:Stylus X15 R2 environment crippled Author:Kurt Wald Date:08 Oct 2014 08:17 AM
it seems that Stylus Studio X5 R2 Enterprise cripples the environment. The stylesheet uploaded with this post displays the content of the PATH variable on my win 7 system as:
it looks as if systempath should be resolved but isn't.
This also leads a problem with java versions. In the above scenario 1.8 (the default JRE on this machine) is set e as the Stylus VM version via the options dialog. If I change this option to 1.7, the Stylus PATH variable points to c:\program files (x86)\java\jre1.7.... If I the run a custom processor with java.exe -cp ... I get:
External XSLT processing started...
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
I have not tested environment variables other than PATH.
Subject:Stylus X15 R2 environment crippled Author:Ivan Pedruzzi Date:08 Oct 2014 10:14 AM
Hi Kurt,
This has nothing to with Stylus Studio.You cannot rely on setting the variable PATH to switch JVM.
1) if you have multiple JVM on the system, the most recent install has copied java.exe in the windows folder and set the following registry key (java 32bit on 64bit system) to make its version the current:
Subject:Stylus X15 R2 environment crippled Author:Kurt Wald Date:08 Oct 2014 11:59 AM
Hi Ivan,
the JVM issue is only a side effect. The main issue is the crippled system path. I came across this, when I tried to launch powershell via ProcessBuilder from a java extension inside an xslt script. Powershell.exe is called relying on the system PATH, which works fine with Saxon outside of Stylus Studio. Due to the crippled PATH Variable in Stylus Studio:
I get a powershell.exe not found error, when processing the stylesheet in Stylus Studio because the powershell directory is no longer in the system path. I suspect that the systempath entry (see above) is a Stylus placeholder for the original system's PATH variable. systempath should be resolved but ends up in the Stylus version of PATH as a literal.