J2EE中有一个部署工具,在那上面部署就可以了J2EE1.4中带的jdk是1.4.2_07这个版本,你在安装目录下会有一个jdk目录,在那个目录的bin里面键入java -version 就可以看到jdk版本
解决方案 »
- 用request.getParameter怎么取不出数据啊
- Weblogic+EJB3.0联合开发,这次练习的是调用远程(Remote)无状态(Staless)的SessionBean,不知如何远程调用???
- jsp登陆界面的数据存储方式转变
- 存储过程 中的事务 java
- Myeclipse开发J2EE小程序问题,哪位大哥大姐帮帮忙?
- 请问大虾们一个javaee入门问题
- struts的参数传递问题
- 一个非常简单的页面显示问题
- jbpm4.4 发布流程报错,求大神
- 求weblogic+jbuilder9+oracle9的开发实例(使用EJB)
- 有个字符串LoginID='zzz'@@type='00',如何取出zzz和00
- 如何创建Struts自定义标签
直接用eclipse部署就可以了
About Application Server PE 8
Admin Console
Deploytool
Online Documentation
Sample Applications
Start Default Server
Start PointBase
Stop Default Server
Stop PointBase
重启电脑,在c:\Documents and Settings\Administrator\java -version能显示出版本来,证明我的环境设置应该是没有问题了吧。
但是:import java.awt.*;
import java.awt.event.*;
public class Test{
public static void main(String[] args)
{
System.out.println("HelloWorld!");
}
}
save在%java_home%\bin目录下,运行javac Test.java能正确编译,
但就是不能正常运行报错:Exception in thread "main" java.lang.NoClassDefFoundError:c:\sun\appserver\jdk\bin\Test
为什么呀?
w2k server
j2ee1.4安装在:
c:\sun\appserver
系统变量:
classpath
.;%java_home%\bin;%java_home%\lib;%java_home%\lib\tools.jar
java_home
c:\sun\appserver\jdk
path
%java_home%\bin;%java_home%\jre\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN下边的这段代码,为什么报错呀?import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class hitcountservlet extends HttpServlet
{
public void init(ServletConfig config)
throws ServletException
{
//The ServletConfig object must be passed to the super class
super.init(config);
}
// A counter to keep track of the number of users visiting the website
static int count;
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out=response.getWriter();
count++;
out.println("<html>");
out.println("<head><title>BasicServlet</title></head>");
out.println("<body>");
out.println("You are user number " + String.valueOf(count)+ " visting our web site"+ "\n");
out.println("</body></html>");
}
//Get Servlet information
public String getServletInfo(){
return "BasicServlet Information";
}
}
报错入下:
C:\Documents and Settings\Administrator>javac c:\sun\appserver\jdk\bin\hitcounts
ervlet.java
c:\sun\appserver\jdk\bin\hitcountservlet.java:1: package javax does not exist
import javax.*;
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:2: package javax.servlet does not
exist
import javax.servlet.*;
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:3: package javax.servlet.http does
not exist
import javax.servlet.http.*;
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:6: cannot resolve symbol
symbol : class HttpServlet
location: class hitcountservlet
public class hitcountservlet extends HttpServlet
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:8: cannot resolve symbol
symbol : class ServletConfig
location: class hitcountservlet
public void init(ServletConfig config)
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:9: cannot resolve symbol
symbol : class ServletException
location: class hitcountservlet
throws ServletException
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:17: cannot resolve symbol
symbol : class HttpServletRequest
location: class hitcountservlet
public void doGet(HttpServletRequest request, HttpServletResponse response) thro
ws ServletException, IOException
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:17: cannot resolve symbol
symbol : class HttpServletResponse
location: class hitcountservlet
public void doGet(HttpServletRequest request, HttpServletResponse response) thro
ws ServletException, IOException
^
c:\sun\appserver\jdk\bin\hitcountservlet.java:17: cannot resolve symbol
symbol : class ServletException
location: class hitcountservlet
public void doGet(HttpServletRequest request, HttpServletResponse response) thro
ws ServletException, IOException ^
c:\sun\appserver\jdk\bin\hitcountservlet.java:12: cannot resolve symbol
symbol : variable super
location: class hitcountservlet
super.init(config);
^