当前位置: 技术问答>java相关
javac编译出错,谁帮忙看看什么问题???
来源: 互联网 发布时间:2014-12-26
本文导语: D:weblogicexamplesejbbasicstatelessSession>javac client.java client.java:6: Class javax.ejb.CreateException not found in import. import javax.ejb.CreateException; ^ client.java:7: Class javax.ejb.RemoveException not found in import. import javax.ejb.Remove...
D:weblogicexamplesejbbasicstatelessSession>javac client.java
client.java:6: Class javax.ejb.CreateException not found in import.
import javax.ejb.CreateException;
^
client.java:7: Class javax.ejb.RemoveException not found in import.
import javax.ejb.RemoveException;
^
client.java:8: Class javax.naming.Context not found in import.
import javax.naming.Context;
^
client.java:9: Class javax.naming.InitialContext not found in import.
import javax.naming.InitialContext;
^
client.java:10: Class javax.naming.NamingException not found in import.
import javax.naming.NamingException;
^
client.java:11: Class javax.rmi.PortableRemoteObject not found in import.
import javax.rmi.PortableRemoteObject;
^
client.java:27: Public class examples.ejb.basic.statelessSession.Client must be
defined in a file called "Client.java".
public class Client {
^
7 errors
client.java:6: Class javax.ejb.CreateException not found in import.
import javax.ejb.CreateException;
^
client.java:7: Class javax.ejb.RemoveException not found in import.
import javax.ejb.RemoveException;
^
client.java:8: Class javax.naming.Context not found in import.
import javax.naming.Context;
^
client.java:9: Class javax.naming.InitialContext not found in import.
import javax.naming.InitialContext;
^
client.java:10: Class javax.naming.NamingException not found in import.
import javax.naming.NamingException;
^
client.java:11: Class javax.rmi.PortableRemoteObject not found in import.
import javax.rmi.PortableRemoteObject;
^
client.java:27: Public class examples.ejb.basic.statelessSession.Client must be
defined in a file called "Client.java".
public class Client {
^
7 errors
|
设置classpath,让你的javac能够找到javax.ejb.*和javax.naming.*
|
好问也是错?同意海盗,
你的操作系统要是windows
应该在autoexe.bat中设置
classpath=.;jdk(java所在的目录)要注意等号后的.和;一定要设
你的操作系统要是windows
应该在autoexe.bat中设置
classpath=.;jdk(java所在的目录)要注意等号后的.和;一定要设