Ant in the tomcat and the use of jike

  Ant in the tomcat and the use of jikes 

  Jikes is a far faster than the speed of java javac compiler. 

  Ant integrated approach: 

  1.   JIKESHOME environment variable set the path for jikes 
  2.   Set ANT_OPTS =- Dbuild.compiler = jikes 
  3.   Jikes path will be added to the system in the PATH 

  Care to distinguish between upper and lower case. 
  Then all the ant task default jikes, and if you want to use in a single project in the ant, do not add ANT_OPTS environment variables, only need to amend the build.xml in the javac compiler for the label jikes, such as: 

   <Javac destdir = "$ () build.dir" debug = "true" deprecation = "false" optimize = "false" failonerror = "true" compiler = "jikes">  

   Jikes values can be set up as follows:  

  •   Classic (JDK 1.1 or 1.2 standards) - javac1.1 and can also be used as an alias javac1.2. 
  •   Modern (JDK 1.3/1.4/1.5 standards) - javac1.3, javac1.4, javac1.5 can be used as aliases. 
  •   Jikes 
  •   Jvc - that Microsoft's compiler 
  •   Kjc - kopi compiler 
  •   Gcj - in the GCC compiler gcj 
  •   Sj - Symantec the java compiler 
  •   Under the existing jvm extJavac decided to use modern or classic mode 

  In addition there are several additional jikes attribute settings: 

  Build.compiler.emacs = false 
  Build.compiler.fulldepend = false 
  Build.compiler.pedantic = false 
  Build.compiler.warnings = true 

  Build.compiler.warnings this attribute best use of labels in the javac nowarn attributes. 
  Build.properties for the preservation of documents in the build.xml in this call: 

   <Property file = "build.properties" />  

  Jikes can use the additional attributes. 

  Tomcat integrated approach: 

  As first set JIKESHOME PATH system and in the web application web.xml add: 

   ?  

<servlet>?
  ????< Servlet-name>? 
  ?? Jsp? 
  ????</ Servlet-name>? 
  ????< Servlet-class>? 
  ?? Org.apache.jasper.servlet.JspServlet? 
  ????</ Servlet-class>? 
  ????< Init-param>? 
  ????????< Param-name> jspCompilerPlugin </ param-name>? 
  ????????< Param-value> org.apache.jasper.compiler.JikesJavaCompiler </ param-value>? 
  ????</ Init-param>? 
  ????< Load-on-startup>? 
  ????- 1? 
  ????</ Load-on-startup>? 
  ????</ Servlet>? 
  ????< Servlet-mapping>? 
  ????????< Servlet-name>? 
  ???????? Jsp? 
  ????????</ Servlet-name>? 
  ????????< Url-pattern>? 
  ????????*. Jsp? 
  ????????</ Url-pattern>? 
  ????</ Servlet-mapping> 

  If you want to use in all WEB use jikes, set environment variables CATALINA_OPTS =- Dbuild.compiler.emacs = true, then open TOMCAT_HOME $ () / conf / web.xml to find: 

<servlet>?
  ????< Servlet-name> jsp </ servlet-name>? 
  ????< Servlet-class> org.apache.jasper.servlet.JspServlet </ servlet-class>? 
  ????< Init-param>? 
  ????????< Param-name> fork </ param-name>? 
  ????????< Param-value> false </ param-value>? 
  ????????</ Init-param>? 
  ????< Init-param>? 
  ????< Param-name> xpoweredBy </ param-name>? 
  ????????< Param-value> false </ param-value>? 
  ????????</ Init-param>? 
  ????< Load-on-startup> 3 </ load-on-startup>? 
  </ Servlet> 

  Read: 

<servlet>?
  ????< Servlet-name> jsp </ servlet-name>? 
  ????< Servlet-class> org.apache.jasper.servlet.JspServlet </ servlet-class>? 
  ????< Init-param>? 
  ????????< Param-name> fork </ param-name>? 
  ????????< Param-value> false </ param-value>? 
  ????</ Init-param>? 
  ????< Init-param>? 
  ????????< Param-name> compiler </ param-name>? 
  ????????< Param-value> jikes </ param-value>? 
  ????</ Init-param>? 
  ????< Init-param>? 
  ????????< Param-name> xpoweredBy </ param-name>? 
  ????????< Param-value> false </ param-value>? 
  ????</ Init-param>? 
  ????< Load-on-startup> 3 </ load-on-startup>? 
  </ Servlet> 
  Posted on 2007-02-05 10:03 larryjava Reading (77) Comments (0) edit collections cited 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags: , ,

Releated Java Articles

Comments

Leave a Reply