| How Robots Will Steal Your Job |
|
 |
Index ‹ java-programmer
|
- Previous
- 3
- 3
- Runtime.getRuntime().exec causing Windows 16-bit error!Hi there,
I'm trying to do something i've done many times before without problem, even
from signed applets...
trying to run a system command from Java.
I'm doing this:
import java.io.*;
public class SysCommand{
public static void main(Stirng[] args){
try{
Process proc =
Runtime.getRuntime().exec(
new String[]{"command.com",
"/C",
"echo",
"%windir%"});
BufferedReader reader =
new BufferedReader(
new InputStreamReader(
proc.getInputStream()));
System.out.println(reader.readLine());
proc.waitFor();
proc.destroy();
}
catch(Throwable th){
th.printStackTrace();
}
}
}
I'm trying to find out where the Windows directory is (i need to copy some
DLL's into there as part of an installation process).
When i run this, Windows raises a dialog box saying:
_______________________________________________________________
|16 bit MS-DOS Subsystem
|
|
|
| C:\WINNT\system32\ntvdm.exe
|
| Error while setting up environment for the application. Click 'Close'
to terminate |
---------------------------------------------------------------------------
---------
I'm running JDK 1.4.2_02 on a Win2K box.
Any ideas?
Thanks,
Paul
- 9
- Eclipse Runtime ErrorI am running Eclipse 3.1.1. I created a project, called PizzaShop.
Inside pizza shop, I have src\ lib\ and build\classes\ folders. Inside
src\, I have a pizza folder for the pizza package. That too is mirrored
in build\classes\pizza.
When I go to debug as ->debug, Eclipse tells me:
java.lang.NoClassDefFoundError: pizza/SystemTest
Exception in thread "main"
What does that mean and how do you tell Eclipse which main to run? I
think I tell it that when it pops open the configuration menu, and I
tell it "pizza.TakeOrder" for the main class to run. But, obviously, it
cannot find the main, and there is a public main() in the TakeOrder
file.
So confused, Scott
- 9
- 9
- Making Form results readableI have coded a simple form that sends the results to an email. The
form works, but when I recieve the data it is all together in one big
line. What kind of coding do I need to do to separate the data and
label it as well. Do I need to create some sort of template in
notepad??? I am a very beginner coder.
Thanks,
Lindsay
- 9
- adjusting boundries of JPanels in JPanel in JFrameHi, I tried searching through the google groups, but am obviously using the
wrong search words.
I have a JFrame with a JPanel in it. The JPanel is using the following
layout:
new BoxLayout (parentPanel, BoxLayout.LINE_AXIS)
Then I added two JPanels to the parentPanel.
But then I would like to click and drag the separator between the two panels
to change the size of the two JPanels.
Any hints?
Thanks,
Novice
- 9
- javakeyHey Im in a spot of bother I have set the path in my windows xp to point to
java bin dir. and can run javac, but when ever I go to run javakey i gives
me "javakey" is not recognised as an internal or external command....
Im trying to sign some applets so they can open a network connection to
another computer. Im not 100% sure on how to do this or how difficult it
is, so any help would really be greatfully recieved.
Thanking you
niall
- 11
- 12
- Encryption & DecryptionHi all
I've been asked to look into the encryption and decryption of attachments
sent in emails. The specific scenario is as follows:
- a file is created
- the file is to be encrypted
- the file is attached to an email and sent to a recipient
- once received, the file should be decrypted
- the file is read
At first glance, I think I should be reading up on the JCA (Java
Cryptography Architecture) and use a public key encrypt and a private key to
decrypt. Is this right?
Are there any online implementations or tutorials that you would suggest I
read to learn more about this?
--
Rogue Chameleon...
- 13
- Export ApplicationHello.
I am using Netbeans 3.5 IDE and have created several applications which is
fine and dandy. The only thing I cannot do is work out how to export these
apps to another PC i.e. to run them on a machine without having the IDE
installed. I believe this would be via a JAR file but cannot seem to get
these to work. Any help in this area would be great as I am going round in
circles. Also, how do I encrypt the code ?
Regards
Stephen Gray
(Apologies if this is the wrong forum)
- 13
- Focusing a JPanel?Is there a way to give a JPanel focus on a mouse click besides explicitly
saying "panel.requestFocus()"? I tried "panel.setFocusable(true)", but it
had no discernable effect. Using J2SE 1.4.2.
--
Ryan Stewart, A1C USAF
805 CSPTS/SCBE
- 13
- GUI Object DesignI am pretty new to Java and I am trying to get my hands around OOD.
In the course of designing a GUI, I am working on breaking down the
components into the necessary objects so that the code will be as
versatile as possible.
As I work through it though, I am confronted with the situation where
I feel that I am over analyzing and creating too many objects.
Let's say that I have a pretty basic window application. It has a
window with a menu bar and three menus, each with a few items.
The main window is an object inherited from JFrame.
Is it best to make the menu a seperate object, inherited from
JMenuBar, and then make each menu a seperate object, inherited from
JMenu, and then make each menu item a seperate object, inherited from
JMenuItem? Or, is a lot of this typically placed within a single,
larger object?
I guess I am wondering where you draw the line. How do I know when I
have gone too far and am creating too many objects unnecessarily?
I imagine a lot of this dicussion is personal preference and some
aspects are open to debate. I am just looking for some guidance as I
learn more about this.
Thanks.
- 16
- Problem with deploytool.I am trying to build a web service starting from hand-written wsdl using
JAX-RPC and wscompile tool from Sun Java System Application Server 8.0.
I don't want any data binding, so i invoke wscompile tool with -f
nodatabinding option with deploytool I create war, and I try to deploy it.
And deployment fails!
Reading server log I have found that reason for this failure is ejbc:
[#|2004-09-29T21:09:41.174+0200|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=11;|
error: [failed to localize] unable to find member rodzajProblemu in
jaxrpcmapping meta for exception whose wsdl message is:
{http://www.eAdministracja.gov.pl/wsdl/ZDGUsluga}problemPrzetwarzania|#]
Message refers to part of my schema cited below:
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ug="http://www.eAdministracja.gov.pl/UrzadGminy/typy"
targetNamespace="http://www.eAdministracja.gov.pl/UrzadGminy/typy">
<complexType name="ProblemPrzetwarzania">
<sequence>
<element name="rodzajProblemu">
<simpleType>
<restriction base="string">
<enumeration value="Merytoryczny"/>
<enumeration value="Systemowy"/>
</restriction>
</simpleType>
</element>
<element name="oznaczenieProblemu" minOccurs="0" type="string"/>
<element name="opisProblemu" type="string"/>
</sequence>
</complexType>
<element name="problemPrzetwarzania" type="ug:ProblemPrzetwarzania"/>
</schema>
Identifiers are polish words, so don't bother with making up what do
they mean.
I have checked mapping.xml generated by wscompile, and ejbc is right -
there is nothing about rodzajProblemu, but if there is no class bound to
element problemPrzetwarzania except SOAPElement, there is no mapping,
so deploytool shouldn't try to compile any bean!
Should I consider it to be bug or I am doing sth. wrong?
- 16
- command line memory profiler toolHello,
I'm looking for a simple command line tool (no windows) to help find a
memory leak in a large amount of old java code. Need to keep the test
machine identical to the production box, which is without xwindows.
Thanks for your help,
Erik
- 16
- Array iteration question/*Can i calculate the page totals, column totals, and rowtotals in one pass
through the array instead of the three passes i have coded? I have already
added an outer for loop to combine the three seperate iterations into one
but it still loops through the array multiple times and i would like to have
it loop through only once*/
import java.io.*;
import java.util.*;
import java.text.NumberFormat;
class P3
{
static PrintWriter screen = new PrintWriter (System.out,true);
public static void main (String [] args) throws IOException
{
final int COLLEGES = 4;
final int GENDERS = 2;
final int LANGS = 4;
int langAccum, genderAccum, collegeAccum, totalAccum = 0;
float percentage;
StringTokenizer data;
File file = new File ("p3input.txt");
FileReader inputFile = new FileReader (file);
BufferedReader inFile = new BufferedReader(inputFile);
String [] languageNames = {"C++" , "Cobol" , "Java" , "VB"};
String [] collegeNames = {"CCSU", "ECSU", "SCSU", "WCSU"};
String [] genderNames = {"Male", "Female"};
int [][][] enrollment = new int[COLLEGES][GENDERS][LANGS];
NumberFormat percent = NumberFormat.getPercentInstance();
// load array with values from file
for (int college = 0; college < COLLEGES; college++)
{
data = new StringTokenizer (inFile.readLine());
for (int gender = 0; gender < GENDERS; gender++)
for (int lang = 0; lang < LANGS; lang++)
{
enrollment[college][gender][lang] = new Integer
(data.nextToken()).intValue();
totalAccum += enrollment[college][gender][lang];
}
}
screen.println ("\nStudent Enrollment Survey Results:\n");
// first iteration to calculate percentage by language
screen.println ("Language\tPercentage");
for (int lang = 0; lang < LANGS; lang++)
{
langAccum = 0;
for (int college = 0; college < COLLEGES; college++)
for (int gender = 0; gender < GENDERS; gender++)
langAccum += enrollment [college][gender][lang];
percentage = (float) langAccum / totalAccum;
screen.println(languageNames[lang] + "\t\t" + percent.format(percentage));
}
screen.println("\n");
// next iteration to calculate gender percentage
screen.println("Gender\t\tPercentage");
for (int gender = 0; gender < GENDERS; gender++)
{
genderAccum = 0;
for (int college = 0; college < COLLEGES; college++)
for (int lang = 0; lang < LANGS; lang++)
genderAccum += enrollment [college][gender][lang];
percentage = (float) genderAccum / totalAccum;
screen.println(genderNames[gender] + "\t\t" + percent.format(percentage));
}
screen.println("\n");
// last iteration to calculate college percentage
screen.println("Colleges\tPercentage");
for (int college = 0; college < COLLEGES; college++)
{
collegeAccum = 0;
for (int lang = 0; lang < LANGS; lang++)
for (int gender = 0; gender < GENDERS; gender++)
collegeAccum += enrollment [college][gender][lang];
percentage = (float) collegeAccum / totalAccum;
screen.println(collegeNames[college] + "\t\t" +
percent.format(percentage));
}
inputFile.close();
}
}
|
| Author |
Message |
Programmer Dude

|
Posted: 2003-9-5 22:47:00 |
Top |
java-programmer, How Robots Will Steal Your Job
goose wrote:
> until AI people can give us something which does not need them to
> "pull the strings to set it into motion", then i think that they
> are only merely playing games.
I think that's the point of neural nets. You just develop a general
mechanism that "learns" from input--similar to how our brains do.
We aren't anywhere near achieving the complexity of the human brain,
yet, but we will get there eventually.
And THEN we'll see if true intelligence is an emergent property of
complexity (possibly) or whether it requires something more than
mere machinary (possibly).
Until then, we're all just guessing. (-:
> no, it only gets emotional when you accuse everyone on the group
> of species vanity. thus far you have twice told an agnostic that
> their "religion" is preventing them from recognising that others
> (creatures) have intelligence. good job!!
The irony is that I believe Mr. Green experienced what most
theologians would call a "conversion experience" (with dolphins)
and now, like many, many of the converted, is something of a
fanatic on the matter. His posts have more a sense of preaching
than of discussing, and--as you note--he is intolerant of the
"non-believers".
[shrug] Which is fine. Takes all types to make a world, and it's
good to have people on the Side of the Animals. As you can see
from the volume, the thread has certainly captured people's interest.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-5 22:47:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
goose wrote:
> until AI people can give us something which does not need them to
> "pull the strings to set it into motion", then i think that they
> are only merely playing games.
I think that's the point of neural nets. You just develop a general
mechanism that "learns" from input--similar to how our brains do.
We aren't anywhere near achieving the complexity of the human brain,
yet, but we will get there eventually.
And THEN we'll see if true intelligence is an emergent property of
complexity (possibly) or whether it requires something more than
mere machinary (possibly).
Until then, we're all just guessing. (-:
> no, it only gets emotional when you accuse everyone on the group
> of species vanity. thus far you have twice told an agnostic that
> their "religion" is preventing them from recognising that others
> (creatures) have intelligence. good job!!
The irony is that I believe Mr. Green experienced what most
theologians would call a "conversion experience" (with dolphins)
and now, like many, many of the converted, is something of a
fanatic on the matter. His posts have more a sense of preaching
than of discussing, and--as you note--he is intolerant of the
"non-believers".
[shrug] Which is fine. Takes all types to make a world, and it's
good to have people on the Side of the Animals. As you can see
from the volume, the thread has certainly captured people's interest.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-5 23:02:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Corey Murtagh wrote:
>> Where is their science? Where are their scientists?
>
> You could ask the same question about some of the current human
> tribal groups. Where is their science?
Typically in their "witch doctors" and "medicine (wo)men".
Think about what "science" really is: the observation of the world
in which we live and the attempt to *understand* and *codify* those
observations.
Mankind has been doing that since it's been intelligent, and the
understanding has gotten ever better (largely due, I think, to
improved tools and, moreso, on building on previous successes and
failures).
The quest for understanding is--to me--one of the hallmarks of
humanity. We wonder "why" things happen. We wonder about basic
causes of effects we observe. WHY does lightning make a sound?
WHY is it hard to breath when you climb a mountain. WHY can
birds fly. WHY do women have babies. WHY does the sun rise.
And so on. I see no evidence of this in the animal kingdom.
> From memory it wasn't until the greeks managed to free up some
> time a few thousand years ago that we actually started to consider
> science as a worthwhile pursuit.
I think I might use "profession" rather than "pursuit", because I
think "scientists" (as I define science) have existed all along.
It was the Greeks who began to codify and record, and it was the
Greeks who begain to explore the realms of philosphy, thought and
rationality.
> I figure it was mostly the Renaissance that gave us modern
> science. The ideas were mostly there, they just got organized
> a little differently.
Sure! By then there were people who make a life profession out
of studying, and trying to understand, the world around them.
But I think I see a continuum that stretches very far back into
our history. Maybe one way to say it is that it was around this
time in our history we *began* to truly understand.
> So... science, in a form we'd consider as such, has been around
> for a few thousand years, but most of the developments have
> happened in the last couple of hundred years. If estimates of
> the age of Homo Sapiens Sapiens (and it's precursor species) are
> correct, that's a little tiny blip at the end of a lot of nothing.
Yes, fascinating isn't it? In my grandfather's lifetime, we went
from invention of the automobile to walking on the moon!
> So where are all the dolphin scientists? Maybe they haven't
> been invented yet.
It may also be that you need good manipulators (like hands) to
truly study your environment. I've also read the suggestion that
the invention of fire might be necessary for "civilized society",
although I forget the rationale behind the idea.
It may also be that a written language is required for science to
progress, because oral history and memory may not suffice for all
the details. Further, the invention of symbols and mathematics
seems required to pursue science.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
ruse

|
Posted: 2003-9-5 23:06:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
"R. Steve Walz" <email***@***.com> wrote in message news:<email***@***.com>...
<hogwash snipped>
> People are stupid universally. Steve's Law.
starting, i presume, with steve ?
goose,
|
| |
|
| |
 |
Grant Wagner

|
Posted: 2003-9-5 23:54:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
"R. Steve Walz" wrote:
> Roedy Green wrote:
> >
> > On Sat, 30 Aug 2003 10:10:01 GMT, "R. Steve Walz" <email***@***.com>
> > wrote or quoted :
> >
> > >All that is nice, but where are their efforts to communicate?
> >
> > I ask one more time for you to read about my experiences communicating
> > with dolphins at the Human Dolphin foundation. Please see
> > http://mindprod.com/intel.html
> -------------------
> No, I have enough to read.
>
> All *I* need to do is require that: ANY allegedly intelligent species
> that wishes to be taken seriously and not eaten had damned well act
> frenetic and nearly insane right now and make every effort to express
> themselves abstractly to us on an emergency basis before we kill and
> eat you, and if you aren't able to grasp the absolute emergency of
> this exigency, then you're JUST NOT REALLY INTELLIGENT AND WE CAN EAT
> YOU AT WILL!
>
> -Steve
Your "criteria" is ridiculous.
As a collective, humans can certainly slaughter any other lifeform on this
planet (including our own) with incredible efficiency. This does not make us
"more intelligent" then those we slaughter, because, as individuals, we do
/not/ possess this ability.
If I left you naked and unarmed in the jungle, I would imagine you would be
dead in a matter of hours (if not minutes), no matter how "frenetic and
nearly insane" you acted and how clearly you "expressed yourself abstractly
to them on an emergency basis". The ability for a snake, tiger or other
predator to kill and eat you is not the deciding factor in intelligence, as
such, it's simply silly to use it as the criteria to decide that humans are
free to do what they wish with other species.
Given your criteria, the tiger could conclude that since the hairless ape in
front of him can't get away, he's more intelligent then you are, and free to
eat you, when in fact, all that has been demonstrated is that he is designed
to be an efficient predator. Well, humans are the /most/ efficient predator
(at least as a collective), but again, this does not mean we are necessarily
more intelligent then those we kill and eat.
|
| |
|
| |
 |
Grant Wagner

|
Posted: 2003-9-5 23:57:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Programmer Dude wrote:
> Roedy Green wrote:
>
> >> My mother, right now, is functioning adequately (clearly aware,
> >> conscious and sentient) after having suffered a stroke last year.
> >
> > You say she is conscious because she is your mother.
>
> No, more because when I spoke to her on the phone this weekend and
> asked her how she was feeling, she said she was feeling well. I'd
> call her responsiveness and use of language sentient.
Eliza can evoke the same response from the same input. Is Eliza conscious
and sentient?
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:03:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Richard Heathfield wrote:
>>> How do you know [cows are] not solving partial integration
>>> equations in their heads to relieve the sheer boredom of
>>> standing around in a field all day with nothing else to do?
>>
>> I don't *know*, but I consider the idea far fetched in the
>> extreme.
>
> No doubt they consider the idea of your being able to do higher
> math equally far fetched.
"No doubt"? So you actually believe this is possible? Do you
*really* believe that a food source of centuries that spends its
time in pastures chewing the regurgitated contents of one of its
stomachs and walking around in its own feces is doing higher math?
As I said, it seems far fetched (in the extreme) to me, but if
you can demonstrate any evidence for this, I'd be fascinated to
see it!
>> Until I see clear evidence cows have any sense of mathematics,
>> let alone higher math, I'll bet the obvious.
>
> The obvious is that you don't know either way.
As I said. I also don't *know* that Pluto isn't made of brie,
but I consider that extremely unlikely, too. Until someone or
something demonstrates the intelligence of cows or the cheese
of Pluto, I'll select the most *rational* interpretation of the
data.
>>> You assume that a truly intelligent animal would want to
>>> communicate with us in the first place.
>>
>> Yes I do. I assume any intelligence desires to communicate.
>
> I see no reason to make that assumption. Just because humans
> are chatty, that doesn't mean that all intelligent creatures
> are chatty.
I think it's probably a good bet, though. *Curiousity* seems to
be a characteristic of intelligence, and it seems contrary to the
desire to know and understand to *choose* to not communicate.
>> I think [animals communicating] would change the course of
>> human history.
>
> Sure, with possibly catastrophic effects on the relevant species,
> whatever it might be. An intelligent species might be able to
> predict this, and stay the hell away in the first place.
You usually don't defy Occam so much, Richard. (-:
"Possibly catastrophic", "might be able to predict"... And they
somehow managed to achieve this better-than-human level of
intelligence *without* going through a period of lesser smarts
wherein they *would* likely reach out?
>> Some perhaps, but clearly there are people with a strong desire
>> that animals are sentient, so I have to assume the message would
>> get through eventually (if not, in fact, instantly, which is my
>> guess).
>
> Only if the animal wishes to communicate. My point is that this
> would be against the animal's best interests.
My point is, I don't think that's evident at all. I would think
a mother cow would have some concerns about her offspring being
converted to veal and a *serious* vested interest in speaking up.
Consider also that an intelligence smart enough to understand the
value of secrecy should *also* understand that our society DOES
attempt to succor the weak and helpless. Thus, I can see no real
reason to keep mum and a very compelling reason to speak up.
>>> (c) if, somehow, the human /was/ silly enough to report the fact
>>> to anybody, he is very unlikely to be believed by anyone worth
>>> persuading;
>>
>> Again, I disagree completely. If I walked into any animal
>> research facility with a talking dog, once it were established
>> the dog does in fact talk, *history* would be made.
>
> Not if the dog doesn't want to talk.
Irrelevant to the point that if it DID talk, history would be made.
> And, if it is truly intelligent, it won't say a word, even if it
> has the vocabulary and linguistic skill of Shakespeare himself.
[shrug] All I can say is I disagree completely. I see no real
value in keeping mum and definite value of speaking up (consider
the lot of women and non-whites until they *demanded* equality in
Western society). I also think it's absurd to think all members
of all intelligent species all choose to keep mum and have pulled
it off for centuries.
If they were as intelligent as you suggest, they would certainly
be in a position to demand equality. Your position seems to have
a contradiction inherent.
>> ...but the whole scenario makes a silly assumption:
>> that no animals are intelligent until one suddenly becomes
>> intelligent, looks around, figures out the ramifications of
>> revealing intelligence and decides to tell no one.
>
> No, it doesn't make any such assumption.
The assumption is *necessarily* implicit in the point of view.
To reach that level of intelligence, they must pass through the
earlier stages, and surely somewhere along the line speaking,
intelligent animals would have been noticed! It would be a
most remarkable event.
> [The scenario] attempts to demonstrate that, if some animals are
> intelligent *and* capable of communicating that intelligence to
> human beings, evolution could easily have selected against those
> that chose to succumb to that temptation.
On what basis are you so sure that would happen? It seems to me
quite the opposite: that NOT speaking up places them below us and
makes them chattel. ONLY through *demanding* parity will they
ever achieve it. ONLY by demonstrating their intelligence will
they convince us it exists.
If they are capable of acting in concert such as you suggest, they
are equally capable of making a stand and demanding their share.
>> Richard, I think you've got old Occam spinning like a dervish
>> in his grave! (-:
>
> On the contrary. I'm making no assumptions whatsoever.
You are making a great many assumptions, and they are assumptions
that defy observations of centuries. You are assuming intelligence
could evolve completely undetected. You seem to be assuming this
happened to many species (cows & squirrels have been mentioned).
You are assuming all members of all these species all decided to
keep an incredible secret *despite* our attempts to communicate
with them. You are assuming cows would rather die young than speak
up. You are assuming a species would *decide* it was in their best
interest (what, some form of global meeting?) and act in concert
over centuries.
I find this all very hard to credit.
> You are making the fundamental assumption that, if animals were
> intelligent, they would attempt to communicate with us in such
> a way that we could understand.
Yes. That is about the only assumption I'm making. That any
intelligence would seek out other intelligences. Also that it
would very likely speak up to obtain parity.
> Note that this is a self-defeating assumption, since mankind has
> made very few genuine attempts, and possibly no successful
> attempts, to communicate with animals in such a way that /they/
> could understand.
What about those dolphin, primate and elephant scientists who have
a life dream of proving the intelligence of their subjects?
What about my lifelong attempts to communicate with my own pets?
(And some simplistic level of communication is achieved, both by
the scientists and by me. Which in turn suggests that, if your
theory were right, not only are they choosing to keep mum, they
are actively *fooling* us despite genuine efforts on our part to
reach out.
Consider one of the most intelligent animals: dolphins. Don't you
think a truly intelligent species--one smart enough to recognize
the *possible* danger of speaking up--would recognize the equally
possible benefits of speaking up? In today's world, don't you
think *proven* intelligence in dolphins would end gill netting
pretty much overnight?
(Equally, if they were as intelligent as suggest, wouldn't they
be smart enough to avoid tuna boats altogether?)
>> Consider: if *an* animal is intelligent, and if this is "normal",
>> then doesn't this require that many animals be intelligent?
>
> Yes.
>
>> And what is the likelyhood of them *all* deciding to play mum?
>
> High.
That defies logic. All species planetwide have through out the
centuries acted in concert to deceive us? Unless you want to
postulate some form of planetary communication, we must then believe
large numbers of animals came to identical (and I think somewhat
fantastic) conclusions AND decided to act identically on them.
>> What is the likelyhood that *none* of them get the message through?
>
> High. For a start, they might be too bright to try.
"Might" be. What if not? All it takes is *one* slightly less
intelligent animal, or one slightly less inclined to adhear to
the party line, and the cat's out of the bag. (Heck it could
even BE a cat that lets *itself* out of the bag! :-)
> Secondly, we're not really listening terribly seriously.
THAT is just flat out wrong. Many of us listen desperately. I've
often said I'd give part of a lung to know my dog's mind.
> Thirdly, we don't actually know their language (if they have
> a language).
Why does my dog communicate with me, but only on crude, simplistic
fashion? When she wants a treat, she just stares at where they are
kept. She's clearly *trying* to send a message... why not choose
a more effective means IF she's capable of it?
>> What is the likelyhood that *all* of them fool *all* of us *all*
>> the time (and there is a *saying* about THAT idea!).
>
> I think that, if some animals are intelligent, the vast majority
> of those animals fool the vast majority of us the vast majority
> of the time, and that's enough.
No. The whole point here is that that is precisely *not* enough.
Your theory requires ALL animals planetwide and throughout history
to keep the secret ALL the time.
Do the math. There are billions of animals and thousands of years.
Even if a tiny, tiny fraction of them let the secret slip, that's
a LOT of talking animals. How could that not be noticed?
>> But you provide no sensible reason for this silence.
>
> Oh, come on. Look at the problems:
>
> 1) Self-preservation. Any animal successfully communicating with
> us would become an instant research project, almost certainly
> resulting in the loss of liberty and, perhaps, the eventual
> death-in-captivity of the animal. Bit of a downer.
If it were a *single* animal, probably. If an entire species
chose to speak up? Or several species? A few might become
subjects of research, but the bulk would benefit.
By your own theory, there are many intelligent animals out there,
and their lot would clearly improve through speaking up. Cows,
in particular, would stand to benefit hugely (if you know anything
about the meat industry).
> 2) Apathy. We don't speak KomodoDragonese or DuckBilledPlatypian,
> and nobody seems to be making any serious attempts to learn those
> languages.
100% False. People, highly trained people, are working very hard
trying to communicate with those species that have shown the most
intelligence.
> 3) Cultural differences. We place a high value on communication
> because we're good at communicating.
Or because it's so effective in getting things done.
Or because it's a property of ANY intelligence.
> Perhaps an intelligent animal might have a very different set of
> values. For example, it might consider our fetish for
> communication to be a sign of /non/-intelligence.
I find that hard to believe. Many of their values match ours
(security, food, safety), and we have much in common with them
(starting with our DNA and working upwards). I cannot imagine
they are *that* alien from us.
> ("For heaven's sake, mankind, how can you sneak up on an
> antelope if you're yapping all the time?")
Any animal that watched a hunter would recognize how silly this
statement is. Humans CAN shut up when they want to, and animals
are quite vocal in the right circumstances.
>> That would suggest they needs be *much* more intelligent than us,
>> since it's manifest that humans can't keep a secret.
>
> Well, being much more intelligent than humans wouldn't be hard,
> I'm afraid.
Which may be more about the difficulty achieving intelligence
than anything else. Some think intelligence is a consequence
of our generality as a species (can't run that fast, can't fly,
can't stay under water, can't jump that high, no claws, no fangs,
no fur,...). Why would an animal that has achieved balance with
its environment NEED to develop intelligence? It would almost
seem *counter*productive.
>> What are the chances this intelligence was able to evolve and
>> surpass us without our noticing it?
>
> High. Humans not only can't keep secrets, but also are very
> unwilling to notice anything that they weren't expecting to
> notice or don't want to notice.
But certainly not all. The numbers involved alone suggest the
secret could not be kept.
> For example, most of us refuse to believe that we are governed by
> self-serving idiots, because to believe that would be to understand
> that we were pretty dumb for putting them in charge, and nobody
> likes to think of themselves as dumb.
I'm not sure I agree. Many of us are painfully aware of the short-
comings of those who govern, but the situation seems to be the
least worst of the options available. And many people just don't
want to be bothered as long as things go along reasonably smoothly.
> In the same way, we rather like being the only intelligent
> species on the planet, and we'd really rather not share the
> honour.
You've taken a poll on this? Most of the people I know would be
*delighted* if animals were more intelligent. I know I would!
> Of course, you can find quite a few humans with more intellectual
> honesty than that, but they are surprisingly rare.
Even if they were a mere 0.0001% of the population, there would
still be plenty to go around. Even if only 0.00000001% of the
animals spoke up, there would be plenty of talking critters.
>> But in any event, what are you suggesting here? That a species
>> *decided* to return to the sea? Or *decided* to never leave it?
>
> Perhaps the latter. Perhaps, even, the former.
>
> > Pretty neat trick--deciding to evolve in a given direction!
>
> Humans do this already.
Do we? Not very well. There isn't a whole lot of difference
between me and our Greek ancestors. (Consider that Greek comedys
are still funny today, and comedy is a subtle thing!) A few
things have changed--life span and such--but it's a slow thing
and not really a choosen direction so much as a consequence of
civilization.
>> But the odds and the evidence suggest there isn't.
>
> I must disagree here. The odds are not capable of calculation
> because we lack data.
No we don't. We have literally thousands of years and billions
of animals... all who haven't said a word. If all you can see
is sand, how long before you decide that you are most likely in
a desert?
>> ...to imagine small chances into larger probabilities
>> is wishful thinking at best.
>
> Whoever said anything about small chances?
That would be me. There is a small chance (in view of the data)
of you're being right. A very, very, very, very, VERY small
chance. :-\
>> A favorite contemporary SF author, David Brin, wrote a collection
>> of essays and SF shorts, called OTHERNESS. His theme is the
>> tendency in Western thought to bend over backwards to accommodate
>> off-beat "It could be true, you never know" ideas.
>>
>> A big part of his point is that, yes you often can't know for
>> sure, but action requires picking a position until that position
>> is shown to be wrong somehow.
>
> Yes, that's fair enough, but you should not then consider the fact
> of picking a position to constitute evidence that the correct
> position was picked!
I'm not.
>> Until someone demonstrates more than wishful thinking about cows
>> doing higher math or entire species conspiring to conceal
>> themselves from us--admittedly we being in a position to do great
>> harm to them, but also being in a position to provide great
>> help--I'm going to go with what *appears* now to be real.
>
> Until someone demonstrates more than wishful thinking about animals
> being mere automata put here for no other reason than to give us
> something to prod and poke at,...
A point of view I've *never* suggested nor felt.
> I'm going to go with what appears now to be real.
Squirrel human-behaviorists and cows doing higher math? Okay.
> I've seen alertness, curiosity, playfulness, and even mischief
> in animal behaviour;...
As have I.
> ...it seems very clear to me that animals are self-aware,
> intelligent to at least some degree, and very definitely
> conscious.
I fully agree with intelligent to some degree and conscious.
I'm not sure about self-aware, mostly because I'm not sure
how you define it.
> Prove that they aren't, and I'll cheerfully acquiesce.
How about this: Sam (my dog) had leg surgery last year and had
to wear The Cone Of Doom for three weeks. My buddy's dog had
surgery recently and also had to wear a cone for three weeks.
In both cases (and in all others I know of), the dogs never,
and I mean NEVER, fully adjusted their new morphology. They were
CONSTANTLY hanging up the cone on door frames and other vertical
and horizonal edges. Walk through the same door twenty times,
catch the cone twenty times.
A human--and I would imagine ANY intelligent self-aware mind--
would adjust very quickly, if not instantly. You or I with
some form of prostheses would quickly learn to get around.
The dogs *began* slowly to learn adaptive behavior, and if they
wore the cone long enough may well come to adapt fully. The
neural net would eventually re-train. But there was no evidence
whatsoever of a conscious recognition of the device, nor was
there any evidence of a deliberate coping strategy.
Also, the cone was clearly causing some level of distress, BECAUSE
it was hard to get around it. Surely any intelligent, self-aware
being would have done better.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:06:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Grant Wagner wrote:
>> No, more because when I spoke to her on the phone this weekend and
>> asked her how she was feeling, she said she was feeling well. I'd
>> call her responsiveness and use of language sentient.
>
> Eliza can evoke the same response from the same input. Is Eliza
> conscious and sentient?
No. My mother would NOT return identical responses.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:12:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
soft-eng wrote:
>> IF they were at all intelligent! They AREN'T! They aren't even
>> capable of abstract concepts!
>
> Many people with pets would testify that the pets can
> differentiate between different members of the family.
> Now each "member of the family" is merely an abstraction
> of various atoms moving around, so clearly animals
> can understand abstract concepts.
No. People are NOT abstractions of atoms moving around. People
are concrete objects that are instances of humans (which is an
abstraction of "all people everywhere").
Animals differentiate family members by sight and smell. You
can sometimes *startle* your pet by showing up in costume or
even with just a major haircut or shave (until they get close).
Consider this: my dog doesn't have an abstraction of "tennis balls".
Each ever slightly less fuzzy, round, green bouncy thing is a
separate and distinct toy to her. If I try a substitution on her
while we play, she *always* rejects it. One is NOT as good as
another.
What fascinates me, and what I'd pay dearly to know about, is how
she selects a given toy when she or I initiates playtime. I keep
her toys in a "toybox" (if only I could get her to put them back!),
and she clearly goes through some sort of selection process.
> And if you think that's silly, then clearly you don't understand
> the deeper abstract concepts.
[snort] You don't seem to even know what "abstraction" means.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:15:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Richard Heathfield wrote:
>> if they are as intelligent as us, why aren't they studying us
>> as hard as we are studying them?
>
> What makes you think they aren't?
The *universal* apparent lack of process and organization.
>> Where is their science? Where are their scientists?
>
> Perhaps they're better at unobserved observation than we are.
Perhaps Pluto is made of brie.
> Note, also, that we tend to keep most of our own scientists
> where most animals are unlikely to observe them.
Even the scientists that *study* animals?
> Why should not animal scientists (if they exist) be kept where
> we are unlikely to observe them?
Seen any squirrels in white lab coats ducking behind trees lately?
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:17:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Richard Heathfield wrote:
>> And when you asked what its favorite food or color was it
>> replied....
>>
>> (Note: two-year-old humans WILL reply!)
>
> Now let a dolphin ask a two-year-old human, in dolphin-clicks,
> what its favourite food or colour is. It is expected to reply
> in dolphin-clicks.
No, in both cases the subjects in question may do whatever they
can to achieve communication.
> FCOL.
FCOL, yourself.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:24:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
soft-eng wrote:
>> I've *seen* them make meaningless connections to a source of
>> perceived distress; I've *seen* them *fail* to make connections
>
> So they are not very bright. How exactly did you conclude
> they "lack an emotional component of a higher mind" from that?
Um, pretty much "brightness" == "higher mind"
Consider this: most of us (guys), if kicked in the nuts during a
friendly sports match would likely sideline ourselves for a while.
(Most guys will even *wince* at the idea.)
Animals just shake it off and keep playing. How do I know?
Seen it over and over and over. There simply is no, "Oh, my
God, I'm hurt, I need to go lay down for a while!!" component.
Or consider this: your leg is caught in a trap... how likely are
you to gnaw it off to escape? Why is that? Mostly likely
because you'd have a horrific sense of the future that lay ahead
of you without a leg. Animals just blindly need to escape.
Some think dolphins panic in gill nets because the experience is
totally outside their experience and because their always moving
environment suddenly becomes static. They are limited by their
experience, in other words.
Higher minds aren't.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 2:32:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
soft-eng wrote:
>> Or as soon as famine hits. Yes, your analysis is correct.
>> If the hammer falls, it *will* be me or you, and I'm going
>> to work pretty hard to make sure it's you. I have both the
>> training and the hardware. How 'bout you? ;-|
>
> Yes, I am trying to make sure loons like you are
> fixed or locked away before any such things happen.
And how's that working out for you?
> Only I am of the kind which will not kill and
> eat other humans in a famine. (Famines happen.
> They almost never result in cannibalism. People
> starve first.)
You might want to go back and check to see if I *actually* said
I would eat people. YOU said it, but did I?
>> False on all counts. I fish and hunt. (And I used to fast
>
> And you don't believe animals suffer?
Define suffer. They certainly feel pain, which is why I hunt
and fish as humanely as possible. But make no mistake: I am
a preditor, and I'm neither guilty nor ashamed of it.
I also, for what it's worth, don't believe in a world without
pain (and suffering). The dark side balances the light side.
Beauty is meaningless without ugly. Pain-free means nothing
without pain. (I would not choose to live in Utopia, nor do
I believe such is possible.)
Some even think pain and struggle is WHY intelligence developed.
Consider that it was the humans who lived in a harsher environment
who conquored the world, not those who lived in "paradise".
Bottom line: struggle and conflict == growth and change
>> [fasting] on a semi-regular basis (had a girlfriend who was
>> into it; does interesting/weird things to your head).)
>
> I doubt that. Anybody who has fasted long knows that
> it doesn't drive you to thoughts of killing.
> At all. If anything it will pacify your brain.
Indeed. Did I say otherwise? Again, you might want to go back
and check what was said (and in response to what).
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Patty Cutman

|
Posted: 2003-9-6 3:03:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Grant Wagner wrote:
> Programmer Dude wrote:
>
>
>>Roedy Green wrote:
>>
>>
>>>>My mother, right now, is functioning adequately (clearly aware,
>>>>conscious and sentient) after having suffered a stroke last year.
>>>
>>>You say she is conscious because she is your mother.
>>
>>No, more because when I spoke to her on the phone this weekend and
>>asked her how she was feeling, she said she was feeling well. I'd
>>call her responsiveness and use of language sentient.
>
>
> Eliza can evoke the same response from the same input. Is Eliza conscious
> and sentient?
Grant, I don't think that's true - at least not over the span of a
reasonably long dialogue. Eliza was really retarded. However, I think I
understand what you are saying: When as and if we have a bot that will
(over a reasonably long dialogue) fool us into thinkin it is sentient,
will it be sentient? But this concept "sentient" is just a word ... one
can make it mean anything one likes - I think the question is vacuous.
I think a more interesting question might be: When a bot fools us into
thinking it's sentient, how will we treat it?
Patty
|
| |
|
| |
 |
Patty Cutman

|
Posted: 2003-9-6 3:19:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Programmer Dude wrote:
> Some even think pain and struggle is WHY intelligence developed.
> Consider that it was the humans who lived in a harsher environment
> who conquored the world, not those who lived in "paradise".
Well said :) Pain obviously evolved to alert the organism of a threat
to its survival. Does anyone know how we could detect a threat to a
bot's survival, so that we can make it an internal state?
Patty
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 3:35:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Patty Cutman wrote:
>> Some even think pain and struggle is WHY intelligence developed.
>> Consider that it was the humans who lived in a harsher environment
>> who conquored the world, not those who lived in "paradise".
>
> Well said :)
(Thank you. :-)
> Pain obviously evolved to alert the organism of a threat
> to its survival. Does anyone know how we could detect a
> threat to a bot's survival, so that we can make it an
> internal state?
[grin] You might enjoy reading James Hogan's THE TWO FACES OF
TOMORROW wherein something very much along those lines occurs.
(Also a theme in a number of other books... remember COLOSSUS:
THE FORBIN PROJECT?)
In any event, it may suffice--assuming awareness does exist--
to merely provide it a vision of someone reaching for the OFF
switch....
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Hans-Georg Michna

|
Posted: 2003-9-6 4:04:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Programmer Dude <email***@***.com> wrote:
>Do dolphins dream? They apparently don't experience REM!
As far as my limited knowledge goes, they have something like
one brain hemisphere sleep. While one hemisphere sleeps, the
other is awake. It was hypothesized that this is to protect them
from attackers while sleeping.
Roedy, do you know how dolphins sleep?
Hans-Georg
--
No mail, please.
|
| |
|
| |
 |
BR

|
Posted: 2003-9-6 4:21:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Arthur T. Murray wrote:
>>[...] Human-level AI is unlikely to exist before single computer
>>performance will have been raised to at least human levels,
>>at least not long before.
>
>
> http://mentifex.virtualentity.com/java.html AI Blog is a start :-)
>
>
>>Hans-Georg
>
Aaaaaaaaaaaaaaaaagh!! Enough! Kill this vile thread.
|
| |
|
| |
 |
Programmer Dude

|
Posted: 2003-9-6 4:45:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
Hans-Georg Michna wrote:
>> Do dolphins dream? They apparently don't experience REM!
>
> As far as my limited knowledge goes, they have something like
> one brain hemisphere sleep.
Yes. My question is does that sleeping part dream. In humans,
REM is associated with dreams.
> While one hemisphere sleeps, the other is awake. It was
> hypothesized that this is to protect them from attackers
> while sleeping.
And giving them the ability to continue breathing.
--
|_ CJSonnack <email***@***.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|_______________________|
|
| |
|
| |
 |
Sir Charles W. Shults III

|
Posted: 2003-9-6 5:02:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
"Patty Cutman" <email***@***.com> wrote in message
news:sk56b.366451$o%2.164986@sccrnsc02...
> Programmer Dude wrote:
>
> > Some even think pain and struggle is WHY intelligence developed.
> > Consider that it was the humans who lived in a harsher environment
> > who conquored the world, not those who lived in "paradise".
>
> Well said :) Pain obviously evolved to alert the organism of a threat
> to its survival. Does anyone know how we could detect a threat to a
> bot's survival, so that we can make it an internal state?
Yes- I do this quite often in some of my robots, to a limited degree. I
install current sensors on the motors so when they stall, it backs off. I
install thermal sensors on some parts so they can detect overheating. I put
battery charge level sensors in so they know when they need to recharge. It
would be simple to also write a subroutine for each that interprets low charge
as "hunger" and full charge as "satiety". Also, easy enough to make each
incurrence against its power, temperature, or other things (such as impact)
raise defensive flags in software, and to let that level slowly decay by using
an analog value for it. Call it fear or defensiveness, but in the end, the
machine will act just as any threatened animal if you program it to, and it will
avoid those situations when possible.
Now, what if you write a random numbers program that picks actions and
builds theoretical strategies to try so it will not face those conditions again?
Then it could formulate plans, try them out, and save the ones that work.
Cheers!
Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip
|
| |
|
| |
 |
bcd

|
Posted: 2003-9-6 5:07:00 |
Top |
java-programmer >> How Robots Will Steal Your Job
In article <email***@***.com>,
Programmer Dude <email***@***.com> wrote:
> I would think
>a mother cow would have some concerns about her offspring being
>converted to veal and a *serious* vested interest in speaking up.
I expect noone's ever actually told her :-)
If cattle were sentient, it might be interesting to see what
metaphysical properties they would associate with the slaughter house
truck.
Cheers
Bent D.
--
Bent Dalager - email***@***.com - http://www.pvv.org/~bcd
powered by emacs
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Refusing TCP connections - ServerSocketI want to create a ServerSocket.
I want it to accept one connection.
If another connection request comes in, I want it to be refused, not queued.
Even if I set backlog to 1, on the OS I'm testing on (Linux) I'm able to
queue up a bunch more connections (5 or 6).
I know the actual backlog size is OS dependent even if I explicitly set it
in the ServerSocket constructor.
So, how do I refuse all subsequent connections after I accept that first one?
--
Steve Sobol, Victorville, CA PGP:0xE3AE35ED www.SteveSobol.com
Geek-for-hire. Details: http://www.linkedin.com/in/stevesobol
- 2
- 3
- cannot start application server 8 ?installed the Sun Java System Application Server 8 recently. I run the
"asadmin start-domain --verbose domain1" command to try to start it,
however, it didn't happen. i'm using windows 2k server SP$.
thank's!
--
AbdelHalim MIMOUNI
- 4
- Application for Nokia 3410 cell 'phone
This should be simple enough! I have a Nokia 3410. I have downloaded the
J2ME Wireless Toolkit. I would like to write some applications for the cell
'phone.
Now, I read that J2ME is a range of standards and applications, not a
platform. Fair enough.
Since this is in Java, I'd like to write my applications so that they run on
all cell 'phones - or all Nokia 'phones at least.
What I'd like to know is the following:
- What steps do I need to take to write and load a 'Hello World'application
into my 3410 and see it run?
If there is a document you can point me to, or a better newsgroup that would
be great!
Later on it would be nice to know how to advertise an cell 'phone
application so other people can download it and pay for it - but that can
wait until I have one fully written. For that I need to know the above!
--
"The pure and simple truth is rarely pure and never simple." - Oscar Wilde
- 5
- 6
- How to add a button next to title at the JTabbedPaneHi,
I want to add a small button next to the title of each tabbed pane and
receive user's mouse click event at the small button.
And finally, the selected pane will be removed.
How to add other object, button, into Title part of JTabbedPane ?
Any ideas?
- 7
- Java Applet Parameter LimitHi all,
I would like to know the maximum number of parameters that can be passed
to an applet. While I think there is no theoretical maximum, I believe
there to be a practical limitation for browsers.
I am using winXP, IE6 and firefox1, and jre1.4.2.
I have a graphing applet which works very well except when there are a
large number of parameters i.e. 5000. When I load such an example with
appletviewer the applet opens fine. However when I load the same applet
in either IE6 or firefox1 then nothing happens except the page appears
to be loading but gets no where even if you leave it for hours - in
other words the browsers seem to hang. Java does not appear to load into
memory - the icon does not appear in the system tray which leads me to
believe that it is a browser limitation, rather than a java one.
Does anyone know if there is such a limitation? Do you think it could be
remedied by merging the tags - i.e. having less but longer params? Or is
there another way of passing data to the applet?
Many thanks,
Chris.
- 8
- web browser plugin problem .... JRE not found?Hello,
I'm trying to load a Java 1.2 applet into IE 5 using the browser plugin.
When I do so, I get an error message telling me that the plugin cannot find
the JRE where in the path specified (ie., the path to which I just installed
the plugin).
What's going on here?
TIA,
- Boyd S.
- 9
- Poserpoint slide file (PPS) open with wired characters in jspI included a PPS file as a hyperlink in the jsp file that was
developed in Weblogic 8.1.4 on Windows 2000 platform. However, when I
clicked the file, it opened it with strange characters file contents.
The same file opened correctly under ASP format as a same hyperlink
file. I have never need to specify filetype in ASP. Search couple
hours on Web, could not find any clue, not even a topic talked about
similar subject. Can anyone help? Thanks.
C Chang
- 10
- java.lang.NoClassDefFoundError when calling method from EJBI have a java app that runs on Websphere 6.0 and I needed a way to run
a scheduled task once a day that sends out emails. I used the
following link from IBM's site to develop a stateless EJB session bean
that ran the WAS task scheduler.
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/scheduler/tasks/tsch_schedulebtask.html
I placed a call in the implemented process method (just like the
example says) to a non-EJB method and I get a
java.lang.NoClassDefFoundError error on the method I am tryign to call.
I'm new to EJB so I'm not sure if you can even make a call from an EJB
to a normal (non-EJB) method. Any help would be appreciated.
- 11
- Learning ArraysHi, I am just learning arrays and I am trying to get this 2D array to print
out like this:
0 1 2 3 4 5 6
0 1 2 3 4 5 6
0 1 2 3 4 5 6
0 1 2 3 4 5 6
0 1 2 3 4 5 6
but insteads it prints out like this: 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4
5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6
I can get it to work with system.out.println but I need to use a
JOptionPane.showMessageDialog box as I have attempted to do. Any ideas?
(my code is below) Thanks!!!!!!!!!!
import javax.swing.*;
public class array5by7{
public static void main (String args[]){
String outputString = "";
int table[][] = new int [5][7];
for (int row=0; row<table.length; row++)
{
for (int col = 0; col <table[row].length; col++)
table[row][col] = 0 + col;
}
for (int row=0; row<table.length; row++)
{
for (int col = 0; col<table[row].length; col++)
outputString += (table[row][col] + " ");
}
JOptionPane.showMessageDialog (null, outputString + "\n");
}
}
- 12
- help with image display gui
hi wondered if anyone can help i want to create a dummy gui which looks
like a media player eg transition window buttons etc and have created
them as jpeg can someone help me in understanding how to inport them
into jframes etc and place there positions on the grid,
can gridbag place static images.is there any tutorials to do?
- 13
- junit test in eclipse
code from some tutorial
---------
import junit.framework.TestCase;
public class SampleTest extends TestCase {
...
}
---------
code from another tutorial
---------
import org.junit.*;
import static org.junit.Assert.*;
public class SampleTest {
...
}
---------
Second one is working well. I think second one is simpler, so I like it.
But I can't use them with TestSuite.
"
The method addTest(Test) in the type TestSuite is not applicable for the
arguments
(Class<ArmorTypeWrapperTest>)
"
---------
import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
TestSuite suite = new TestSuite("Test for vanguard.wardrobe");
//$JUnit-BEGIN$
suite.addTest(ArmorTypeTest.class);
suite.addTest(ArmorTypeWrapperTest.class);
//$JUnit-END$
return suite;
}
}
---------
Thank you
Sean
- 14
- How to determine the PID of your Java programHi
I was unable to find a decent How-To for finding the PID of a Java
program running on Windows, that did not use JNI. Here is a solution
that uses netstat.
Hope this is useful. If you have a better strategy, let me know!
Thanks
Andrew
package pid;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.SocketTimeoutException;
/**
* Program to obtain the Process Identifier (PID) of the running Java
program
* Assumes the Windows program
* @author Andrew Ward
*/
public class GetPID {
public static void main(String[] args) {
getPid();
}
/**
* Obtain the PID, by listening on a port, then using netstat -ano
* to find the PID of the processing listening on the port
* @return the pid of this process
*/
public static int getPid() {
// Select a port between 50000 and 51000
final int port = 50000 + (int) (Math.round(Math.random() * 1000));
// Windows specific command line
// Netstat -ano will return many lines, one of which will match
// TCP 0.0.0.0:<port> 0.0.0.0:0 LISTENING
<pid>
final String cmd = "netstat -ano";
final String criteria = "0.0.0.0:" + port;
// Listen on the port for 5 seconds
new SocketListener(port, 5 * 1000).start();
int pid = -1;
try {
// Run netstat
Process process = Runtime.getRuntime().exec(cmd);
InputStream istr = process.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(istr));
String str;
while ((str = br.readLine()) != null) {
if (str.indexOf(criteria) > 0) {
String match = str.substring(1+str.lastIndexOf(" "));
pid = Integer.valueOf(match);
System.out.println("PID: " + pid + " {" + str + "}");
}
}
} catch (Exception e) {
e.printStackTrace(System.err);
}
return pid;
}
/** listen on a socket */
public static class SocketListener extends Thread {
int port;
int wait;
public SocketListener(int port, int wait) {
this.port = port;
this.wait = wait;
}
public void run() {
try {
ServerSocket server = new ServerSocket(this.port);
server.setSoTimeout(this.wait);
server.accept();
server.close();
}
catch(SocketTimeoutException e)
{
// We are expecting the accept() call to timeout
// so ignore this exception
} catch (IOException e) {
e.printStackTrace(System.err);
}
}
}
}
- 15
- cannot call a paint function across classes?Just wondering if this is possible, as im having no luck working it out, no
matter what ive tried so far..
I have 2 classes, lets call them gP and kP. in gP ive got this function:
public void paint55(java.awt.Graphics graphics) {
Dimension d=getSize();
graphics.setColor(Color.RED);
graphics.fillRect(0, 0, (int)d.getWidth(), (int)d.getHeight());
graphics.setColor(Color.BLACK);
//call another function here
}
now, in the kP class, im using a jComboBox, the combo box works fine, but i
want to try and call that function from it
Ive tried
gP.paint55();
ive tried referencing it as gP paint55();
Just cant work it out, any ideas?
Thanks
|
|
|