Set Java path in Flare?
Set Java path in Flare?
Hi All,
The company I work for recently uninstalled Oracle Java from our machines, and now Flare is not able to build SVG images. In Flare 2020, it looks like it now supports OpenJDK. However, my company is using the Amazon Corretto version of OpenJDK, and Flare doesn't seem to be finding it. Plus, I've seen in other threads some confusion about whether Flare requires 32-bit or 64-bit Java, despite what some error messages say.
So questions:
1. Can you set the Java path somewhere in Flare?
2. Does Flare require the 32-bit or 64-bit version of Java?
Here are the errors I receive, depending on which version of Flare I use:
Thanks,
Josh
The company I work for recently uninstalled Oracle Java from our machines, and now Flare is not able to build SVG images. In Flare 2020, it looks like it now supports OpenJDK. However, my company is using the Amazon Corretto version of OpenJDK, and Flare doesn't seem to be finding it. Plus, I've seen in other threads some confusion about whether Flare requires 32-bit or 64-bit Java, despite what some error messages say.
So questions:
1. Can you set the Java path somewhere in Flare?
2. Does Flare require the 32-bit or 64-bit version of Java?
Here are the errors I receive, depending on which version of Flare I use:
Thanks,
Josh
You do not have the required permissions to view the files attached to this post.
-
- Sr. Propeller Head
- Posts: 251
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Set Java path in Flare?
Hi Josh,
Is this a system thing rather than Flare? Just wondering if the sys path for Java isn't set right (possibly still looking in the Oracle folder) so it's finding the wrong version of Java, or not finding it at all.
In a command prompt what do you get if you type "where java"?
You might need to set your JAVA_HOME environment variable to point to the new install for your Java.
Cheers,
Rob
Is this a system thing rather than Flare? Just wondering if the sys path for Java isn't set right (possibly still looking in the Oracle folder) so it's finding the wrong version of Java, or not finding it at all.
In a command prompt what do you get if you type "where java"?
You might need to set your JAVA_HOME environment variable to point to the new install for your Java.
Cheers,
Rob
Re: Set Java path in Flare?
Hi Rob,
All of my system variables seem to be set correctly. Do you know if Flare uses the system variables? Or does it rely on something else to find Java?
(By the way, it took me a while to respond because every time I post to the Flare forums I somehow end up on a spam list and it won't let me post for a while.)
Thanks,
Josh
All of my system variables seem to be set correctly. Do you know if Flare uses the system variables? Or does it rely on something else to find Java?
(By the way, it took me a while to respond because every time I post to the Flare forums I somehow end up on a spam list and it won't let me post for a while.)
Thanks,
Josh
-
- Sr. Propeller Head
- Posts: 251
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Set Java path in Flare?
Hi Josh,
I've no idea to be honest. I know I've tried to integrate with different Java components before and had issues. MIght be worth chasing through Flare support to see if there's a config file you can adjust to get things to work for you, or switch out installed components to your preferred ones.
Cheers,
Rob
I've no idea to be honest. I know I've tried to integrate with different Java components before and had issues. MIght be worth chasing through Flare support to see if there's a config file you can adjust to get things to work for you, or switch out installed components to your preferred ones.
Cheers,
Rob
Re: Set Java path in Flare?
Hi Josh,
Having a similar issue so just wondering if you got it resolved? I cannot view svg files in Flare. Even though it appears I have Java installed, Flare prompts me to install Java using that pop up.
thanks,
mark
Having a similar issue so just wondering if you got it resolved? I cannot view svg files in Flare. Even though it appears I have Java installed, Flare prompts me to install Java using that pop up.
thanks,
mark
Re: Set Java path in Flare?
Hi Mark,
Sorry, just saw your question today. No, there was no resolution. I contacted Flare support, and they said Flare is supposed to work with Amazon Corretto. They opened a bug report for this issue, but who knows when they'll get around to addressing it.
In the meantime I tried another option to convert my SVG images to PDF and then insert the PDFs into my topics. But Flare (of course) requires yet another piece of software called Ghostscript. I gave up at that point the company I work for does not want random software installed on our machines.
So I'm back to using PNG images that look fuzzy and crappy in the output. Here are a few resources I've found to make images look sharper in Flare:
viewtopic.php?t=10400
https://docs.madcapsoftware.com/flare20 ... -Guide.pdf
And as an editorial comment, Madcap really needs to get their act together with some of these issues. Some of the issues I've had with Flare I opened bug reports for them over ten years ago, and they're still not fixed. I can use any other software to generate documentation, including free software, and I have zero problems. But with Madcap Flare it's one problem after another. For new documentation projects we're no longer using Flare. We're only using it for legacy/maintenance projects where it would be more work to convert the existing documents than just maintain them in Flare until the product is retired.
Good luck,
Josh
Sorry, just saw your question today. No, there was no resolution. I contacted Flare support, and they said Flare is supposed to work with Amazon Corretto. They opened a bug report for this issue, but who knows when they'll get around to addressing it.
In the meantime I tried another option to convert my SVG images to PDF and then insert the PDFs into my topics. But Flare (of course) requires yet another piece of software called Ghostscript. I gave up at that point the company I work for does not want random software installed on our machines.
So I'm back to using PNG images that look fuzzy and crappy in the output. Here are a few resources I've found to make images look sharper in Flare:
viewtopic.php?t=10400
https://docs.madcapsoftware.com/flare20 ... -Guide.pdf
And as an editorial comment, Madcap really needs to get their act together with some of these issues. Some of the issues I've had with Flare I opened bug reports for them over ten years ago, and they're still not fixed. I can use any other software to generate documentation, including free software, and I have zero problems. But with Madcap Flare it's one problem after another. For new documentation projects we're no longer using Flare. We're only using it for legacy/maintenance projects where it would be more work to convert the existing documents than just maintain them in Flare until the product is retired.
Good luck,
Josh
Re: Set Java path in Flare?
Thank for letting me know Josh. Yes, I kind of gave up on it too.
The IT team in my company would not allow download from the Java links Madcap provides (that is, these https://www.madcapsoftware.com/downloads/java.aspx). I installed an equivalent OpenJDK version, but it did not work.
The IT team in my company would not allow download from the Java links Madcap provides (that is, these https://www.madcapsoftware.com/downloads/java.aspx). I installed an equivalent OpenJDK version, but it did not work.
-
- Jr. Propeller Head
- Posts: 1
- Joined: Fri Feb 25, 2022 5:32 am
Re: Set Java path in Flare?
Ran into this same issue with the current version of Flare 2021 r3.
I think I had used Java with Flare a few years ago, and found some batch scripts I had tried to use for setting up JAVA_* environment variables, but I think I just punted and used the "official" Oracle JRE MSI install at that time.
Today, however, I was finally able to narrow down the issue and successfully get it working without any MSI installer using a current OpenJDK 17 zip archive.
The main piece that seems to be the problem, is that Flare itself is looking for a registry entry that all of the Oracle bundled versions of Java over the years had installed, and the initial versions of OpenJDK do as well.
Even if those MSI packages are not installed (which, by the way, that web page Flare redirects you to makes a point of calling out to use the MSI version), you can still add the registry key and value and have it point to a "supported" version of Java.
It seems to totally ignore the "standard" Java method of using a JAVA_HOME or JDK_HOME environment variable, or just invoking java.exe if the PATH environment is already set up and instead appears to rely solely on the presence of registry entries to set the "Java Home" path (which is more of a "Windows" thing than environment variables sometimes tend to be).
As I have multiple versions of Java I need to switch between for development work, I do not simply install MSIs and have "one Java to rule them all"...that just does not work in the majority of programming environments developers work in.
I am able to actually point to an unzipped copy of an OpenJDK 17 variant and it seems to work fine with the SVGs now. Of course, your mileage may vary, and you may wish to use a "supported" version of Java 1.8.
Here are the registry import contents, as I do not like posting *.reg files that people may blindly click on and modify the registry unawares:
You can copy and paste that to a *.reg file and double-click if you want the easy way, or simply modify the registry yourself using the info provided above.
(Standard disclaimers for modifying the registry at your own peril apply...)
Even though the registry key must be "1.8", you can have it's JavaHome value point to any valid Java runtime that's appropriate for your environment (I'm currently using a 64-bit Java 17 unzipped "install").
Once the keys and JavaHome value are properly set up in the registry, Flare seems to just pick it up and run with it....you don't even need to restart Flare.
Hope this helps someone, as these issues are always a pain if you haven't had many "opportunities" troubleshooting various applications that require Java on Windows...
~Dave
I think I had used Java with Flare a few years ago, and found some batch scripts I had tried to use for setting up JAVA_* environment variables, but I think I just punted and used the "official" Oracle JRE MSI install at that time.
Today, however, I was finally able to narrow down the issue and successfully get it working without any MSI installer using a current OpenJDK 17 zip archive.
The main piece that seems to be the problem, is that Flare itself is looking for a registry entry that all of the Oracle bundled versions of Java over the years had installed, and the initial versions of OpenJDK do as well.
Even if those MSI packages are not installed (which, by the way, that web page Flare redirects you to makes a point of calling out to use the MSI version), you can still add the registry key and value and have it point to a "supported" version of Java.
It seems to totally ignore the "standard" Java method of using a JAVA_HOME or JDK_HOME environment variable, or just invoking java.exe if the PATH environment is already set up and instead appears to rely solely on the presence of registry entries to set the "Java Home" path (which is more of a "Windows" thing than environment variables sometimes tend to be).
As I have multiple versions of Java I need to switch between for development work, I do not simply install MSIs and have "one Java to rule them all"...that just does not work in the majority of programming environments developers work in.
I am able to actually point to an unzipped copy of an OpenJDK 17 variant and it seems to work fine with the SVGs now. Of course, your mileage may vary, and you may wish to use a "supported" version of Java 1.8.
Here are the registry import contents, as I do not like posting *.reg files that people may blindly click on and modify the registry unawares:
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8]
"JavaHome"="c:\\java\\jre\\"
(Standard disclaimers for modifying the registry at your own peril apply...)
Even though the registry key must be "1.8", you can have it's JavaHome value point to any valid Java runtime that's appropriate for your environment (I'm currently using a 64-bit Java 17 unzipped "install").
Once the keys and JavaHome value are properly set up in the registry, Flare seems to just pick it up and run with it....you don't even need to restart Flare.
Hope this helps someone, as these issues are always a pain if you haven't had many "opportunities" troubleshooting various applications that require Java on Windows...
~Dave
-
- Jr. Propeller Head
- Posts: 8
- Joined: Wed Aug 19, 2020 10:15 am
Re: Set Java path in Flare?
I'm looking for help with this problem. I have downloaded the zip file from https://jdk.java.net/18/ and unpacked the zip file into a local folder.
I set my Windows path to include the bin directory (C:\Program Files\jdk-17.0.2\bin in my case).
I get the warnings about Java and SVG (and I get no images in my outputs).
I manually created a registry key
And I no longer get the warnings, but I also don't get the graphics in my output.
Clearly I don't know what I'm doing -- can anyone help me?
Thanks!
I set my Windows path to include the bin directory (C:\Program Files\jdk-17.0.2\bin in my case).
I get the warnings about Java and SVG (and I get no images in my outputs).
I manually created a registry key
And I no longer get the warnings, but I also don't get the graphics in my output.
Clearly I don't know what I'm doing -- can anyone help me?
Thanks!
You do not have the required permissions to view the files attached to this post.
Re: Set Java path in Flare?
The key doesn't look right. I'd try running the reg provided earlier, but replace the path with the path you need.
-
- Jr. Propeller Head
- Posts: 8
- Joined: Wed Aug 19, 2020 10:15 am
Re: Set Java path in Flare?
Interesting...Psider wrote:The key doesn't look right. I'd try running the reg provided earlier, but replace the path with the path you need.
I fixed up the key and I also removed the bin from the path:
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8]
"JavaHome"="C:\\Program Files\\jdk-18.0.2\\"
-
- Jr. Propeller Head
- Posts: 8
- Joined: Wed Aug 19, 2020 10:15 am
Re: Set Java path in Flare?
When I run the Batik renderer directly from the Flare install directory, I get this output:
This warning was introduced with OpenJDK 17.0.2 -- part of deprecating some functionality. You can still download and deploy OpenJDK 16.0.2, which does not generate the error, from https://jdk.java.net/archive/
Code: Select all
$ java -jar /c/"Program Files/MadCap Software/MadCap Flare 16/Flare.app/Resources/Batik/batik-rasterizer.jar" Tip.svg WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.apache.batik.util.ApplicationSecurityEnforcer (file:/C:/Program%20Files/MadCap%20Software/MadCap%20Flare%2016/Flare.app/Resources/Batik/lib/batik-util.jar)
WARNING: Please consider reporting this to the maintainers of org.apache.batik.util.ApplicationSecurityEnforcer
WARNING: System::setSecurityManager will be removed in a future release
About to transcode 1 SVG file(s)
Converting Tip.svg to Tip.png ... ... success
-
- Jr. Propeller Head
- Posts: 4
- Joined: Fri Feb 02, 2018 9:32 am
Re: Set Java path in Flare?
Hello,
I had a problem with build error 'Java not found' when editing some projects that I inherited from elsewhere which use MathML rendering (see https://help.madcapsoftware.com/flare20 ... ations.htm).
I can confirm that adding the registry key as explained above solves the problem. I'm running Flare 2021r2.
-Phillip
I had a problem with build error 'Java not found' when editing some projects that I inherited from elsewhere which use MathML rendering (see https://help.madcapsoftware.com/flare20 ... ations.htm).
I can confirm that adding the registry key as explained above solves the problem. I'm running Flare 2021r2.
-Phillip
Re: Set Java path in Flare?
Thank you for the registry "hack"! This fixed my builds too.
-
- Propeller Head
- Posts: 11
- Joined: Fri Mar 30, 2012 6:42 am
- Location: Harrogate, North Yorkshire, UK
Re: Set Java path in Flare?
Thanks for posting this registry fix.
I can now see equations!
It's pretty poor of Flare not to respect the JAVA_HOME environment variable though.
Thanks
Mark
I can now see equations!
It's pretty poor of Flare not to respect the JAVA_HOME environment variable though.
Thanks
Mark