Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDK1.3 vs JDK1.4

 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Together
I migrated a application from JDK1.3 to JDK1.4. The importprocess runs under JDK1.3 three minutes long. After the migration the process runs 20 minutes.
Has anyone an Idea what I do wrong?
Here a brief description what I'm doing in the importprocess:
I parse with sax a large XML-File (30MB) and store it partly in to a mysql DB. After that I transform the XML and write it out to a other XML-File.
Can anyone help me to find out why it takes so much longer?
Andy
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you already try to use a profiler to find the bottleneck?
 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No not jet.
Could you recommend one?
I working with eclipse, is there a plugin?
Thanks
Andy
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andy Dejung:
No not jet.
Could you recommend one?
I working with eclipse, is there a plugin?
Thanks
Andy

There is a plugin for integrating JProfiler. Seems to work fine for me.
 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you have recommended I used the JProfiler to find out where I lose the time. And surprising it is not in the java core classes but in the classes of the packages org.xml.sax and org.apache.xml.serialize and other apachen packages.
Some method calls take about 10 times as long as the had with Java 1.3
I have no clue why it is so as I only changed the JDK.
Any idea?
Thanks for help
Andy
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those classes are part of JRE1.4, but not of 1.3 afair. Perhaps you are therefore using different versions of those libraries, depending on the JDK?
 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right I deploy the xalan.jar but it uses the classes from the jdk1.4. I'm using the j2sdk1.4.1_01 but I could not find out which version of xalan it is included.
How can I switch that the xalan.jar is used and not the jdk classes?
Thank you again you help me a lot.
Andy
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andy Dejung:
How can I switch that the xalan.jar is used and not the jdk classes?

Sorry, I don't know...
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andy,
Place the xalan.jar, xercesImpl.jar, and xml-apis.jar in the <java-home>\lib\endorsed directory, where <java-home> is where the runtime software is installed.
Or use the -Xbootclasspath java commandline option to prepend the new xalan.jar, xercesImpl.jar, and xml-apis.jar to the boot class path.
Regards
 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks you two Ilja Preuss and Beno�t d'Oncieu with your help I could solve the problem. After moving the three jars to the /lib/endorsed directory the program runs quick again.

Again thanks a lot for your help
Andy
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic