Set Java path in Flare?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Set Java path in Flare?

Postby Carlsen on Mon Jan 25, 2021 9:16 am

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:
F12_SVG.png

F2020_SVG.png



Thanks,
Josh
You do not have the required permissions to view the files attached to this post.
Carlsen
Propeller Head
 
Posts: 43
Joined: Fri Apr 08, 2011 2:30 pm

Re: Set Java path in Flare?

Postby robdocsmith on Tue Jan 26, 2021 4:28 pm

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
robdocsmith
Sr. Propeller Head
 
Posts: 196
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Set Java path in Flare?

Postby Carlsen on Tue Feb 02, 2021 3:31 pm

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
Carlsen
Propeller Head
 
Posts: 43
Joined: Fri Apr 08, 2011 2:30 pm

Re: Set Java path in Flare?

Postby robdocsmith on Wed Feb 03, 2021 2:51 pm

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
robdocsmith
Sr. Propeller Head
 
Posts: 196
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Set Java path in Flare?

Postby rogersm on Wed Feb 17, 2021 6:03 am

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
rogersm
Propeller Head
 
Posts: 94
Joined: Fri Nov 07, 2014 4:29 am

Re: Set Java path in Flare?

Postby Carlsen on Wed May 26, 2021 2:18 pm

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
Carlsen
Propeller Head
 
Posts: 43
Joined: Fri Apr 08, 2011 2:30 pm

Re: Set Java path in Flare?

Postby rogersm on Fri May 28, 2021 6:56 am

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.
rogersm
Propeller Head
 
Posts: 94
Joined: Fri Nov 07, 2014 4:29 am

Re: Set Java path in Flare?

Postby damiarnold on Fri Feb 25, 2022 4:52 pm

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:

Code: Select all
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8]
"JavaHome"="c:\\java\\jre\\"


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
damiarnold
Jr. Propeller Head
 
Posts: 1
Joined: Fri Feb 25, 2022 5:32 am

Re: Set Java path in Flare?

Postby Mister Squawk on Fri Jul 29, 2022 1:17 pm

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

reg.png


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.
Mister Squawk
Jr. Propeller Head
 
Posts: 7
Joined: Wed Aug 19, 2020 10:15 am

Re: Set Java path in Flare?

Postby Psider on Sun Jul 31, 2022 6:10 pm

The key doesn't look right. I'd try running the reg provided earlier, but replace the path with the path you need.
Psider
Propellus Maximus
 
Posts: 748
Joined: Wed Jul 06, 2011 1:32 am

Re: Set Java path in Flare?

Postby Mister Squawk on Mon Aug 01, 2022 6:19 am

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.


Interesting...

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\\"


Now the SVG renders correctly BUT it generates warnings in the log file. I'm assuming that the Batik SVG processor is complaining about the format of the SVG files?
Mister Squawk
Jr. Propeller Head
 
Posts: 7
Joined: Wed Aug 19, 2020 10:15 am

Re: Set Java path in Flare?

Postby Mister Squawk on Mon Aug 01, 2022 7:01 am

When I run the Batik renderer directly from the Flare install directory, I get this output:

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


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/
Mister Squawk
Jr. Propeller Head
 
Posts: 7
Joined: Wed Aug 19, 2020 10:15 am


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 12 guests

cron