⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serversasl.java

📁 it contains the practical programs in our college
💻 JAVA
字号:
import javax.naming.*;import javax.naming.directory.*;import java.util.Hashtable;/** * Demonstrates how to discover a server's supported SASL mechanisms. * * usage: java ServerSasl */class ServerSasl {    public static void main(String[] args) {	try {	    // Create initial context	    DirContext ctx = new InitialDirContext();	    // Read supportedSASLMechanisms from root DSE	    Attributes attrs = ctx.getAttributes(	"ldap://localhost:389", new String[]{"supportedSASLMechanisms"});	    System.out.println(attrs);	    // Close the context when we're done	    ctx.close();	} catch (NamingException e) {	    e.printStackTrace();	}    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -