当前位置: 技术问答>java相关
各位老大,jndi需要的类怎么在我的jdk1.4.0里面找不到呢?
来源: 互联网 发布时间:2015-10-31
本文导语: 编译的时候出错: E:Javatemp>javac InitCtx.java InitCtx.java:4: cannot resolve symbol symbol : class Sring location: class InitCtx public static void main(Sring [] args) { ^ InitCt...
编译的时候出错:
E:Javatemp>javac InitCtx.java
InitCtx.java:4: cannot resolve symbol
symbol : class Sring
location: class InitCtx
public static void main(Sring [] args) {
^
InitCtx.java:7: package Javax.naming does not exist
env.put(Javax.naming.Context.INITIAL_CONTEXT_FACTORY,"co
m.sun.jndi.fscontext.RefFSContextFactory");
^
InitCtx.java:8: package Javax.naming does not exist
env.put(Javax.naming.Context.PROVIDER_URL,"file:c:\");
^
InitCtx.java:10: package Javax.naming does not exist
Javax.naming.Context ctx=new Javax.naming.InitialContext
(env);
^
InitCtx.java:10: package Javax.naming does not exist
Javax.naming.Context ctx=new Javax.naming.InitialContext
(env);
^
InitCtx.java:13: package Javax.naming does not exist
catch (Javax.naming.NamingException e) {
^
6 errors
要怎样才能弄到这个包呢,最好不要叫我去java.sun.com去下!
E:Javatemp>javac InitCtx.java
InitCtx.java:4: cannot resolve symbol
symbol : class Sring
location: class InitCtx
public static void main(Sring [] args) {
^
InitCtx.java:7: package Javax.naming does not exist
env.put(Javax.naming.Context.INITIAL_CONTEXT_FACTORY,"co
m.sun.jndi.fscontext.RefFSContextFactory");
^
InitCtx.java:8: package Javax.naming does not exist
env.put(Javax.naming.Context.PROVIDER_URL,"file:c:\");
^
InitCtx.java:10: package Javax.naming does not exist
Javax.naming.Context ctx=new Javax.naming.InitialContext
(env);
^
InitCtx.java:10: package Javax.naming does not exist
Javax.naming.Context ctx=new Javax.naming.InitialContext
(env);
^
InitCtx.java:13: package Javax.naming does not exist
catch (Javax.naming.NamingException e) {
^
6 errors
要怎样才能弄到这个包呢,最好不要叫我去java.sun.com去下!
|
这个包在JDK里面就有阿
不用去下载
是不是因为你的那个名字打错了?
大小写的问题?
我看你的那个Java好像是大写的
不用去下载
是不是因为你的那个名字打错了?
大小写的问题?
我看你的那个Java好像是大写的