• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Unable to compile under JDK1.5

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I am trying to port a project from JDK1.4 to JDK1.5. During compilation I get following errors

1. package org.apache.xpath.patterns does not exist
2. package org.apache.xml.utils does not exist
3. package com.sun.rsasign does not exist import com.sun.rsasign.c;

I think they were removed from JDK. Can anyone throw some light on where to find respective jars so that the compilation will go through

Thanks
- Jayram
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All the packages you mention are not part of the JDK, and also not under Java 1.4.

Your application uses some libraries, make sure that you include all the needed libraries in the classpath. It's not different from Java 1.4. Are you now compiling your classes differently than when you were using Java 1.4? Why?
 
jayram joshi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am certain they are part of JDK1.4. When I look into rt.jar I can see them. But they are missing from JDK1.5's rt.jar.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jayramj:
I am certain they are part of JDK1.4. When I look into rt.jar I can see them. But they are missing from JDK1.5's rt.jar.



<YodaVoice> Certain you are? Doubt you do not? hrm? </YodaVoice>

Sun's online java 1.4 api specification
[ August 30, 2005: Message edited by: Patrick van Zandbeek ]
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, jayramj,

Welcome back to JavaRanch! Please adjust your display name to meet the JavaRanch Naming Policy that has gone into effect since you were last here.
You can change it here.

Thanks!
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1. package org.apache.xpath.patterns does not exist
2. package org.apache.xml.utils does not exist
3. package com.sun.rsasign does not exist import com.sun.rsasign.c;

I think they were removed from JDK. Can anyone throw some light on where to find respective jars?

I am certain they are part of JDK1.4. When I look into rt.jar I can see them. But they are missing from JDK1.5's rt.jar.


I think rt.jar is part of the jre and not the jdk (but I could be wrong about that).

for the first two.

Another option would be to extract the necessary jars from the rt.jar and put them into your project.


Jarhoo is a good resource to know about.
[ August 30, 2005: Message edited by: Marilyn de Queiroz ]
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am certain they are part of JDK1.4. When I look into rt.jar I can see them. But they are missing from JDK1.5's rt.jar.


I checked; these classes are indeed in rt.jar of Java 1.4.

But since these classes are not mentioned in the API documentation of J2SE 1.4, you should not have used them in your application. They are not part of the official API, so Sun can remove them as they like in a new version.

Read this, it applies not only to com.sun.* packages but to any package that's not part of the official, documented API:
Why Developers Should Not Write Programs That Call 'sun' Packages

You need to re-write your program so that it isn't dependent on undocumented packages.
 
jayram joshi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Guys. I guess I will have add respective jar files to classpath
Yes I agree one shouldnt use undocumented classes. But I am one of those unlucky ones who needs to work on code I didnt write
 
A timing clock, fuse wire, high explosives and a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic