In the documentation for batik, it shows how to get an instance of the DOM implementation from the class org.apache.batik.dom.svg.SVGDOMImplementation.
However, after downloading Batik 1.8 from the same site, I cannot find this class anywhere.
I downloaded the 1.7 version and found it in batik-svg-dom.jar but it does not exist in the same jar within 1.8 (or as far as I can tell in any of the jars in that package).
Has this class been renamed / refactored / replaced? If so how do you get an instance of the DOM implementation in batik 1.8?
I found the answer, embedded in the maillist thread posted in #Ajay's answer.
It seems that in order to solve this bug, they have moved SVGDOMImplementation into package org.apache.batik.anim.dom, which lives in the jar file batik-anim-1.8.jar.
As at the time of writing, the batik web site had not yet been updated, and for some reason this change was also not highlighted in the release notes.
I'm having same issue, looks like we need to drop back to 1.7.. 1.8 is unstable as suggested in of the thread
http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/201503.mbox/%3C5515BC93.90402#ptc.com%3E
I had the same issue with Apache Batik 1.8. The official binaries of that version are not compatible. To get the version 1.8 work I had to replace fop-transcoder-allinone-1.1.jar by fop-transcoder-allinone-2.2.jar which I took from Apache Batik 1.9.
Download binary of Apache Batik1.8 it makes life easier with above problem. Include only that in your project. That's enough. Here is the link.
Note that binaries are nothing but source code compiled into Java Archive files (JARs) they are the one's that execute on JVM.
Related
I used for my project BCEL-5.2 and after few months I realized that it doesn't contain the class for the local variable type table. I saw that is present in BCEL-6.0 and I found also a patch to apply at it.
Where can I find the source code of this library?
Anybody know how to get the library after adding the patch?
The version 6.0 was not released yet, but you can get its source from the BCEL code repository.
Version 6.0 is now out for Java 7.
download
I am upgrading my JasperReports version as mentioned in the title.
I don't know much about the JasperReports version upgrade. Which all things I have to change to make it work. I have latest .jar files of everything. But when I print my .PDF report it gives me this error.
error:could not open file because its damaged or not supported.
In eclipse it shows this exception
java.lang.NoSuchFieldError: PRINTSCALING at
net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:532) at
net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:396) at
net.sf.jasperreports.engine.JasperExportManager.exportToPdf(JasperExportManager.java:212) at
net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:536) at
com.sibisoft.northstar.util.JasperReportGenerator.getPdfByteArray(JasperReportGenerator.java:679)
Please help me.
The issue is not with JasperReports but with the version of the iText library you are using. You need to download version 2.1.7 to work with that version of JasperReports. You can get it from here.
I happened to know this one off the top of my head, as I ran into it in the past, but as a helpful note in the future, this is the process I used to figure it out originally.
Since JasperReports is open source, the code can be found online easily. So I google:
site:grepcode.com
net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream
To find the code online. (GrepCode basically provides a cool site to look through many open source projects source code.)
At the top of the GrepCode page they have the version of the project, so make sure it is pointing to which ever version you are using.
Then find the method or line number in the error message.
From here it is just like debugging local code. You can see what the offending class is, and what package it belongs to. In this case it points to the itext libray as the culprit.
Hope that helps you out in the future, and happy reporting.
I've got the incomplete sources, courtesy of the official JDK download from apple. Its missing things like com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl, which is of course what I need to step into.
Is there a convenient source jar available? I found one for b14, but the sources for that file don't match.
I went and got the OpenJDK sources (b25 is latest apparently) but it would appear to need a bunch of other things downloaded and then assembled and I'm loath to attempt that on OSX.
The OSX version claims to be 1.6.0_33.
I am getting this bad version error as shown below. How to fix this. Do I need to have a separate jar file for each version of java?
(source: sourceforge.net)
How to fix this.
Is this a plugin that you created, or did you download it from somewhere?
I've never seen this myself, but I suspect that you are running Eclipse using an older version of Java (e.g. 1.5) and trying to use a plugin that was compiled for Java 1.6. Assuming that is the case you can:
upgrade the JDK used to run Eclipse to 1.6,
try to find a version of the plugin that was compiled for the Java 1.5 platform, or
download the plugin sources and build it for Java 1.5 yourself.
Do I need to have a separate jar file for each version of java?
No. A JAR file built for a Java 1.5 target platform should also work on a Java 1.6 platform. (Just not the other way around ...)
I got similar kind of error once and I was not able to fix it. And I ended up removing the plugin (EMF Plugin) and installing it on a new setup of Eclipse.
Now, I use Yoxos On-demand where you can create/add/remove Eclipse plugins with no effort. This is the best Eclipse customizer I have seen.
You are running on an older version of Java than the code was compiled for.
Where can I find the source code for the Java library classes? I mean classes in rt.jar.
Platform: Windows.
For old versions of Java with separate JRE and JDK downloads, download the JDK. The sources for the public classes are in src.zip.
Here's the browsable source code for OpenJDK 7.
Update: As of June 2018 grepcode seems to be down. Here you can find an alternative.
Update^2: As of October 2020, the two previous links do not work. View it at OpenJDK and vote up the answer by Nosrep, which I got it from.
Sources are in src.zip located in the installation folder:
On Windows, the JDK includes src.zip by default if I remember well.
On a Linux distro, you may have to install the sun-java6-source package.
On Mac, you'll have to download the Developer Documentation. Have a look at this answer.
If you only need to have a look at the source/implemenation, i would suggest using
Docjar
Edit
GrepCode is even better
GrepCode
You can directly browse the code online here for Java : https://zgrepcode.com/java/openjdk/10.0.2/
It is a great tool also for browsing most of the open source projects as it gives you internal linking to classes.
As almost all the suggestions seem to be either grepcode or zgrepcode which are both down, I found one from OpenJDK here: http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/tip/src/share/classes/
Edit: a more complete version of all OpenJDK projects and JDK 6-15 can be found here: https://hg.openjdk.java.net/
As mention above, most of the source files can be found by downloading the SDK.
However for some classes you can find the source code (javax.ssl etc') for I suggest adding the jad eclipse plugin that will decompile any class without using external site such as Docjar.
Jad eclipse info:
http://jadclipse.sourceforge.net/wiki/index.php/Main_Page
There is also grepcode.com (not sure how old this site is, perhaps this answer is an update for new solutions now), sample query:
http://grepcode.com/search?query=java.lang.Math.sin&start=0&entity=type&n=