How to build a Javahelp .jar with oxygen
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Wed Jun 30, 2010 12:12 pm
How to build a Javahelp .jar with oxygen
Hi again,
I have another problem. I'm not able to create a Javahelp .jar file with my oxygen installation.
What I have done:
I opened the "Configure Transformation Scenario" dialog, selected "DITA OT transformation" and clicked on "New". Then I selected "Javahelp" as type and started the transformation.
Result: The Javahelp output is generated but the jar file is not created.
My idea was that this is an additional advice for the ant script. Before using oxygen I transformed my content via the DOS commandline with a build.xml with the follwing lines:
I tried "dita2javahelp" as "build target" in the "Advanced" tab but this resulted in a transformation error:
I read in the manual but I couldn't find a hint where I can tell oxygen to create the jar file. Is there an option I can simply turn on or do I have to write a custom build script and include it?
Thanks for any help in advance.
Regards
I have another problem. I'm not able to create a Javahelp .jar file with my oxygen installation.
What I have done:
I opened the "Configure Transformation Scenario" dialog, selected "DITA OT transformation" and clicked on "New". Then I selected "Javahelp" as type and started the transformation.
Result: The Javahelp output is generated but the jar file is not created.
My idea was that this is an additional advice for the ant script. Before using oxygen I transformed my content via the DOS commandline with a build.xml with the follwing lines:
Code: Select all
<property name="jarfile" value="${outdir}/javahelp/manual.jar"/>
...
<jar destfile="${jarfile}" basedir="${outdir}/javahelp" includes="**">
Code: Select all
[pipeline] java.io.FileNotFoundException: http://java.sun.com/javase/technologies/desktop/javahelp/toc_1_0.dtd
Thanks for any help in advance.
Regards
-
- Posts: 9447
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to build a Javahelp .jar with oxygen
Hi,
You do not need to (and should not) change the target in the Advanced tab from the scenario configuration dialog. If you do that, a lot of necessary targets will not get executed before the JavaHelp jar gets created.
Just open the OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/build_dita2javahelp.xml file in Oxygen and in the target called dita2javahelp after the line:
add the following lines:
Oxygen 12 will probably contain this patch to the DITA Open Toolkit by default and build the jar file out of the box.
Regards,
Radu
You do not need to (and should not) change the target in the Advanced tab from the scenario configuration dialog. If you do that, a lot of necessary targets will not get executed before the JavaHelp jar gets created.
Just open the OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/build_dita2javahelp.xml file in Oxygen and in the target called dita2javahelp after the line:
Code: Select all
<antcall target="compile.Java.Help"></antcall>
Code: Select all
<jar destfile="${dita.map.output.dir}/${dita.map.filename.root}.jar" basedir="${dita.map.output.dir}">
<include name="**/*"/>
</jar>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Thu Aug 12, 2010 11:51 am
Re: How to build a Javahelp .jar with oxygen
This patch worked once for me. Then I added a topic and now I'm getting:
BUILD FAILED
C:\Program Files (x86)\Oxygen XML Editor 11\frameworks\dita\DITA-OT\build.xml:59: The following error occurred while executing this line:
C:\Program Files (x86)\Oxygen XML Editor 11\frameworks\dita\DITA-OT\build_dita2javahelp.xml:16: A zip file cannot include itself
Line 59 in build.xml points to:
<antcall target="dita2${transtarget}"></antcall>
Line 20 in build_dita2javahelp.xml points to:
<target name="dita.map.javahelp" depends="dita.map.javahelp.init, dita.map.javahelp.toc, dita.map.javahelp.map, dita.map.javahelp.set, dita.map.javahelp.index, dita.out.map.javahelp.toc, dita.out.map.javahelp.map,dita.out.map.javahelp.set, dita.out.map.javahelp.index"></target>
Any clues on that one ?
BUILD FAILED
C:\Program Files (x86)\Oxygen XML Editor 11\frameworks\dita\DITA-OT\build.xml:59: The following error occurred while executing this line:
C:\Program Files (x86)\Oxygen XML Editor 11\frameworks\dita\DITA-OT\build_dita2javahelp.xml:16: A zip file cannot include itself
Line 59 in build.xml points to:
<antcall target="dita2${transtarget}"></antcall>
Line 20 in build_dita2javahelp.xml points to:
<target name="dita.map.javahelp" depends="dita.map.javahelp.init, dita.map.javahelp.toc, dita.map.javahelp.map, dita.map.javahelp.set, dita.map.javahelp.index, dita.out.map.javahelp.toc, dita.out.map.javahelp.map,dita.out.map.javahelp.set, dita.out.map.javahelp.index"></target>
Any clues on that one ?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: How to build a Javahelp .jar with oxygen
Post by sorin_ristache »
Hello,
You have to exclude the jar itself from the content of the jar. The <jar> element should be:
Regards,
Sorin
You have to exclude the jar itself from the content of the jar. The <jar> element should be:
Code: Select all
<jar destfile="${dita.map.output.dir}/${dita.map.filename.root}.jar" basedir="${dita.map.output.dir}">
<include name="**/*"/>
<exclude name="${dita.map.filename.root}.jar"/>
</jar>
Regards,
Sorin
-
- Posts: 3
- Joined: Thu Aug 12, 2010 11:51 am
Re: How to build a Javahelp .jar with oxygen
Yes, that's it. Thank you very much!
I have just encountered a minor problem:
upon processing the DITA OT Javahelp Transformation, all existing .html files are overwritten with the new version, but the
...Bookmap.jar
...Bookmap_helpset.hs
...Bookmap.jhm
files are not overwritten. Before each run I have to manually delete them in order to get the new ones.
I would like to have them overwritten. Is there a way to do that ?
I have just encountered a minor problem:
upon processing the DITA OT Javahelp Transformation, all existing .html files are overwritten with the new version, but the
...Bookmap.jar
...Bookmap_helpset.hs
...Bookmap.jhm
files are not overwritten. Before each run I have to manually delete them in order to get the new ones.
I would like to have them overwritten. Is there a way to do that ?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: How to build a Javahelp .jar with oxygen
Post by sorin_ristache »
Did you look at the timestamp? Are they not overwritten or are they overwritten with a file with the same name and content? The .hs and .jhm files should be created again by the DITA-OT stylesheets that are called by the JavaHelp transformation and overwrite the old ones.
The jar file should be overwritten every time by the jar element regardless of its previous existence because you did not add the update="yes" attribute on the jar element.
Regards,
Sorin
The jar file should be overwritten every time by the jar element regardless of its previous existence because you did not add the update="yes" attribute on the jar element.
Regards,
Sorin
-
- Posts: 3
- Joined: Thu Aug 12, 2010 11:51 am
Re: How to build a Javahelp .jar with oxygen
You are right. I misinterpreted the Windows 7 column "Date" in the explorer. It seems to be the same as "Date created". When I look at "Date modified" I can see that it is overwritten.
-
- Posts: 4
- Joined: Thu May 19, 2011 4:54 pm
Re: How to build a Javahelp .jar with oxygen
Hi,
I also have a problem with building the javahelp and I hope you can help me.
I use the dita2javahelp transformation scenario and the commonltr.css file. The output is generated correctly, but changes within the css file have no effect to the output (if I open it with hsviewer). If I open the single html files, the format is correct.
What is my fault?
Thanks in advance for your help.
Jana
I also have a problem with building the javahelp and I hope you can help me.
I use the dita2javahelp transformation scenario and the commonltr.css file. The output is generated correctly, but changes within the css file have no effect to the output (if I open it with hsviewer). If I open the single html files, the format is correct.
What is my fault?
Thanks in advance for your help.
Jana
-
- Posts: 9447
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to build a Javahelp .jar with oxygen
Hi Jana,
Basically if you make modifications in the CSS:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/resource/commonltr.css
they should be reflected in the Java Help output.
For example I added an extra CSS selector like:
to change colors for all paragraphs and the setting was reflected in the JavaHelp output.
Can you try to make the same change and see if the output JavaHelp contains the change?
Not all the CSS properties are supported in a JavaHelp viewer so it might be a case in which the viewer just does not support the CSS properties set in the CSS file.
Regards,
Radu
Basically if you make modifications in the CSS:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/resource/commonltr.css
they should be reflected in the Java Help output.
For example I added an extra CSS selector like:
Code: Select all
p{
color:blue;
}
Can you try to make the same change and see if the output JavaHelp contains the change?
Not all the CSS properties are supported in a JavaHelp viewer so it might be a case in which the viewer just does not support the CSS properties set in the CSS file.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Thu May 19, 2011 4:54 pm
Re: How to build a Javahelp .jar with oxygen
Thanks for your quick response, Radu
Yes, I tried the commonltr.css from the resource folder.
Perhaps the property "color:#FF0000" is not supported in Javahelp? That`s what I tried.
Unfortunately I can`t test your css code until friday but I`ll let you know if it works.
Maybe you know a documentation with css properties supported in Javahelp?
Best regards
Jana

Yes, I tried the commonltr.css from the resource folder.
Perhaps the property "color:#FF0000" is not supported in Javahelp? That`s what I tried.
Unfortunately I can`t test your css code until friday but I`ll let you know if it works.
Maybe you know a documentation with css properties supported in Javahelp?
Best regards
Jana
-
- Posts: 9447
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to build a Javahelp .jar with oxygen
Hi Jana,
The strange thing is that I re-tested today the same CSS selector which worked for me yesterday:
and I could not get it to work (although it did yesterday).
The modifications were present in the jar file.
I also need more time for tests, I will update the post if I find a solution.
Regards,
Radu
The strange thing is that I re-tested today the same CSS selector which worked for me yesterday:
Code: Select all
p{
color:blue;
}
The modifications were present in the jar file.
I also need more time for tests, I will update the post if I find a solution.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Thu May 19, 2011 4:54 pm
Re: How to build a Javahelp .jar with oxygen
Hi Radu,
here are my test results:
Color modifying with your css code works fine for div=p (also with hex code).
But if I change the color for example for div=note, there is no effect on the output.
Maybe some DITA elements can`t customize with css?
Regards,
Jana
here are my test results:
Color modifying with your css code works fine for div=p (also with hex code).
But if I change the color for example for div=note, there is no effect on the output.
Maybe some DITA elements can`t customize with css?
Regards,
Jana
-
- Posts: 9447
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to build a Javahelp .jar with oxygen
Hi Jana,
There is a misunderstanding, the CSS can only be used to customize the HTML output.
So your CSS selectors should not match like this:
because the final HTML will contain no trace of the original note element.
By default when a DITA <note> gets published to HTML it becomes something like:
So the original @class attribute of the note will migrate to the @class attribute of the <div>, intentionally to make styling possible in the CSS.
You can test this in your own HTML output.
So if you want to style the note in the HTML output the CSS selector should be like:
I am not sure the JavaHelp viewer supports this selector but it's the proper way to do this.
Regards,
Radu
There is a misunderstanding, the CSS can only be used to customize the HTML output.
So your CSS selectors should not match like this:
Code: Select all
note{
color:blue;
}
By default when a DITA <note> gets published to HTML it becomes something like:
Code: Select all
<div class="note note">.....
You can test this in your own HTML output.
So if you want to style the note in the HTML output the CSS selector should be like:
Code: Select all
div[class~="note"]{
...............
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9447
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to build a Javahelp .jar with oxygen
Hi,
The second time I tried to test styling the elements in the JavaHelp output I had a DITA paragraph like:
and I could not get styling to work on the p selector.
It seems there are also problems in the output when an element breaks the current layout, in this case the note is a block level element and breaks the paragraph flow in order to be visually rendered on a new line.
After I changed my example to:
I could properly style the paragraph.
Regards,
Radu
The second time I tried to test styling the elements in the JavaHelp output I had a DITA paragraph like:
Code: Select all
<p>Paragraph text <note>The note</note></p>
It seems there are also problems in the output when an element breaks the current layout, in this case the note is a block level element and breaks the paragraph flow in order to be visually rendered on a new line.
After I changed my example to:
Code: Select all
<p>Paragraph text </p><note>The note</note>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service