-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmsg00022.html
163 lines (133 loc) · 6.99 KB
/
msg00022.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!-- MHonArc v2.3.3 -->
<!--X-Subject: Importing and Using User Defined Classes -->
<!--X-From: "Chuck Irvine" <[email protected]> -->
<!--X-Date: Tue, 25 Jan 2000 23:21:19 -0600 (CST) -->
<!--X-Message-Id: [email protected] -->
<!--X-Content-Type: multipart/alternative -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>Importing and Using User Defined Classes</TITLE>
<LINK REV="made" HREF="mailto:[email protected]">
</HEAD>
<BODY>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
<HR>
[<A HREF="msg00020.html">Date Prev</A>][<A HREF="msg00037.html">Date Next</A>][<A HREF="msg00020.html">Thread Prev</A>][<A HREF="msg00037.html">Thread Next</A>][<A HREF="maillist.html#00022">Date Index</A>][<A HREF="threads.html#00022">Thread Index</A>]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Importing and Using User Defined Classes</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: "BeanShellMailingList" <<A HREF="mailto:[email protected]">[email protected]</A>></LI>
<LI><em>Subject</em>: Importing and Using User Defined Classes</LI>
<LI><em>From</em>: "Chuck Irvine" <<A HREF="mailto:[email protected]">[email protected]</A>></LI>
<LI><em>Date</em>: Tue, 25 Jan 2000 23:23:03 -0600</LI>
<LI><em>Importance</em>: Normal</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<div class=Section1>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'>I’ve just started playing with BeanShell and so far it looks great. But
I can’t figure out how to import my class definition into it. Say I’ve got a file
Foo.java with the contents:<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>class Foo {<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><span style="mso-spacerun: yes"> </span>public
void test() {<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><span style="mso-spacerun:
yes"> </span>System.out.println(“test”);<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><span style="mso-spacerun: yes"> </span>}<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>}<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>Then inside the BeanShell, I want to do something
like:<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>bsh % import Foo;<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>bsh % Foo foo = new Foo();<span style="mso-spacerun:
yes"> </span>------ <span style="mso-spacerun:
yes"> </span>When I hit return here, BeanShell hangs<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>bsh % foo.test();<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>I would love to get this working. Any help would be
much appreciated.<o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal style='text-align:justify'><span class=EmailStyle15><font
size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>Chuck Irvine<o:p></o:p></span></font></span></p>
</div>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00020.html">Re: BeanShell / JBuilder Addin</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00037.html">Re: Importing and Using User Defined Classes</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00020.html">Re: BeanShell / JBuilder Addin</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00037.html">Re: Importing and Using User Defined Classes</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="maillist.html#00022"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="threads.html#00022"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</BODY>
</HTML>