What is the clearest way to deprecate a package in Java?

I had to do this recently and used the package-info.java file to deprecate the package.

http://www.intertech.com/Blog/whats-package-info-java-for/

Add a package-info.java file to your package with only the package declaration:

/**
 * @deprecated As of release 2.0, replaced by {@link com.acme.new.package}
 */
@Deprecated
package com.acme.old.package;

In Eclipse, all places where the user imports a class from this package will be underlined with a deprecation warning.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)