Results 1 to 4 of 4
- 10-28-2011, 07:10 AM #1
Member
- Join Date
- Oct 2011
- Posts
- 2
- Rep Power
- 0
package sun.text.normalizer does not exist
I am upgrading our java 1.5 application to 1.6.
In java 1.5 it using sun.text.NormalizerImpl.canonicalDecomposeWithSing leQuotation method. I changed it to 1.6 method sun.text.normalizer.canonicalDecomposeWithSingleQu otation. However, it failed during the build. and got
package sun.text.normalizer does not exist for the line "import sun.text.normalizer.NormalizerImpl"
I wrote a small class:
import sun.text.normalizer.NormalizerImpl;
public class TestNormalizer {
public static void main(String [] args)
{
String result = NormalizerImpl.canonicalDecomposeWithSingleQuotati on("skfjalsfj");
System.out.println("Done:");
}
}
and run in the command line using
java TestNormalizer
I got two errors
D:\tmp>javac TestNormalizer.java
TestNormalizer.java:1: package sun.text.normalizer does not exist
import sun.text.normalizer.*;
^
TestNormalizer.java:7: cannot find symbol
symbol : variable NormalizerImpl
location: class TestNormalizer
String result = NormalizerImpl.canonicalDecomposeWithSingleQuotati on("skfjalsfj");
^
2 errors
However, sun.text.normalizer package is in rt.jar under <JAVA_HOME>/jre/lib
Any idea?
Jia
- 10-28-2011, 08:41 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,408
- Blog Entries
- 7
- Rep Power
- 17
Re: package sun.text.normalizer does not exist
All packages and classes under the sun.* hierarchy are not part of the public API and you're not supposed to use them.
kind regarrds,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 10-29-2011, 03:24 AM #3
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
Re: package sun.text.normalizer does not exist
Also those errors don't go with that code.
- 10-31-2011, 07:02 AM #4
Member
- Join Date
- Oct 2011
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
package jxl does not exist ??? any ideas
By Macca07 in forum New To JavaReplies: 5Last Post: 05-14-2012, 07:38 PM -
package does not exist
By loja11 in forum New To JavaReplies: 2Last Post: 09-25-2011, 04:26 PM -
package does not exist error
By glaze24 in forum New To JavaReplies: 1Last Post: 11-28-2010, 02:03 PM -
package java.text does not exist
By sknn in forum NetBeansReplies: 12Last Post: 02-03-2010, 03:14 PM -
package mj does not exist
By PzK in forum New To JavaReplies: 8Last Post: 12-03-2008, 10:30 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks