• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java 8 update 66 cannot find symbol com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable class.

With latest java update (Java8u66) this API got removed.

So i am getting "cannot find symbol com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable " error during compilation.

I am trying for alternative Class / API . Could any one help me on this.




Sample Code



import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
import java.util.LinkedList;


private LinkedList<Object> tableList = null;
private Hashtable toolTipHash = new Hashtable();

.....................
......


LinkedList rowList = (LinkedList)tableList.get(dataRowIndex);

if (!(toolTipHash.containsKey(rowList)))
{

..................
.....




Thanks,
Raghavendra.
 
Marshal
Posts: 79179
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you want to use a Hashtable in the first place? Use a HashMap.
Don't use packages beginning sun and beware of using packages beginning com.sun, as mentioned in this SO thread. You may need to install JavaEE as well as Java8. Alternatively you may want the classes of similar names in the java.util package.
Or, this appears to be the Apache hash table. Different package name. You would probably have to download it from the Apache site and add it to your classpath.
 
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
Did you import the wrong Hashtable? You should probably have used java.util.Hashtable instead of the one in a com.sun... package. And Campbell is right that you should really have used HashMap instead of Hashtable - because Hashtable is a legacy collection class that has been replaced with HashMap since Java 1.2.

Note that everything inside sun.* and com.sun.* and any other package that is not documented in the API documentation is not part of the public API and should not be used in any program you write. Those classes may be modified or removed in future Java versions without warning.

See Oracle's note about this: Why Developers Should Not Write Programs That Call 'sun' Packages.
reply
    Bookmark Topic Watch Topic
  • New Topic