This repository has been archived by the owner on Jan 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faq2.html
135 lines (133 loc) · 8.08 KB
/
faq2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>How to use Jython from Java</title>
<link rel="stylesheet" href="../cssold/html4css1.css" type="text/css" />
<link type="text/css" href="css/newstyle.css" rel="stylesheet">
<!--[if lt IE 7]>
<script defer type="text/javascript" src="css/pngfix.js"></script>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="css/ddaccordion.js">
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<script type="text/javascript">
ddaccordion.init({
headerclass: "silverheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: true, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})
</script>
</head>
<body>
<div id="container">
<div id="top">
<div id="header">
<div id="grouplogo">
<a href="./" ><img class="logoImage" alt="Jython" style="border: 0px; padding-top: 20px; position:absolute; left: 35px" src="css/jython.png" title="Jython"></a>
</div>
<div class="latest_release" style="position:absolute; color:#000; width:180px; top: 15px; right: 30px; padding:0px 10px 10px 30px; font-size:11px; background:url('css/latest_release_bg.png') no-repeat">
<p style="top: 25px; color:#000">Latest release - 2.5.4rc1<br/>
<a style="color:#000" href="latest.html">View Release Notes</a><br/>
Download: <a style="color:#000" href="http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.5.4-rc1/jython-installer-2.5.4-rc1.jar">.jar</a>
</div>
<div class="searchbox">
<form action="http://www.google.com/search" method="get" class="roundtopsmall">
<input value="www.jython.org" name="sitesearch" type="hidden"><input size="25" id="searchbox" name="q" id="query" type="text">
<input name="Search" value="Search" type="submit">
</form></p>
</div>
</div></div>
<h2 id="topper">Jython: Python for the Java Platform</h2>
<div id="wrapper">
<div id="content"><div class="document" id="how-to-use-jython-from-java">
<h1 class="title">How to use Jython from Java</h1>
<p>There are a variety of ways to use Jython from within Java. Perhaps the most widely used solution is to create an object factory in Java that coerces the Jython object into Java code. There are a multitude of ways create such a factory. Object factories can be created one-to-one with Jython classes, or they can be more loosely-coupled such that one factory implementation would work for any Jython object.</p>
<p>If you are interested in making use of Jython Object Factories and you would like to see some example code, please take a look at the <a class="reference external" href="http://kenai.com/projects/plyjy">plyjy</a> project as it contains working implementations that can be used out of the box.</p>
<p>Please see the book references and articles below for more details on implementing object factories.</p>
<div class="section" id="jython-book">
<h1>Jython Book</h1>
<p><a class="reference external" href="http://jythonpodcast.hostjava.net/jythonbook/en/1.0/JythonAndJavaIntegration.html#using-jython-within-java-applications">Using Jython Within Java Applications</a> - from the Jython Book.</p>
</div>
<div class="section" id="valuable-articles">
<h1>Valuable Articles</h1>
<p>Simple and Efficient Jython Object Factories | <a class="reference external" href="http://wiki.python.org/jython/JythonMonthly/Articles/October2006/3">http://wiki.python.org/jython/JythonMonthly/Articles/October2006/3</a></p>
</div>
</div>
<div class="footer">
<hr class="footer" />
<a class="reference external" href="faq2.txt">View document source</a>.
</div>
</div>
</div>
<div id="navigation"><div class="navcontainer"><ul class="navlist">
<li class="menutitle">About</li>
<li class="menupageitem"><a href="index.html">Welcome</a></li>
<li class="menupageitem"><a href="downloads.html">Download</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/InstallationInstructions">Installation</a></li>
<li class="menupageitem"><a href="http://sourceforge.net/mail/?group_id=12867">Mailing Lists</a></li>
<li class="menupageitem"><a href="license.html">License</a></li>
<li class="menupageitem"><a href="http://www.python.org/psf/">Foundation</a></li>
<li class="menupageitem"><a href="oldsites.html">Archived Sites</a></li>
<li class="menupageitem"><a href="acknowledgments.html">Acknowledgments</a></li>
<li class="menutitle">Documentation</li>
<li class="menupageitem"><a href="currentdocs.html">Current Docs</a></li>
<li class="menupageitem"><a href="http://www.jython.org/devguide/">Core Development</a></li>
<li class="menupageitem"><a href="http://www.jython.org/jythonbook/en/1.0">Jython Book</a></li>
<li class="menutitle">Wiki links</li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/">Front page/News</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/JythonFaq">FAQ</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/WhyJython">Why Jython?</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/UserGuide">User Guide</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/JythonBibliography">Books and Articles</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/JythonMonthly/Newsletters">Jython Monthly</a></li>
<li class="menupageitem"><a href="http://wiki.python.org/jython/ReportingBugs">Reporting Bugs</a></li>
</ul>
</div>
</div>
<div id="extra">
<div class="applemenu">
<div class="silverheader"><a>Using Jython</a></div>
<div class="submenu">
<iframe src="faq.htm" style="border: 0px; width:100%;height:100%"></iframe>
</div>
<div class="silverheader"><a>IRC Chat</a></div>
<div class="submenu">
<iframe style="border: 0px; width: 100%; height: 100%" src="JythonIrcLogin.html"></iframe>
</div>
<div class="silverheader"><a>Developer Information</a></div>
<div class="submenu">
<iframe src="developer.htm" style="border: 0px; width:100%; height:100%"></iframe>
</div>
</div>
<br/><br/>
</div>
<div id="footer">
<ul><li><a href="http://wiki.python.org/jython/JythonFaq">About</a></li>
<li><a href="http://www.jython.org/jythonpodcast/">Jython Podcast</a></li>
<li><a href="license.html">License</a>
</ul>
</div>
</div></body>