package com.yuming.util;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.Properties;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import javax.mail.Address;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.Message.RecipientType;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.MimeUtility;
import sun.misc. 64Encoder;
public class 64Util {
/**
* @param args add by zxx ,Dec 30, 2008
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
64Encoder encoder = new 64Encoder();
System.out.println(\"please input user name:\");
String username = new BufferedReader(
new InputStreamReader(System.in))
.readLine();
System.out.println(encoder.encode(username.getBytes()));
System.out.println(\"please input password:\");
String password = new BufferedReader(
new InputStreamReader(System.in))
.readLine();
System.out.println(encoder.encode(password.getBytes()));
}
}
64Encoder encoder = new 64Encoder();这行导包报错
64Encoder 应导入的包是 import sun.misc. 64Encoder;
解决方法:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): ->改为 warning
即可.
继续阅读与本文标签相同的文章
上一篇 :
10进制转换为16进制
-
月神脚本圈:互联网时代日新月异,引流脚本助你抓住商机
2026-05-18栏目: 教程
-
做外贸客户的货物被海关扣押了怎么办?
2026-05-18栏目: 教程
-
小学生发现丰巢快递柜刷脸取件bug 用照片就能打开
2026-05-18栏目: 教程
-
WIPO:中国专利申请量占世界一半 去年申请专利数量达154万件
2026-05-18栏目: 教程
-
Yotta主网上线在即,带你玩转YTA挖矿攻略!
2026-05-18栏目: 教程
