| directly assigning to a field (was Java without OO) |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- 2
- What IDE for Java do you use?nospam wrote:
> Hi...All,
>
> I recently downloaded eclipse IDE with myeclipse web editor
> (myeclipseide.com) . I did not see any views on it in this thread. So,
> would be interested to what your thought are on
> eclipse+myeclipse(struts, EJB....)
The views in Eclipse aren't initially as elaborate as those under WSAD,
but you can change that;
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-02e.htm
and
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-02e.htm
are a good start. Look on sourceforge.net for a variety of plug-ins so
you can enhance your IDE even more. Eclipse Colorer may be of help:
http://eclipsecolorer.sourceforge.net/index_profiler.html and
http://sourceforge.net/projects/eclipsecolorer.
- 2
- Passing large C buffers to Java (via JNI) without copying?I'm trying to determine whether this is even possible... I have a
_very_ large buffer malloc'd on my C heap that I would like to hand
over to Java, preferably as a Byte[]. So far, every example of this
that I have come across involves _copying_ the data from my C buffer
into java storage. Is there any way to avoid this expensive (very
expensive in my case) operation?
- 5
- JProgressBar bar not showing up till completeHi thanks for reading.
Im sure the answer to this is simple, it just eludes me at this point.
Im tring to use a progress bar to simply show the progress of 55 files
being created and saved to disk. However when I use the JProgressBar
in my code, it only shows up when the task is completed... Obviously I
need it to be shown updating the entire time, seems like im missing
something pretty basic.
heres the code for your perusal, the updates occurs later in the code,
but since its not showing up until it is completed I believe the error
is here + Thanks! :
//start up progress FRAME
JFrame jfrProgress = new JFrame("Creating Movie...");
Container contentPane = jfrProgress.getContentPane();
SpringLayout layout = new SpringLayout();
contentPane.setLayout(layout);
//set up progress BAR
JProgressBar pbProgress;
pbProgress = new JProgressBar(ISTARTFRAME, iFinalFrame);
pbProgress.setValue(ISTARTFRAME);
pbProgress.setStringPainted(true);
pbProgress.setString("Step 1 - Creating Files...");
pbProgress.setSize(500, 40);
//add progress bar to frame
jfrProgress.getContentPane().add(pbProgress);
//display frame
jfrProgress.setLocation(400, 300);
jfrProgress.setSize(250, 100);
pbProgress.setVisible(true);
jfrProgress.setVisible(true);
- 6
- Database insert taking a long time and causing 500 errorHi,
My requirement is as follows:
Server: Websphere
Framework: Struts
A user will upload excel file. Excel file will have several rows. For
each row, I need to insert one row in oracle database table. And
finally success message is to be shown to the user.
I read the excel file in action class and call a oracle procedure to
insert the records to database.
The issue is that when the size of excel file is large (containing
several records), it is taking a long time to complete insertion and
it shows Internal Server 500 error on the browser. Passing small set
of records to procedure is also not helping.
I think since there is no response from the app server to the client,
this error is coming. Can anybody suggest how to solve this problem?
Thanks in advance,
Palak
- 10
- [Update] FreeQueryBuilder 2005.05FreeQueryBuilder.2005.05
http://querybuilder.sourceforge.net
FreeQueryBuilder is a GUI SQL client written in 100% Java.
You can create SQL queries without directly writing SQL.
Works with any JDBC compliant database, including
ORACLE, MySQL, HSQLDB, Firebird, SQLServer.
This release includes FreeReportBuilder, a visual report designer.
- 10
- Question regarding Java's OOP implementation.According to Wikipedia, one of the core concepts of OOP is
Encapsulation; being defined as follows: "ensuring that users of an
object cannot change the internal state of the object in unexpected
ways; only the object's own internal methods are allowed to access its
state. Each object exposes an interface that specifies how other
objects may interact with it. Other objects will rely exclusively on
the object's external interface to interact with it." Not that I
regard Wikipedia's definition of OOP as the leading authority, it just
happens to be handy and provides a definition that fits my own ideas.
On to the question; If I create a class called AClass and inside
declare a class level variable with the private modifier and some other
methods, e.g.
public class AClass {
private int number;
public AClass(int num) {
number = num;
}
public void setAnotherAClass(AClass anotherAClass, int num) {
anotherAClass.number = num;
}
public int getAnotherAClass(AClass anotherAClass) {
return anotherAClass.number;
}
public void display() {
System.out.println("Number: " + number);
}
}
And a class to test AClass:
public class Test {
public static void main(String[] args) {
AClass one = new AClass(1);
AClass two = new AClass(2);
one.display();
two.display();
one.setAnotherAClass(two, 3);
two.display();
}
}
I would expect the compiler first to complain that number has private
access in AClass... Barring that I'm not sure what I'd expect it to
complain about, but something doesn't seem right. Child classes
derived from AClass were not able to make changes to objects of type
AClass which is what I would expect. But because one and two are
distinct objects the fact that they belong to the same class shouldn't
mean they can change each other's private instance variables. I
wasn't able to find anything directly relating to the question in an
hour or so of Googling. I also read through Java's tutorials on OOP to
see if they had anything specific to say, which they did not.
Thank you for your time and ideas.
Carl Summers
- 11
- Example of simple SOAP web-service on Resin?Hi group
I want to run my simple web service app on Resin. (I currently run it
on JBoss 3.2.3)
Does anyone have a simple example of how to do this with the
configuration of web.xml etc.?
Thanks in advance
-asciz
- 12
- GeronimoIs there anyone who has successfully run this
application server under freebsd? I have problems
with rmi, but since nobody answered my other post
I suppose nobody else came across the same problem?
- 12
- Things That People Buy .Hi Antonio ,
Of Sun's press release , You scratch out :
" Makes me not want to buy a new PC just yet . "
Oh God ... Don't hold your breath .
While Sun produces these fantastical press releases ,
Asians are actually shipping things that people buy .
- 12
- Sun's OpenJDK in Debian?Hi,
I'm surprised that this wasn't discussed already in the past on this list
(or in the BTS of some important java packages), but what is the status
of Sun's Java architecture in Debian?
It is licensed under GPL2 and should be compatible with DFSG.
As far as I know only a few components are not yet freely available,
especially all which are subject to the Assembly Exception
(http://openjdk.java.net/legal/exception-modules-2007-05-08.html,
http://www.sun.com/software/opensource/java/faq.jsp).
Is this the main blocker for accepting OpenJDK in Debian? Would it be
possible to just omit the binary modules or to replace these with free
implementations from other free projects?
Please CC: me.
Jens
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 13
- Eclipse debugging hanging, causing network problemsHi,
I'm new to Eclipese, and last time I used Java heavily was six years
ago, so may be new to Java as well.
I could install and run Eclipse well, but debugging gives a problem;
after a few (say, 5-10) debugging sessions, the debugger does not
start in the usual way, but gets stuck at launching stage. The status
bar shows "Launching (95%)" and takes minutes to continue from there.
The app is a local java program, very small stuff - a couple of seconds
to run, no network connections etc. If I let the IDE to get past the
launching stage it gives me a debug session, but its either stuck
without running, or extremely slow to run.
Strangely, after this happens, I get other network problems as well -
such as google toolbar (in firefox) being slow to respond etc; The only
remedy is to reboot the machine, and when rebooting, several network
related apps fail to close down and I have to terminate them. I believe
I have reasonably verified that the cause is not an independent network
issue but something associated with the debugger.
.metadata/.log file shows many errors associated with
org.eclipse.jdi.internal, including org.eclipse.jdi.TimeOutException s.
My questions:
1. is this issue known (although I couldn't see anything on the web)
and if so, how can I fix it?
2. Can I setup eclipse to use shared memory transport instead of socket
transport for debugging?
Thanks for your time,
Upali
- 15
- Opening Image files with IE as default always ( using Browser Launcher)Hi,
I have downloaded some image files by connecting to a URL and I am
trying open that image file using BrowserLauncher.
I am using windows xp and the default one to open image files is
windows picture and Fax Viewer.
I could not see the image in Internet Explorer when I am trying to
open the image files. But when I set in the properties of image files
from "windows picture and Fax Viewer" to "Open with internet
Explorer", I could see the image.
Some trasfer details..
File Type : .jpg
HTTP/1.0 200 Ok
MIME-version: 1.0
Content-Length: 297362
Content-type: application/jpg
I tried to change in http headers , but could not succeed in opening
the image.
can anybody suggest me that,
I change the properties of the image file ( or http headers) such that
it should be open with internet explorer by default,after the image
downloaded.
Any suggestions or help is appreciated.
Regards,
Hari.
- 15
- Problem accessing Windows clipboardHi
In my java program I have a class which contains some code which accesses
the Windows clipboard.
When I use this class in a standalone application (JFrame) I can retrieve
data from the clipboard no problem.
When I use this very same class in a JApplet which I run in Internet
Explorer, I cannot get the data from the Windows clipboard.
The line of code that my JApplet gets hung up on is ...
Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
This line of code does execute properly when executed in the standalone
application.
My class does contain the line: import java.awt.datatransfer.*;
I am using the following page from the Java Developer's Almanac as a
reference.
http://javaalmanac.com/egs/java.awt.datatransfer/ToClip.html
is there a known issue with this sort of thing that I don't know about?
Hopefully I have provided enough information for you.
Thanks in advance.
Fred.
- 16
- commons-logging: runtime change of propertiesHi,
I try to use commons-logging with the logs methods of J2SE 1.4.2 to
generalize the logging in my appl.
Doesn't exists a method to upload the defaul file properties of J2SE
at run time and not usig the -D option at startup?
Exists e method to change the propeties of the logger at runtime? for
example the output file path...
Thanks Cristian
|
| Author |
Message |
Thomas Gagn

|
Posted: 2003-11-1 4:11:00 |
Top |
java-programmer, directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>As-far-as-you're-concerned is OO completely defined by Smalltalk practices?
>
>If that's the case then please just write "Smalltalk OO" instead of "OO"
>
Hmm. The point of reading the references might not be to learn
Smalltalk, but to get a different perspective. After having used
Objective-C, C++, Python, and Java (not in that order) I think the
perspective of reading/using other languages is important. It
influences the programmer, and even suggests there may be better
languages to solve problems in than the ones they already use.
I don't think most Java programmers' investment in Java is so frail that
reading a Smalltalk book would shatter their world view. Perhaps it
would simply give them another perspective on their own class designs.
Same reason some people read editorals from multiple political viewpoints.
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-1 4:11:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>As-far-as-you're-concerned is OO completely defined by Smalltalk practices?
>
>If that's the case then please just write "Smalltalk OO" instead of "OO"
>
Hmm. The point of reading the references might not be to learn
Smalltalk, but to get a different perspective. After having used
Objective-C, C++, Python, and Java (not in that order) I think the
perspective of reading/using other languages is important. It
influences the programmer, and even suggests there may be better
languages to solve problems in than the ones they already use.
I don't think most Java programmers' investment in Java is so frail that
reading a Smalltalk book would shatter their world view. Perhaps it
would simply give them another perspective on their own class designs.
Same reason some people read editorals from multiple political viewpoints.
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-1 4:23:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
> Isaac Gouy wrote:
>
> >Thomas!
> >Isn't it the case that the standard Smalltalk solution for this task
> >is to split the responsibilities - the collection classes are given
> >responsibility for iterating over the list elements and holding an
> >accumulator value, and the client class is given responsibility for
> >implementing the accumulation?
> >
> > L inject: 0 into: [:sum :each | sum + each]
> >
> >Anyone whose used a functional programming language would recognise
> >the similarities to the fold function. Interesting that Smalltalk has
> >long provided support for a functional programming style.
> >
> >in Nice
> > foldLeft(L, (int sum,int each)=>{return sum+each;}, 0);
> >in Clean
> > foldl (+) 0 L
> >
> >Strange then that the functional language Clean provides a standard
> >function 'sum' and yet VisualWorks doesn't...
> >
> Personally, I was surprised as well, but realized that sum, min, max,
> and other things are easily implemented.
Serves me right for being sarcastic ;-)
More-like it just isn't worthwhile implementing "sum" in a general
framework - inject:into: and fold provide a much more generally useful
abstraction. The rationale for providing a specific implementation of
"sum" in Clean seems to be code optimization.
> Because everything is an
> object I can extended it at will.
You can extend it at will because you have the source code! It really
has nothing to do with "everything is an object" - Clean is functional
not OO, and yet I can change all kinds of things.
> Does Nice's sum, min,max functions allow it to work on Strings or only
> numbers?
Nice didn't have a "sum" function last-time I looked.
Clean (which I did mention) defines sum for any type that defines +
and zero. And happily, zero is *not* defined for String. Do you think
"sum" makes sense for something that isn't a number?
Clean max and min are defined for types that define ordering
functions, and happily, "<" is defined for String.
> How about BigDecimal and integers in the same collection?
Have you forgotten about Haskell integers already?
The same approach can be taken in Nice - I would guess that many other
"features" will be considered more important.
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-1 5:25:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote
-SNIP-
> Stroustrup might suggest that such a method is inappropriate inside
> Person because it doesn't defend the invariants. It has little to do
> with state, but belongs elsewhere. I guess we'd have to create another
> class that holds the multiple versions of getAThing() because it doesn't
> belong inside Person.
>
> Now, fetching a beer may be too-simple an example
Just too simplistic and vague a basis for reasoned discussion. Would
any OO designer really place every aspect of behaviour in a Person
object? Seems more likely that the design would factor behaviour into
separate Roles. (Buying alcohol isn't a role we'd give a 5 year
Person.)
> but if
> variant-defending-methods-only complicates something as simple as that
> and static typing complicates it even further, it doesn't sound like a
> pattern with promise.
Seems you mean "java 1.4 static typing" rather than "static typing".
Languages exist that implement both polymorphism and static type
checking.
|
| |
|
| |
 |
Jorn W Janneck

|
Posted: 2003-11-1 7:15:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
"Thomas Gagn? <email***@***.com> wrote in message
news:email***@***.com...
> Jorn W Janneck wrote:
[snip]
> >well, the language i gave my examples in was not statically typed, and it
> >was not java, so really none of what you say above really applies, does
it.
> >
> Evidentally, not to your language.
neither does it apply to the topic of this thread, which, as my examples
show, is pretty orthogonal to issues of static typing. or java, its name
(java without oo) notwithstanding.
> Which is great. But being in
> c.l.j.a. it does apply. It wouldn't make sense for BOTH of us to be
> talking about different languages in c.l.j.a., would it?
you are having it backwards, though. the design principle which is under
discussion here, is a general one, which has no special connection to either
static typing or java. you occasionally tried to cast it in the light of
working around a shortdoming of either statically typed languages in general
or java in particular. in truth, it has pretty much nothing to do with any
specific programming language, so it would be intellectually appropriate to
discuss it that way. even in clja.
-- j
|
| |
|
| |
 |
Jorn W Janneck

|
Posted: 2003-11-1 7:24:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
"Thomas Gagn? <email***@***.com> wrote in message
news:email***@***.com...
> Jorn W Janneck wrote:
>
> >if you like to quote graham, you will also know what he thinks about
"being
> >oo":
> > http://www.paulgraham.com/noop.html
> >
> >
> Great short essay. Thanks for pointing it out.
>
> He doesn't particularly idientify which of the 1 1/2 points he
> considered good (if 3 1/2 are bad), but a quick trip through them seems
> to indicate to me a distaste for OO ala C++/Java. The positive part of
> #4 can be applied to Smalltalk and *few* other OOPLs. #5 would
> generally apply to all OOPLs.
yeah, right, i am sure paul graham has also misunderstood "oo." i think you
should let him know.
btw, i actually do not think it's a very good essay, and i also do not share
you high opinion of graham's writings. i just thought that since you quote
him liberally yourself, you should not miss out on him fundamentally
disagreeing with you (actually, i am kinda surprised that you did not know
it, since his list of articles is rather short, and that is the only one
that deals directly with your pet subject "oo"). but, it seems, reading it
*the right way* brings things back into order, so that is fine.
-- j
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-1 11:42:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
> Isaac Gouy wrote:
>
> >As-far-as-you're-concerned is OO completely defined by Smalltalk practices?
> >
> >If that's the case then please just write "Smalltalk OO" instead of "OO"
> >
> Hmm. The point of reading the references might not be to learn
> Smalltalk, but to get a different perspective.
Replying to straightforward questions with koans is evasive. Evasions
don't make people interested in learning about Smalltalk.
*online* references are more accessible - Responsibility Driven Design
http://www.wirfs-brock.com/pages/resources/html/implementing_scenarios.html
> After having used
> Objective-C, C++, Python, and Java (not in that order) I think the
> perspective of reading/using other languages is important.
Humbly suggest that the last languages you should learn are Lisp or
Erlang - there's nothing there to challenge your opinions. Learn a
modern statically checked language - Nice, Clean, Haskell - learn how
to use polymorphism in a statically checked language. That will
challenge your opinions.
> I don't think most Java programmers' investment in Java is so frail that
> reading a Smalltalk book would shatter their world view.
I've just been trying to have you spell out exactly what you mean by
OO, since you justified putting 'sum' into the collection hierarchy
"Because it's OO."
There are many things we'd want to hold in a collection for which
'sum' is completely meaningless, so I'm struggling to understand in
what sense this design decision is OO.
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-2 6:45:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>><snip>
>>
>
>You can extend it at will because you have the source code! It really
>has nothing to do with "everything is an object" - Clean is functional
>not OO, and yet I can change all kinds of things.
>
True, but for different reasons. I can change the functionality of an
everything-is-an-object language by adding methods, which isn't far
simpler than modifying the source code. It's not like I have to change
the parser or the language's syntax.
><snip>
>
>Clean (which I did mention) defines sum for any type that defines +
>and zero. And happily, zero is *not* defined for String. Do you think
>"sum" makes sense for something that isn't a number?
>
I don't today. But I might tomorrow. The "sum" of the collection
#(apple orange) might be apple+orange. I may not need it today but
should be free to implement it tomorrow. Why should a language get in
the way?
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-3 3:44:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
"Jorn W Janneck" <email***@***.com> wrote
> > William Cook argued that these are complementary techniques - "classes
> > are able to express both ADTs and PDA (sic OO) syntactic form, but the
> > distinction between the two techniques still exists, and the practical
> > trade-offs are still operative." page 17
> >
> > http://www.cs.utexas.edu/users/wcook/papers/OOPvsADT/CookOOPvsADT90.pdf
>
> interesting paper, i will have a closer look
Did you come to any other conclusions?
Here's another example:
java.util.Collections
public static void sort(java.util.List list);
VW Smalltalk - SequenceableCollectionSorter
SequenceableCollectionSorter sort: aCollection
The aim of both methods is to take an ordered but unsorted collection,
and sort that collection in-place. The Java static method is defined
along with other static methods in a utility class; the Smalltalk
class-side method is defined (with 3 variants) in it's own utility
class.
In this case, we could copy the Smalltalk technique in Java - define a
new class responsible for sorting ordered collections. We could
approximate the Java technique in Smalltalk - instead of creating a
Sorter object with state, we could hold all the state in temporary
method variables and define all the sort functionality in a single
method.
Back to William Cook's paper - in one case, we are organising code
around object constructors; in the other, we are organising code
around operations.
It helps me be conscious of the differences and trade-offs, if we can
talk of the former as an OO style, and the latter as an ADT style.
Unfortunately it's difficult to get past, OO good, anything else bad.
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-3 5:49:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
> Isaac Gouy wrote:
> >You can extend it at will because you have the source code! It really
> >has nothing to do with "everything is an object" - Clean is functional
> >not OO, and yet I can change all kinds of things.
> >
> True, but for different reasons. I can change the functionality of an
> everything-is-an-object language by adding methods, which isn't far
> simpler than modifying the source code.
Some kinds of extension are easier with an OO style, and some kinds of
extension are harder.
Slide 24 - http://pauillac.inria.fr/~xleroy/talks/icfp99.ps.gz
(Also William Cook's paper)
> >Clean (which I did mention) defines sum for any type that defines +
> >and zero. And happily, zero is *not* defined for String. Do you think
> >"sum" makes sense for something that isn't a number?
> >
> I don't today. But I might tomorrow. The "sum" of the collection
> #(apple orange) might be apple+orange. I may not need it today but
> should be free to implement it tomorrow. Why should a language get in
> the way?
Implement + and zero for "fruits", and "sum" would provide your answer
for this debased notion. The programming language doesn't get in the
way.
(You are free to define "sum" as convert-to-lemon if you wish)
Do the books you referenced advise forcing special-purpose-behavior
into general-purpose classes; or, instead, do they suggest creating a
special FruitCollection class (using some basic Collection class to
hold state)?
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-3 9:53:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
>
>
>>Isaac Gouy wrote:
>>
>>
>>>You can extend it at will because you have the source code! It really
>>>has nothing to do with "everything is an object" - Clean is functional
>>>not OO, and yet I can change all kinds of things.
>>>
>>>
>>>
>>True, but for different reasons. I can change the functionality of an
>>everything-is-an-object language by adding methods, which isn't far
>>simpler than modifying the source code.
>>
Of course, I meant to say, "..which IS far easier .."
>
>Some kinds of extension are easier with an OO style, and some kinds of
>extension are harder.
>Slide 24 - http://pauillac.inria.fr/~xleroy/talks/icfp99.ps.gz
>
I don't understand how "Adding a new operation over all things" requires
OO languages adding a new method to every class. Why wouldn't adding a
method to Object take care of that?
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-3 10:37:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
>
>
>>Isaac Gouy wrote:
>>
>>
>>
>>>As-far-as-you're-concerned is OO completely defined by Smalltalk practices?
>>>
>>>If that's the case then please just write "Smalltalk OO" instead of "OO"
>>>
>>>
>>>
>>Hmm. The point of reading the references might not be to learn
>>Smalltalk, but to get a different perspective.
>>
>>
>
>Replying to straightforward questions with koans is evasive. Evasions
>don't make people interested in learning about Smalltalk.
>
You're too generous. The question didn't sound straightforward. I
apologize.
><snip>
>
>
>Humbly suggest that the last languages you should learn are Lisp or
>Erlang - there's nothing there to challenge your opinions. Learn a
>modern statically checked language - Nice, Clean, Haskell - learn how
>to use polymorphism in a statically checked language. That will
>challenge your opinions.
>
Noted.
>>I don't think most Java programmers' investment in Java is so frail that
>>reading a Smalltalk book would shatter their world view.
>>
>>
>
>I've just been trying to have you spell out exactly what you mean by
>OO, since you justified putting 'sum' into the collection hierarchy
>"Because it's OO."
>
>There are many things we'd want to hold in a collection for which
>'sum' is completely meaningless, so I'm struggling to understand in
>what sense this design decision is OO.
>
Perhaps I ought to. And perhaps I'm wrong. As a programmer I'm always
wondering what an object can do for me to make my problem easier to
solve. I think about what similar problems I might have in the future
that could be easily solved today. Adding #sum and #sum: to Collection
is one of them. Whether or not #sum is meaningless to collections of
flowers doesn't make a difference, because I won't try to #sum flowers,
or anything else unless it makes sense to. I'm the programmer. I know
when I have a collection of flowers and when I don't. If I have a
collection of numbers, or equations, or portfolios, or accounts, or
stocks, or anything else and I need to use #sum, I can.
This isn't unique to OO languages. Procedural abstractions tend to push
implementation details further down so that the code "higher-up"
contains more problem-domain code than "language-domain" code.
Iterators and for-loops are predominantly language domain and not
problem-domain. Burying the details of iterating inside a collection is
equivalent to the approaches of procedural abstraction or good
structured code.
Objects should be able to decide how they'll respond to messages.
Putting the responsibility for that response inside an object makes
better sense than having the responsibility outside. When it's inside
the object takes that behavior with it wherever it might be used. If
not implemented inside, then something else must travel around with the
object, and must somehow connect to the class, document how its
connected, and get a subsequent programmers attention to look there
first for extended class behaviors.
How many commands do we require end-users to enter to get our programs
to run? Is it better for end-users to /have/ to do more commands or
fewer? Why not consider the end-users of our objects and require less
from them--especially when we are often our own objects' end-users?
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-3 11:09:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
><snip>
>
>
>
>Did you come to any other conclusions?
>
See below.
>
>Here's another example:
> java.util.Collections
> public static void sort(java.util.List list);
>
> VW Smalltalk - SequenceableCollectionSorter
> SequenceableCollectionSorter sort: aCollection
>
>The aim of both methods is to take an ordered but unsorted collection,
>and sort that collection in-place. The Java static method is defined
>along with other static methods in a utility class; the Smalltalk
>class-side method is defined (with 3 variants) in it's own utility
>class.
>
Both are really constructed very similarly. But the biggest difference
between them is in why they exist. All ST Collection subclasses know
how to sort themselves. I can not do the same in Java's collection
hierarchy.
java.util.Collections.sort() can sort objects implementing all 24 of
List's methods, while Smalltalk's SequenceableCollectionSorter requires
only three methods be implemented.
>
>In this case, we could copy the Smalltalk technique in Java - define a
>new class responsible for sorting ordered collections. We could
>approximate the Java technique in Smalltalk - instead of creating a
>Sorter object with state, we could hold all the state in temporary
>method variables and define all the sort functionality in a single
>method.
>
Both are similar. If you /have/ to sort a collection of objects from
the outside the collection of objects both work. If you want to do the
sort in-place, both work, and I'm OK with that (I think).
>
>Back to William Cook's paper - in one case, we are organising code
>around object constructors; in the other, we are organising code
>around operations.
>
Both are fine (I think--I found his paper hard to read). What would
Cook say about a collection knowing how to sort itself?
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-4 1:21:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message
-SNIP-
> >Some kinds of extension are easier with an OO style, and some kinds of
> >extension are harder.
> >Slide 24 - http://pauillac.inria.fr/~xleroy/talks/icfp99.ps.gz
> >
> I don't understand how "Adding a new operation over all things" requires
> OO languages adding a new method to every class. Why wouldn't adding a
> method to Object take care of that?
This isn't intended to be ad hominem:
Have you read the books you referenced?
Kent Beck's "Smalltalk Best Practice Patterns"
Simon Lewis' "The Art and Science of Smalltalk."
Do those authors give examples that would make you believe adding
methods to Object is good design in Smalltalk? Check those books and
let's see the examples.
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-4 2:29:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
> Isaac Gouy wrote:
-SNIP-
> >I've just been trying to have you spell out exactly what you mean by
> >OO, since you justified putting 'sum' into the collection hierarchy
> >"Because it's OO."
> >
> >There are many things we'd want to hold in a collection for which
> >'sum' is completely meaningless, so I'm struggling to understand in
> >what sense this design decision is OO.
> >
>
> Perhaps I ought to. And perhaps I'm wrong. As a programmer I'm always
> wondering what an object can do for me to make my problem easier to
> solve. I think about what similar problems I might have in the future
> that could be easily solved today. Adding #sum and #sum: to Collection
> is one of them. Whether or not #sum is meaningless to collections of
> flowers doesn't make a difference, because I won't try to #sum flowers,
> or anything else unless it makes sense to. I'm the programmer. I know
> when I have a collection of flowers and when I don't. If I have a
> collection of numbers, or equations, or portfolios, or accounts, or
> stocks, or anything else and I need to use #sum, I can.
Would you also allow the OrderedCollection>>addFirst: to be defined on
SortedCollection? You're the programmer. You know when you have an
OrderedCollection rather than a SortedCollection.
addFirst: is meaningless for a SortedCollection, so VW Smalltalk
defines SortedCollection>>addFirst: as 'self shouldNotImplement'
Why do you imagine 'shouldNotImplement' exists?
> This isn't unique to OO languages. Procedural abstractions tend to push
> implementation details further down so that the code "higher-up"
> contains more problem-domain code than "language-domain" code.
> Iterators and for-loops are predominantly language domain and not
> problem-domain. Burying the details of iterating inside a collection is
> equivalent to the approaches of procedural abstraction or good
> structured code.
Collection>>do: aBlock
That's abstract, so abstract that the implementation is a subclass
responsibility.
Collection>>inject: thisValue into: binaryBlock
That's abstract, but more special purpose than do: and defined in
terms of do:
(Jorn would suggest we should define this in it's own lexical context
to make clear that it only operates on a collection's public
interface.)
Collection>>sum ??? "total resulting from addition"
This is in the problem-domain of arithmetic. It's 2 steps away from
being an abstract iterator.
L inject: 0 into: [:sum :each | sum + each]
-SNIP rhetoric-
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-4 3:11:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
> Isaac Gouy wrote:
> >Here's another example:
> > java.util.Collections
> > public static void sort(java.util.List list);
> >
> > VW Smalltalk - SequenceableCollectionSorter
> > SequenceableCollectionSorter sort: aCollection
> Both are really constructed very similarly. But the biggest difference
> between them is in why they exist. All ST Collection subclasses know
> how to sort themselves.
This is either incorrect, or so vague as to be misleading.
All ST Collection subclasses know how to add their contents into a new
SortedCollection - only instances of SortedCollection 'know how to
sort themselves'.
-SNIP-
> >Back to William Cook's paper - in one case, we are organising code
> >around object constructors; in the other, we are organising code
> >around operations.
> >
> Both are fine (I think--I found his paper hard to read).
So you've changed your opinion?
Earlier, you didn't think OO was an organization principal, and in
several threads you've objected to utility classes (organising code
around operations).
(Maybe read the paper a couple more times?)
> What would
> Cook say about a collection knowing how to sort itself?
I'm not his spokesperson.
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-4 6:14:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>Thomas Gagn?<email***@***.com> wrote in message
>-SNIP-
>
>
>>>Some kinds of extension are easier with an OO style, and some kinds of
>>>extension are harder.
>>>Slide 24 - http://pauillac.inria.fr/~xleroy/talks/icfp99.ps.gz
>>>
>>>
>>>
>>I don't understand how "Adding a new operation over all things" requires
>>OO languages adding a new method to every class. Why wouldn't adding a
>>method to Object take care of that?
>>
>>
>
>This isn't intended to be ad hominem:
>
>Have you read the books you referenced?
>Kent Beck's "Smalltalk Best Practice Patterns"
>Simon Lewis' "The Art and Science of Smalltalk."
>
>Do those authors give examples that would make you believe adding
>methods to Object is good design in Smalltalk? Check those books and
>let's see the examples.
>
Simon Lewis' book both cautions and encourages modifying system classes.
Another reference (I can't find right now) suggested adding to Object's
"testing" protocol to determine if an object might be able to do
something or be part of a class hierarchy without testing for the class
by name. I'll find the reference, else I suspect I wouldn't have tried it.
For instance (and I may find another way around it) I implemented a
mechanism allowing me to build and solve algebraic expressions using
standard Smalltalk syntax. Yes, the code
result := #apple + #orange
evalutes to apple+orange. It's proven valuable for working in mixed
currencies as well as arithmetic using weights and measures. The whole
thing made much easier by being able to determine if the object I'm
trying to add is a product (two expressions multipled together). It was
discouraged by more experienced programmers to test an object's
ancestory using #isKindOf:, but you probably already know why so I'll
spare you the details.
Perhaps because Smalltalk is dynamically typed and you can /attempt/ to
do anything with any object, it is not unusual to ask an object if it
#isSomething before proceeding. I found several in addition to my own
inside my VW image's Object's "testing" protocol.
For example, in Smalltalk I can ask if an object #isNil. Object defines
#isNil as returning false, while UndefinedObject returns true.
>
>
>
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-4 15:08:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
Wouldn't you define a class Fruit and define operations on it?
Why are you messing with Symbol?
> It's proven valuable for working in mixed
> currencies as well as arithmetic using weights and measures.
Wouldn't you define a class Money that held both a value and currency?
> I found several in addition to my own
> inside my VW image's Object's "testing" protocol.
Unlike your new method sum: the testing methods don't require shouldNotImplement.
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-4 21:16:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
>
>Wouldn't you define a class Fruit and define operations on it?
>Why are you messing with Symbol?
>
I didn't think it made sense (early) to mess with String because I
didn't want to incur the overhead of testing = instead of ==. It didn't
make sense to create a class, Fruit or otherwise, because I wanted the
algebra to work within the syntax of Smalltalk literals. So that "z :=
2 * #x * #y" would result in z = 2xy. Then "z/#y" = "2y". Sybols are
treated simply as variables. Their names can be simple or words.
Expressions can be simplified by providing a dictionary of
equivalences. For instance, in=2.54cm would allow me to reduce an
exression using both inches and centimeters to one or the other. Best
of all, the expressions work (resolved or not) with or without the
equivalences. The expressions can be shown to a human without the
program really knowing what they are. It's proven valuable for dealing
with unit conversions I either know about ahead of time or don't know
about. If you order 2000 LB of sheet metal at $US3.17/LB and receive
1100lb, what is owed? Two different answers (both correct) are possible
depending if the equivalence, LB=100lb, is known.
>
>
>
>>It's proven valuable for working in mixed
>>currencies as well as arithmetic using weights and measures.
>>
>>
>
>Wouldn't you define a class Money that held both a value and currency?
>
Sure, but I want to store $US3.17/LB as an expression without having to
parse it. It's really easy if US and LB are variables and your system
knows to store products (3.17 * US) and divisions (3.17 * US) / LB, so
that later when we figure out (1.1 * LB) was delivered the resolver
knows it can reduce the expression by canceling out LB, leaving (3.17 *
US * 1.1), resulting in $US3.49.
>> I found several in addition to my own
>>inside my VW image's Object's "testing" protocol.
>>
>>
>
>Unlike your new method sum: the testing methods don't require shouldNotImplement.
>
So? When was the last time you got a type-error becuase you tried to do
math on flowers? I bet you haven't (not specifically flowers, but any
array, arrayList, vector, of non-numeric types) tried to do math on a
collection of objects math didn't make sense for. The big hint of a
variable being called flowerCollection might have suggested it was a bad
idea.
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
igouy

|
Posted: 2003-11-5 4:01:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
> It didn't
> make sense to create a class, Fruit or otherwise, because I wanted the
> algebra to work within the syntax of Smalltalk literals.
Why?
> >Wouldn't you define a class Money that held both a value and currency?
> Sure, but I want to store $US3.17/LB as an expression without having to
> parse it.
This seems to be the motivation that drove your decisions - how to
avoid parsing expressions? TGen is a fine Smalltalk parser generator.
The most obvious example of symbolic arithmetic in Smalltalk is the
Fraction class - why not use that as the model for your design?
Here are some more examples:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Jan.Bytesmiths-3006951317430001%40138.120.62.112
> >Unlike your new method sum: the testing methods don't require shouldNotImplement.
> So? When was the last time you got a type-error becuase you tried to do
> math on flowers?
shouldNotImplement is a statement about the design intention.
From what you've written, I have the impression that there are ideas
about OO design which are missing. It's not about type checking! It's
about creating cohesive classes with tightly related responsibilities
(remember CRC cards?)
Wirfs-Brock have been writing about this since Tektronix Smalltalk
http://www.wirfs-brock.com/pages/resources.html
http://www.wirfs-brock.com/pages/events_overview.html
|
| |
|
| |
 |
Thomas Gagn

|
Posted: 2003-11-5 10:47:00 |
Top |
java-programmer >> directly assigning to a field (was Java without OO)
Isaac Gouy wrote:
>Thomas Gagn?<email***@***.com> wrote in message news:<email***@***.com>...
>
>
>
>>It didn't
>>make sense to create a class, Fruit or otherwise, because I wanted the
>>algebra to work within the syntax of Smalltalk literals.
>>
>>
>
>Why?
>
Smalltalk programmers already know algebra and Smalltalk. Why do I need
to create yet something else to parse?
>
>
>
>>>Wouldn't you define a class Money that held both a value and currency?
>>>
>>>
>>Sure, but I want to store $US3.17/LB as an expression without having to
>>parse it.
>>
>>
>
>This seems to be the motivation that drove your decisions - how to
>avoid parsing expressions? TGen is a fine Smalltalk parser generator.
>
>The most obvious example of symbolic arithmetic in Smalltalk is the
>Fraction class - why not use that as the model for your design?
>
I did. The base object is an expression specifying the operator (*/+-),
that has a left and right nodes. It has subclasses implementing the
operators that behave according to the operation attempted on them.
--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Eclipse IDE Javadoc TooltipsHi:
I'm using the Eclipse IDE for Java development, but am running into
some problems with the "Content\Code Assist" feature. Normally, when I
partially enter the name of a particular class of package, the IDE
automatically displays possible completions based on that string of
text. However, the IDE is also supposed to show me the associated
Javadoc for that class.
I know that this feature is enabled because it is able to show me the
associated Javadocs for any classes that I write myself and reside in
the current project.
I have set the Javadoc location for that project to the following
directory (gotten after unzipping the documentation download file):
file:/E:/Java API/docs/api/
However, it does not show any Javadocs for the other classes that are
in the Java API.
Can anyone help out?
Thanks,
- ADH
- 2
- Converting byte array to stringHi,
I am trying to convert a byte array to a string. I am using the
possible ways
but not getting the result.
DatagramPacket dgram = new DatagramPacket(buf, buf.length);
ByteArrayInputStream byteIn = new ByteArrayInputStream (dgram.getData
(), 0, dgram.getLength ());
ObjectInputStream oin = new ObjectInputStream(byteIn);
Object obj = oin.readObject();
String recvString = obj.toString();
DataInputStream dataIn = new DataInputStream (byteIn);
String recvString = dataIn.readLine();
String recvString = new String(dgram.getData(),0,dgram.getLength());
String recvString = dataIn.readLine();
I am trying all these to convert my byte array to a string
But I am getting exception as invalid header.
Can anybody please suggest me.
Regards,
Hari.
- 3
- J2ME . How do I start?Hello,
I need to write an application for MIDP 2.0 phones. Once I write the
application, will it work on every phone that supports MIDP 2.0? What is
the best way to get started? Which tools should I use? Any online tutorial
videos or good books? Thanks a lot.
T.I.
- 4
- Java help websiteI am very new for Java programming, and I am looking for some Java help
website with a lot of examples and explan, anyone can help
- 5
- Web Services Performance problemI am trying to use web services in our project in websphere server, In
this we are using swing as client to connect the EJB, which is running
thru web services. we are able to connect EJB and get the response
from websphere server using web services. The below code is in EJB as
business method
public Vector getData(){
Vector v = new Vector();
for(int i=0;i<20000;i++)
v.add("String");
return v;
}
I use SOAP RPC encoding and in the client side i use SOAP.jar to
connect the web service and get the response.
but it takes around 8 seconds to get the response.
at the same time, i used below code in EJB as business method
public Vector getData(){
Vector v = new Vector();
for(int i=0;i<20000;i++)
v.add(new DataObject("String"));
return v;
}
public class DataObject{
String str = null;
public DataObject(String data){
str = data;
}
public String getData(){
return str;
}
public void setData(String data){
this.data = data;
}
}
here, i create object for my own DataObject class.
now i connect to this EJB, it takes double the amount of time to get
the response.
Please help me, Is there any other way to increase the performance of
web services?
Thanks,
Raja
- 6
- stability problems under eclipse on amd64 platform
I would like the following patch file to be tested and committed to the
java/jdk15 port until patch 6 is released on FreeBSD. This patch has
eliminated crashes for me and has made a significant difference in the
stability of eclipse.
Cheers,
Sean
- 7
- Using Using EventListenerList for non gui object listeningI have a non gui object that i would like to make available for
listeners but instead of using collection/list i am using the class
javax.swing.event.EventListenerList to hold my listeners.
I understand that if it's non gui then i should not involve gui classes.
However, is this acceptable?
- 8
- java access to USB MAC OS XI have a simple requirement at this point an Apple MAC OS X - that is
to detect the presence or lack of a USB device from java.
I have read about JSR 80, javax.usb, jUSB and all indicate not
available in Mac OS X.
I also know that in linux, I can do a "cat /proc/bus/usb/devices" and
get a list of devices connected to the machine.
Now Mac OS X is "linux" - yet there doesn't appear to be /proc/dev/...
etc.
Any suggestions on how to get the presence or lack of a USB device
from java on Mac OS X??
- 9
- help me finding pathHi,
How to find the Path String from jrePath to jawtPath?
Thanks,
Sri
--
Message posted via http://www.javakb.com
- 10
- Java 1.5 and system fontsHi,
I don't know if this is the right group to ask this (if not, where
should I post?), but here we go: I have two machines, both running
Debian, and installed the official Sun JDK (1.5.0_05) on both. Here's
the question: on one machine, Java applications find all fonts that
have been installed on the system; on the other, Java applications only
find a very small set of standard fonts.
Obviously, there must a difference between the two systems (they are
certainly not identical, although they are pretty similar) -- but I
can't think what it could be. It is certainly not a configuration in
the JDK itself, because the two installations on both machines are
identical (I even diff-ed both directories to be sure :-) What I don't
know is how to make fonts available to the JVM - or, what I have done
wrong/correct on either machine. I know the fonts have been installed,
because running Gimp (for instance) on either machine finds all the
fonts. The fontconfig configuration in /etc/fonts is also identifical
as far as I can see (I don't know if that has anything to do with
anything, but I checked anyway :) Also, both systems are running defoma
(the Debian font manager), but I don't know if that can help in any way
here.
Any pointers or hints would be appreciated,
Thanks,
Edsko
- 11
- which vs thatI am writing documentation, and I dawned on me that I don't know the
difference between "which" and "that". I have a vague intuition which
to use, but there is no logic behind it.
In fact I don't think I could define the difference between
what, which and that.
I suspect "which" has to do with picking one from a small set, where
"that" provides an algorithm for inclusion.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 12
- finding text in formatted JTextPane by using scannerHello I'm trying to create a program, which reads text from a text
file, by using a scanner, finds definitions for particular phrases,
depending on a rule list and stores the data in a list, by using
objects. For example, there is a rule list with the rules : is
/sentence, means /sentence, is referred to /sentence. If the user
insert the term Hypertension, then there will be a search on the
textfile by using the scanner, find the sentences that contain the
expressions from the rulelist and store them in objects ( Hypertension
is referred to blah blah blah). Each time I create an object, I store
to it the index where the sentence starts and where the sentence ends..
Now the hard part. I display the data in a jlist. They are of the form:
sentencestart, sentenceend,sentence. I need when a user clicks on an
object of this list, a JPane window to popup with the original text
(formatted) and highlight the sentence. The problem that I have is that
while I am using scanner to retrieve the words, it doesn't count the
line return character. So each time I save the place the sentence
starts and ends, it doesn't take in consideration the line return
characters. That leads the program to highlight wrong characters in the
JTextPane.
Is there any way, when I use the scanner, each time it finds a line
break or return character to take it in consideration?
Thank you... :)
- 13
- visit http://www.real-article.com/java/index.phpThe www.real-article.com website provides a ton of information about
java. In addition, you will find extensive information on leading java
to help you on your way to success.
Please have a look at our java articles, products, resources, and
additional information located throughout www.real-article.com.
We strive to provide only quality articles, so if there is a specific
topic related to java that you would like us to cover, please contact
us at any time.
visit http://www.real-article.com/java/index.php
- 14
- YourKit Java Profiler 2.1 Beta 2 ReleasedChanges in build 304:
- IDE integration: Eclipse is supported under Linux
- New agent parameter 'onexit' allows to automatically capture
snapshots on profiled application exit. See bundled documentation for
details.
- New agent parameter 'debugcompat' added as a workaround for JVM bug
that causes hangup of profiled application launched in remote debug
mode (happens, for example, when Debug is used in IntelliJ IDEA 4.x).
See bundled documentation for details.
- Percents as well as absolute values are shown in CPU and memory
views
- IDE integration: navigation to source code is supported for Eclipse
(if you have previous build installed, please run 'Tools | Integrate
with IDE...' again to install the new plugin)
The list of all improvements and features planned for 2.1 can be found
at
http://www.yourkit.com/preview/index.jsp
We welcome your feedback at email***@***.com
Best regards,
YourKit Team
- 15
- resolving class loaderHi,
I'm working in an environment with many class loaders. A code in some
class, creates a data for me to persist. In order to read it back, I
must find the right class loader to use. In a simple scenario, if all
the data came from one jar, I could just keep the url to that jar. But,
if the data comes from various jars (say the class loader is a war
class loader, so it has reference to 3rd party libraries), then how can
I resolve it when loading the data? Meaning, what keys do I need to
persist so that I can find the same class loader when reading the data?
Thanx,
Ittay
|
|
|