`
turingfellow
  • 浏览: 135100 次
  • 性别: Icon_minigender_1
  • 来自: 福建省莆田市
社区版块
存档分类
最新评论

learn for code

    博客分类:
  • jade
JSP 
阅读更多
<%@ page import="jade.core.*" %>
<jsp:useBean id="oldsnooper" class="examples.jsp.Snooper" scope="application">
<% try {
    // Does not work for the moment
    // JADE 1.4 String [] args = {"-platform", "buffer:examples.jsp.Buffer"};
    String [] args = {"-container"};
    jade.Boot.main(args);
    System.out.println("Jade Inited()");
    System.out.println("Start");
    oldsnooper.doStart("oldsnooper");
   } catch (Exception ex) {
       out.println(ex);
   }
%>
</jsp:useBean>

<% oldsnooper.snoop(request.getRemoteHost()+" "+(new java.util.Date())+" "+request.getRequestURI()); %>
<HTML>
<BODY>
It works !!!!
</BODY>
</HTML>

jade启动的方式原来还有jade.Boot.main受教了。把参数放在args里,就像是在用命令行一样。
String[] args2 = { "-gui" };
jade.Boot.main(args2);
Runtime rt = Runtime.instance();
Profile pMain = new ProfileImpl(null, 5689, null);
AgentContainer mc = rt.createMainContainer(pMain);
rt.setCloseVM(false);
try {
AgentController rma = mc.createNewAgent("rma",
"jade.tools.rma.rma", new Object[0]);
rma.start();

} catch (StaleProxyException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
分享到:
评论

相关推荐

    JavaScript for Sound Artists: Learn to Code with the Web Audio API

    Learn how to program JavaScript while creating interactive audio applications with JavaScript for Sound Artists: Learn to Code With the Web Audio API! William Turner and Steve Leonard showcase the ...

    Get Programming - Learn to code with Python.epub

    Lesson 1 - Why should you learn how to program? Lesson 2 - Basic principles of learning a programming language UNIT 1 - VARIABLES, TYPES, EXPRESSIONS, AND STATEMENTS Lesson 3 - Introducing Python: a ...

    code learn for druid db pool

    在"code learn for druid db pool"的学习过程中,我们将深入探讨Druid的核心特性、使用方法以及其在实际项目中的应用。 1. **核心特性** - **高性能**:Druid 提供了优秀的性能,它的设计目标是提供比其他连接池如...

    英文原版-Programming Python Programming Guide For Beginners Learn In a Day 2nd Edition

    Lists, and Dictionaries Creating and Using Classes Modules File I/O and Other I/O Functions Pickles You'll even learn how to handle exceptions, understand the limitations of code, and how to debug ...

    Learn to Program with Python

    Learn how to re-use code by building your own modules Use Python's built-in data structures and packages to represent and make use of complex data from the Internet Who this book is for: This book ...

    24.Patterns.for.Clean.Code

    In this book, you'll learn about Niklaus Wurth's 3-10 rule, speed-documenting tools, and the techniques that keep memory leaks out of your code. Table of Contents Chapter 1. Introduction Chapter 2. ...

    Learn Design for iOS Development

    This book is for iOS developers who know that they can code well, but want to know how they can build apps to also have brilliant designs. This book is also a guide for all iOS app developers who want...

    Code for the book(learn how to use sklearn) 《Python机器学习基础教.zip

    Code for the book(learn how to use sklearn) 《Python机器学习基础教

    3d unit source code for learn mfc c++ phyx

    标题 "3d unit source code for learn mfc c++ phyx" 涉及到的知识点主要是C++编程、MFC(Microsoft Foundation Classes)框架、OpenGL图形库以及PhyX物理引擎。下面将对这些关键领域进行详细介绍。 1. **C++编程**...

    8051 Jam Byte-Code Player

    README File for 8051 Jam Byte-Code Player v1.0 What Does v1.0 Support? The source code supports programming devices from the 8051 family of microprocessors. Jam Byte-Code (.jbc) files from the ...

    Learn Java for Android Development 3rd Edition mobi格式

    Learn Java for Android Development, Third Edition, is an update of a strong selling book that now includes a primer on Android app development (in Chapter 1 and Appendix C, which is distributed in the...

    NetSuite ERP for Administrators 2018

    Learn steps and tasks to help a NetSuite administrator perform both his daily and monthly tasks efficiently. Advance his expertise to become NetSuite leader without having to spend time and money on ...

    Learn Java for Android Development, 3rd Edition

    Learn Java for Android Development, 3rd Edition, is an update of a strong selling book that now includes a primer on Android app development (in Chapter 1 and Appendix C, which is distributed in the ...

    Learn Objective-C for Java Developers 2009 (Apress)

    Learn Objective-C for Java Developers Learn Objective-C for Java Developers will guide experienced Java developers into the world of Objective-C. It will show them how to take their existing language...

Global site tag (gtag.js) - Google Analytics