comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* A Jtidy question - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/101dc3467b393897
* JVMPI class load event problem - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/91db7589b4ff8e8b
* unused methods and class - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/18983b9b8d7bad9c
* GridBagConstrainst fill error - 5 messages, 4 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a5a41fc0e3ce41f
* request.setAttribute(...) versus session.setAttribute(...) - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e301f649474cd744
* changing input text - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2edb53612cdb9ecf
* Homework - Was Re: java programe help - 4 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8fddd0a49ac12937
* Forwarding search criteria from the view - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/24b71b08bba2f834
* Append one array to another array - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/20154155911aad9d
* clone - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/499165c53fb19987
* JBoss to go closed source? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4a8dda54906ca8df
* exception handling problem - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/75dffc1e26b79688
* simple IF question if (newplayer == goalkeeper) {throw error} - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f48598d0a1b3fad3
* Saving data from a SQL-query for later use - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c40c88c74d93aa59
* How can i block java web start from downloading jre .. but still launch app - 1 
messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/650db0305c405eb3
* Apache Axis and JDK1.5 - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b141c30d01c801f4
* Building an Opensource project...newb question. - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d160d6e57d983826
* Sinking in the JAVA quicksandbox - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c50f4e3273d0e1bb
  
==========================================================================
TOPIC: A Jtidy question
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/101dc3467b393897
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 6:20 am
From: [EMAIL PROTECTED] (mike) 

regards


thanks for your reply.
now I am a little understood.



thank you
best wishes




==========================================================================
TOPIC: JVMPI class load event problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/91db7589b4ff8e8b
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 6:59 am
From: [EMAIL PROTECTED] (rohan) 

Hi

I'm trying to write a simple profiler using JVM Profiler Interface to
display classes loaded while running my application.
For this, I have registered callback to notify two events
JVMPI_EVENT_CLASS_LOAD and JVMPI_EVENT_CLASS_LOAD_HOOK.
Now the problem is that, for some system classes which are loaded
initialy(during JVM initialization) I'm not getting
JVMPI_EVENT_CLASS_LOAD_HOOK event. However JVMPI_EVENT_CLASS_LOAD gets
called for each of them. ( I want .._LOAD_HOOK for all classes)

I gone through some documents/links which says that
JVMPI_EVENT_CLASS_LOAD_HOOK will be sent only after
JVMPI_EVENT_JVM_INIT_DONE event is sent.

I want JVMPI_EVENT_CLASS_LOAD_HOOK event for all classes, even they
are loaded before JVM initialization is complete.

Is there any way to achieve this? Any work arround?

I'm using Sun J2SDK 1.4.2.

Thanks in advance
Rohan




==========================================================================
TOPIC: unused methods and class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/18983b9b8d7bad9c
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:00 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Fx wrote:
> I would like to to clean my code. And I am definitely sure that nobody will use my 
> public method because I offuscate the final jar.
> Although the class or the method is public it doen't matter.

If you have classes or class members that are not intended for external 
use then they should not be public.  This is more a design question than 
a pragmatic one.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: GridBagConstrainst fill error
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a5a41fc0e3ce41f
==========================================================================

== 1 of 5 ==
Date:   Thurs,   Oct 28 2004 7:04 am
From: [EMAIL PROTECTED] (Asra) 

Here is a sample code:
      javax.swing.JTextArea area = new javax.swing.JTextArea("Nebula Client");
      javax.swing.border.EtchedBorder bord = new  javax.swing.border.EtchedBorder();
      area.setBackground(Color.RED);
      area.setOpaque(true);
      area.setBorder(bord);
      java.awt.GridBagConstraints cons = new java.awt.GridBagConstraints();
      cons.fill = java.awt.GridBagConstraints.BOTH;
      cons.gridx = 0;
      cons.gridy = 0;
      cons.gridwidth = 1;
      cons.gridheight = 4;
      
      
      this.add(area, cons);



== 2 of 5 ==
Date:   Thurs,   Oct 28 2004 7:02 am
From: Babu Kalakrishnan <[EMAIL PROTECTED]> 

Asra wrote:
> Here is a sample code:
>       javax.swing.JTextArea area = new javax.swing.JTextArea("Nebula Client");
>       javax.swing.border.EtchedBorder bord = new  javax.swing.border.EtchedBorder();
>       area.setBackground(Color.RED);
>       area.setOpaque(true);
>       area.setBorder(bord);
>       java.awt.GridBagConstraints cons = new java.awt.GridBagConstraints();
>       cons.fill = java.awt.GridBagConstraints.BOTH;
>       cons.gridx = 0;
>       cons.gridy = 0;
>       cons.gridwidth = 1;
>       cons.gridheight = 4;
>       
>       
>       this.add(area, cons);

Provide a non-zero weight in the axis in which you want fill to take 
place. (Set both weightx and weighty to non-zero values for fill in both 
axes)

BK





== 3 of 5 ==
Date:   Thurs,   Oct 28 2004 7:21 am
From: [EMAIL PROTECTED] (Asra) 

Thanks a lot for your help. Yes, weightx and weighty work but the
GridBagConstraints object is given by the client and can not be
changed. Is there anything in the Pane or something that we can set to
get this effect?



== 4 of 5 ==
Date:   Thurs,   Oct 28 2004 7:45 am
From: Chris Smith <[EMAIL PROTECTED]> 

[EMAIL PROTECTED] says...
> Thanks a lot for your help. Yes, weightx and weighty work but the
> GridBagConstraints object is given by the client and can not be
> changed. Is there anything in the Pane or something that we can set to
> get this effect?

No there isn't.  The GridBagConstraints is one place where things like 
that are specified.  You will need to change the GridBagConstraints 
somehow.  Why aren't you able to change it?  Would it be okay if you 
change it and just put it back the way it was afterwards?

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



== 5 of 5 ==
Date:   Thurs,   Oct 28 2004 6:59 am
From: Sudsy <[EMAIL PROTECTED]> 

Asra wrote:
> Here is a sample code:
>       javax.swing.JTextArea area = new javax.swing.JTextArea("Nebula Client");
>       javax.swing.border.EtchedBorder bord = new  javax.swing.border.EtchedBorder();
>       area.setBackground(Color.RED);
>       area.setOpaque(true);
>       area.setBorder(bord);
>       java.awt.GridBagConstraints cons = new java.awt.GridBagConstraints();
>       cons.fill = java.awt.GridBagConstraints.BOTH;
>       cons.gridx = 0;
>       cons.gridy = 0;
>       cons.gridwidth = 1;
>       cons.gridheight = 4;
>       
>       
>       this.add(area, cons);

The code is incomplete. Where is the GridBagLayout defined and set as
the layout manager? I expected to see code like this:

     GridBagLayout layout = new GridBagLayout();
     setLayout( layout );

     ....

     layout.setConstraints( area, cons );
     add( area );

I assume that your class extends a Container of some sort?

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.





==========================================================================
TOPIC: request.setAttribute(...) versus session.setAttribute(...)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e301f649474cd744
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:15 am
From: "Anton Spaans" <aspaans at(noSPAM) smarttime dot(noSPAM) com> 


"Matt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I want to confirm the differences between request.setAttribute(key,
> value) versus session.setAttribute(key, value).
>
> My understanding is that request.setAttribute only make the key
> available in the following jsp page. But session.setAttribute will
> make the key available in many pages, as long as in the same session,
> and browser not close.
>
> For example, the flow like page1->page2->page3->page4.
> session.setAttribute will make the key available in all pages. But if
> we use request.setAttribute in page2, then only page3 can get the key
> value set in page2.
>
> Please advise if i miss something.
> thanks!!

In short:

The attribute set by request.setAttribute(...) is available as long as the
request is executing:

   From the request.setAttribute(...) call until the final response
   of the request is written back to the browser. After that, the
   attribute can no longer be retrieved.

(E.g. This means that the attribute set by request.setAttribute(...) can be
retrieved in other JSPs that are executed by 'forwards' (not by 'refers'!)
from the originating JSP/Servlet/etc.)

The attribute set by session.setAttribute(...) is available during the
entire user-session. The attribute and its value is written to a separate
storage (e.g. a browser-cookie, but there are many other ways to do that).
This storage is available during a series of requests, as long as the
session is valid (Session validation is another topic all together. Mostly,
the session becomes invalid (disappears) when you close the browser-window).






==========================================================================
TOPIC: changing input text
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2edb53612cdb9ecf
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:20 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Alex Nazarian wrote:

> Hi mates 
> i have a small question 
> i used the setComponentOrientation of class JTextField to change the
> direction of text writing to right to left , i set the default input
> language to Arabic from control panel and changed also the numbering
> style to indic(arabic) numbers .. but the JTextField still using the
> common numbers (012345...) what shall i do ?

A JTextField will display whatever text is stored in it.  If you set its 
value to "1234567890" programmatically, or if a user enters such a 
string into its UI, then that's what will be displayed.  Likewise, if 
you set its value to contain indic digits, either programmatically or 
through its UI, then that's what will be displayed.  (Presuming in both 
cases that the font in use contains the necessary characters).  I'm not 
sure why you would expect anything different.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: Homework - Was Re: java programe help
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8fddd0a49ac12937
==========================================================================

== 1 of 4 ==
Date:   Thurs,   Oct 28 2004 7:23 am
From: "Yogo" <n o s p a m> 


"Andrew Thompson" wrote:
>
> So far we have heard from the people who are more likely
> to agree with my basic philosophy of 'show some effort, and
> be prepared to research and learn'.
>
> Now I want to hear from people who have a distinctly different
> view on it.  Note that I intend adding an entry on 'homework' to
> my Java FAQ*, thus far it is looking like the list prepared by
> Thomas and Bryce about sums it up.
>

>>> - You live with the fact that you might not get any answer at
>>> all. The people in the newsgroup owe you nothing.


I think something should be added for the people in the newsgroup too: You 
don't feel the obligation to respond to homework questions only to point out 
that you won't / can't help someone because there is no code or the person 
hasn't done any research or the person ask that someone makes his/her 
homework etc.

Having to read all those replies saying things like the following can be 
very annoying too: where is your code!, go read your books!, that code 
doesn't even compile how can we help you!, ask your teacher!, what are you 
doing in school? etc...

There are a lot of replies saying only that. Ok, if the guy asks why nobody 
help him or if he reposts the same unanswered question, this would be 
appropriate. Otherwise it's just more annoying than the question about 
homework itself.

I am learning Java myself and I actually enjoy all the small homework 
problems that are posted. I'll often try to solve them in mind or in real. 
So I find them very useful for my own learning process. And it's also useful 
when answers to homework are "given". People don't always have all the time 
they want/need to do research and try things out. I'm not talking about the 
people that need to do homework, they should have enough time for that. But 
this is a public group. When you give an answer *a lot* of people may learn 
from it.



Yogo







== 2 of 4 ==
Date:   Thurs,   Oct 28 2004 8:11 am
From: Alex Hunsley <[EMAIL PROTECTED]> 

Yogo wrote:
> "Andrew Thompson" wrote:
> 
>>So far we have heard from the people who are more likely
>>to agree with my basic philosophy of 'show some effort, and
>>be prepared to research and learn'.
>>
>>Now I want to hear from people who have a distinctly different
>>view on it.  Note that I intend adding an entry on 'homework' to
>>my Java FAQ*, thus far it is looking like the list prepared by
>>Thomas and Bryce about sums it up.
>>
> 
> 
>>>>- You live with the fact that you might not get any answer at
>>>>all. The people in the newsgroup owe you nothing.
> 
> 
> 
> I think something should be added for the people in the newsgroup too: You 
> don't feel the obligation 

How can a FAQ tell people to not feel an obligation to do something?

> to respond to homework questions only to point out 
> that you won't / can't help someone because there is no code or the person 
> hasn't done any research or the person ask that someone makes his/her 
> homework etc.

People in this group feel obliged to point out how posters could be 
better helped, by changing how they post or by posting code examples. 
The ultimate aim here is to make the newsgroup more useful and make 
people more 'helpable'. What is wrong with that aim?

They are not replying for the sake of meanness, or to annoy you in 
particular!

> Having to read all those replies saying things like the following can be 
> very annoying too: where is your code!, 

What is more useful: the regulars just ignoring people who don't post 
code and have vague questions, or requesting code, and then being able 
to help the people that have some code to post? The latter.

> go read your books!, 

Knowing how to use API documentation, books, and google et al are 
important skills. When appropriate, pointing out to someone to use these 
things is much more useful than the regulars simply being a proxy for 
google, API, books etc. To paraphrase Andrew Thomson (I think it was he, 
anyhow): You give them some fish; I teach them how to fish.

> that code 
> doesn't even compile how can we help you!,

People come here wanting help, that's fine. But why should the regulars 
spend an age fixing others peoples code before they can even run it? If 
someone wants help, they can learn how to post compilable code.

> ask your teacher!, 

I've not seen this reply an awful lot....

>what are you doing in school? etc...

A valid question when the OP seems to be allergic to idea of learning or 
actually doing their own work....

> There are a lot of replies saying only that. Ok, if the guy asks why nobody 
> help him or if he reposts the same unanswered question, this would be 
> appropriate. 

... which would happen a lot more if the regulars here didn't answer 
initial posts as much as they do.
Would you really prefer that we ignore the posters of poorly formated 
(etc.) questions, rather then telling them how to best use the newsgroup?

> Otherwise it's just more annoying than the question about 
> homework itself.

This is about more than just the homework thing.


> I am learning Java myself and I actually enjoy all the small homework 
> problems that are posted. I'll often try to solve them in mind or in real. 
> So I find them very useful for my own learning process. And it's also useful 
> when answers to homework are "given". People don't always have all the time 
> they want/need to do research and try things out. I'm not talking about the 
> people that need to do homework, they should have enough time for that. But 
> this is a public group. When you give an answer *a lot* of people may learn 
> from it.

Yes, there's a lot of benefit in seeing java problems and solutions. I 
just get uncomfortable when it happens to be someones homework that they 
expect to be done for them (from scratch).

Thinks . . o o O O (maybe we need a series of non-homework puzzlers!)

How about some simple(ish) problems posted regularly, with answers 
posted later, and people can enter their own version and comments?

alex








== 3 of 4 ==
Date:   Thurs,   Oct 28 2004 8:41 am
From: "Yogo" <n o s p a m> 


"Alex Hunsley"  wrote:
> Yogo wrote:
>> "Andrew Thompson" wrote:
>>
>> I think something should be added for the people in the newsgroup too: 
>> You don't feel the obligation
>
> How can a FAQ tell people to not feel an obligation to do something?
>

I was just trying to express my feelings and to give give an idea about what 
I think, this was not meant to be litteraly written in the faq, but I guess 
you didn't get that...

>> to respond to homework questions only to point out that you won't / can't 
>> help someone because there is no code or the person hasn't done any 
>> research or the person ask that someone makes his/her homework etc.
>
> People in this group feel obliged to point out how posters could be better 
> helped, by changing how they post or by posting code examples. The 
> ultimate aim here is to make the newsgroup more useful and make people 
> more 'helpable'. What is wrong with that aim?
>
> They are not replying for the sake of meanness, or to annoy you in 
> particular!

I never said it was. I just said that I find it annoying.

>
>> Having to read all those replies saying things like the following can be 
>> very annoying too: where is your code!,
>

<big snip>

Hmm, I was just giving some examples, there is no need to discuss each 
example, that is not the point...

>
>> There are a lot of replies saying only that. Ok, if the guy asks why 
>> nobody help him or if he reposts the same unanswered question, this would 
>> be appropriate.
>
> ... which would happen a lot more if the regulars here didn't answer 
> initial posts as much as they do.
> Would you really prefer that we ignore the posters of poorly formated 
> (etc.) questions, rather then telling them how to best use the newsgroup?
>

Yes, sometimes I really do. Actually, I think the problem is more how things 
are said than what is actualy said...

>> Otherwise it's just more annoying than the question about homework 
>> itself.
>
> This is about more than just the homework thing.
>
>
>> I am learning Java myself and I actually enjoy all the small homework 
>> problems that are posted. I'll often try to solve them in mind or in 
>> real. So I find them very useful for my own learning process. And it's 
>> also useful when answers to homework are "given". People don't always 
>> have all the time they want/need to do research and try things out. I'm 
>> not talking about the people that need to do homework, they should have 
>> enough time for that. But this is a public group. When you give an answer 
>> *a lot* of people may learn from it.
>
> Yes, there's a lot of benefit in seeing java problems and solutions. I 
> just get uncomfortable when it happens to be someones homework that they 
> expect to be done for them (from scratch).
>

You don't have to help them. Their messages are not meant personnally to 
you... You could just ignore them...


Nevermind...


Yogo 





== 4 of 4 ==
Date:   Thurs,   Oct 28 2004 8:52 am
From: "Tim Ward" <[EMAIL PROTECTED]> 

"Alex Hunsley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> People in this group feel obliged to point out how posters could be
> better helped, by changing how they post or by posting code examples.
> The ultimate aim here is to make the newsgroup more useful and make
> people more 'helpable'. What is wrong with that aim?

Well, the answer to that question is obvious.

What's wrong is that it will produce more programmers that are actually any
good at anything, and thus reduce the price for those of us who are there
already.

Far better surely just to post answers to the homework questions so that the
students never learn anything and never get jobs and never compete with us
:-)

--
Tim Ward
Brett Ward Limited - www.brettward.co.uk






==========================================================================
TOPIC: Forwarding search criteria from the view
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/24b71b08bba2f834
==========================================================================

== 1 of 2 ==
Date:   Thurs,   Oct 28 2004 6:25 am
From: Sudsy <[EMAIL PROTECTED]> 

VisionSet wrote:
<snip>
> Is there a better way?

I don't know about better, but I'd probably approach the problem
differently. I'd try to have a single controller which would then
contain the logic to determine the originating page and process
accordingly. Easy enough with Struts and ActionMapping. I'd also
try to generalize the parameter processing, using the same field
names across multiple forms except in those cases where specific
fields apply to a particular form.
Such an approach might make it easier to maintain and extend the
application.

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.




== 2 of 2 ==
Date:   Thurs,   Oct 28 2004 7:42 am
From: "VisionSet" <[EMAIL PROTECTED]> 



"Sudsy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> VisionSet wrote:
> <snip>
> > Is there a better way?
>
> I don't know about better, but I'd probably approach the problem
> differently. I'd try to have a single controller which would then
> contain the logic to determine the originating page and process
> accordingly. Easy enough with Struts and ActionMapping. I'd also
> try to generalize the parameter processing, using the same field
> names across multiple forms except in those cases where specific
> fields apply to a particular form.
> Such an approach might make it easier to maintain and extend the
> application.
>

Don't know how I managed to avoid using the word 'Swing', but there you go
:-)

This is a Swing app not a web interface.

-- 
Mike W






==========================================================================
TOPIC: Append one array to another array
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/20154155911aad9d
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:25 am
From: "Niels Dybdahl" <[EMAIL PROTECTED]> 

> Student[] oldStudent
> Student[] newStudent
>
> Can I do this?
> newStudent = newStudent.add(oldStudent);

You can do something similar, if you use Vectors instead of arrays.

Niels Dybdahl






==========================================================================
TOPIC: clone
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/499165c53fb19987
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:39 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

["Chameleon" wrote:]
>>> I want to take the clone() of Cloneable objects which are upcasting 
>>> to Object

[...]

>>>   public Object getCloneForAnyObject(Object a) { // Upcasting to Object
>>>     // if "a" is "Cloneable" I want to return "a.clone()"
>>>     // else I want to return "a".
>>>     // Can you implement this method?
>>>   }

[Paul van Rossem wrote:]
>> if (a instanceof Cloneable)
>>    return a.clone();
>> else return a;

"Chameleon" wrote:
> this is wrong.
> in Object   clone()  is protected

And you have answered your own question.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: JBoss to go closed source?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4a8dda54906ca8df
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:39 am
From: Chris Smith <[EMAIL PROTECTED]> 

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> One interesting question is who owns the copyright to the code in the
> first place. If Sally contributes code to JBoss, then presumably the
> copyright on this code belongs to Sally. It is up to Sally to decide
> on a license for her code and if she refuses to change it from LGPL
> (which would be the license implied by contributing the code to an
> LGPL project) then JBoss would need to throw out everything she
> contributed and reimplement those parts.
> 
> Alternatively, there may be some legal clause somwhere that transfers
> sufficient copyright on contributed code to JBoss so that they _can_,
> indeed, change the license on the code contributed by Sally.

GNU projects require that you sign a copyright transfer form before they 
will accept contributions.  In the case of GNU, this is intended not to 
protect the right to change licenses, but rather to preserve the ability 
of the FSF to file lawsuits against anyone violating licenses on the 
code.

I haven't contributed to JBoss, and I don't know if there's such a 
process or not.

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==========================================================================
TOPIC: exception handling problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/75dffc1e26b79688
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 7:42 am
From: Chris Smith <[EMAIL PROTECTED]> 

[EMAIL PROTECTED] says...
> I got it to work ok (the problem was in the calling program), but the
> problem I have now is comparing an INT to a null value.  how do you do that?
> 
>     if int x == null {throw errormsg}
> 
> it says i cant compare an int to a null.

You can't compare an int to null.  null is not a possible value for a 
variable of type int, so such a comparison is pointless.  The question 
is why you think you need to do this comparison.

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==========================================================================
TOPIC: simple IF question if (newplayer == goalkeeper) {throw error}
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f48598d0a1b3fad3
==========================================================================

== 1 of 2 ==
Date:   Thurs,   Oct 28 2004 7:52 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

zcraven wrote:

>     public void setFirst11(Goalkeeper g1, OutfieldPlayer p2, OutfieldPlayer
> p3,
>         OutfieldPlayer p4, OutfieldPlayer p5, OutfieldPlayer p6,
> OutfieldPlayer p7,
>         OutfieldPlayer p8, OutfieldPlayer p9, OutfieldPlayer p10,
> OutfieldPlayer p11)
> 
>     {
>         if (g1 instanceof OutfieldPlayer){
>             throw new IllegalArgumentException("You cannot put an outfield
> player in goal");
>         }
> 
>         if (p2 instanceof Goalkeeper || p3 instanceof Goalkeeper || p4
> instanceof Goalkeeper || p5 instanceof Goalkeeper ||
>             p6 instanceof Goalkeeper || p7 instanceof Goalkeeper || p8
> instanceof Goalkeeper || p9 instanceof Goalkeeper ||
>             p10 instanceof Goalkeeper){
>             throw new IllegalArgumentException("You cannot put a goalkeeper
> in an outfield position");
>         }

This is pointless.  You already know that g1 is a Goalkeeper and that p1 
- p11 are OutfieldPlayers because those are the declared types of the 
method arguments.

Well, it's not *completely* pointless: it will catch null arguments and 
throw IllegalArgumentException in that case, but that doesn't appear to 
be the intent.

As Joona already wrote, this simply _demands_ an array.  If ever you 
find yourself writing a method with more than about 3 arguments then you 
should consider whether there is a better way.  If you ever find 
yourself writing a method with more than about 6 arguments then you 
should assume that there is a better way and look hard for it.  The 
better way might be to split the method into two or more smaller 
methods, or, as in this case, might be to use a higher-level argument 
such as an array or other collective Object.  There are other possibilities.

If you wrote:

public void setFirst11(Goalkeeper g, OutfieldPlayer[] ofPlayers) {
[...]

Then you still wouldn't need any argument type checking.

>     }


John Bollinger
[EMAIL PROTECTED]




== 2 of 2 ==
Date:   Thurs,   Oct 28 2004 8:06 am
From: "zcraven" <[EMAIL PROTECTED]> 


"John C. Bollinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> zcraven wrote:
>
> >     public void setFirst11(Goalkeeper g1, OutfieldPlayer p2,
OutfieldPlayer
> > p3,
> >         OutfieldPlayer p4, OutfieldPlayer p5, OutfieldPlayer p6,
> > OutfieldPlayer p7,
> >         OutfieldPlayer p8, OutfieldPlayer p9, OutfieldPlayer p10,
> > OutfieldPlayer p11)
> >
> >     {
> >         if (g1 instanceof OutfieldPlayer){
> >             throw new IllegalArgumentException("You cannot put an
outfield
> > player in goal");
> >         }
> >
> >         if (p2 instanceof Goalkeeper || p3 instanceof Goalkeeper || p4
> > instanceof Goalkeeper || p5 instanceof Goalkeeper ||
> >             p6 instanceof Goalkeeper || p7 instanceof Goalkeeper || p8
> > instanceof Goalkeeper || p9 instanceof Goalkeeper ||
> >             p10 instanceof Goalkeeper){
> >             throw new IllegalArgumentException("You cannot put a
goalkeeper
> > in an outfield position");
> >         }
>
> This is pointless.  You already know that g1 is a Goalkeeper and that p1
> - p11 are OutfieldPlayers because those are the declared types of the
> method arguments.
>
> Well, it's not *completely* pointless: it will catch null arguments and
> throw IllegalArgumentException in that case, but that doesn't appear to
> be the intent.
>
> As Joona already wrote, this simply _demands_ an array.  If ever you
> find yourself writing a method with more than about 3 arguments then you
> should consider whether there is a better way.  If you ever find
> yourself writing a method with more than about 6 arguments then you
> should assume that there is a better way and look hard for it.  The
> better way might be to split the method into two or more smaller
> methods, or, as in this case, might be to use a higher-level argument
> such as an array or other collective Object.  There are other
possibilities.
>
> If you wrote:
>
> public void setFirst11(Goalkeeper g, OutfieldPlayer[] ofPlayers) {
> [...]
>
> Then you still wouldn't need any argument type checking.

interesting.

If I do this, how do I insert players into that array OutfieldPlayer[]?






==========================================================================
TOPIC: Saving data from a SQL-query for later use
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c40c88c74d93aa59
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 8:23 am
From: Galen Boyer <[EMAIL PROTECTED]> 

On Thu, 28 Oct 2004, [EMAIL PROTECTED] wrote:
> Well -- for data integrity he might want to get all the data at
> once. Some data might change between queries and he prefers to
> have an integral set rather than latest of each piece.
> 
> It is possible to use the metadata concept to create a very
> flexible object to store your data, and even to assist in
> generating queries -- and in my case building web forms to
> populate those queries.  Links the database structure to the
> webform so one change wass all that was required for 3 -- count
> 'em boys -- three related tasks.  damn I like "--"'s

But once you start saying, "Cache it" which is what the OP is
talking about" you have to solve the staleness issue.  That ain't
no picnic.  And, them entity beans, shudder...

> Galen Boyer wrote:
>> On 27 Oct 2004, [EMAIL PROTECTED] wrote:
>>
>>>Hi!
>>>
>>>How would you save data from a SQL-query for later use?  Is
>>>RowSet an option?
>> I wouldn't until it is shown that the trips to the database
>> are
>>too expensive.
>>

-- 
Galen Boyer




==========================================================================
TOPIC: How can i block java web start from downloading jre .. but still launch app
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/650db0305c405eb3
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 8:40 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 28 Oct 2004 04:06:19 -0700, Glenn M wrote:

> How i can i configure a the web start  client so that it ignore's any
> request to download a JRE.
> 
> I have web start 1.4.2 and am trying to connect to an application
> through web start that requests the download of jre 1.3

Wrote your own .JNLP file*, I think it will work from a 
static HTML page on the local disk..

*
<http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html>

You need to alter the j2se element..

> i am adament that this application will work with jre 1.4.2 and want
> to block this download of jre 1.3 but still run the java application

..despite the best advice from the developer that it requires 1.3?

Good luck.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Apache Axis and JDK1.5
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b141c30d01c801f4
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 9:07 am
From: Jacob <[EMAIL PROTECTED]> 

Apache Axis 1.1 doesn't work well with JDK1.5
due to naming problems (using "enum" as package
name).

What is the workaround?

Thanks.





==========================================================================
TOPIC: Building an Opensource project...newb question.
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d160d6e57d983826
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 8:47 am
From: Lasse Reichstein Nielsen <[EMAIL PROTECTED]> 

"Paul H. van Rossem" <[EMAIL PROTECTED]> writes:

> This very much looks like Eclipse to me.

Me too.

> Maybe you did something wrong? Or note that Eclipse has no obvious way
> to open an imported project (at least I never found it...).

Use:
 File > Import > Existing project into Workspace
Then browse to the directory containing the ".project" file. 

/L
-- 
Lasse Reichstein Nielsen  -  [EMAIL PROTECTED]
 DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
  'Faith without judgement merely degrades the spirit divine.'




==========================================================================
TOPIC: Sinking in the JAVA quicksandbox
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c50f4e3273d0e1bb
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Oct 28 2004 8:51 am
From: [EMAIL PROTECTED] (S J Rulison) 

A few days ago I posted a message regarding a problem I'm having with
establishing a socket connection between an applet and a server to
this group.  I have recapped the crux of the situation below.  After
conferring with some helpful individuals on this group and doing some
additional research on my own, I now believe that this has something
to do with the java SecurityManager.  While I have been doing a lot of
research in this area I have yet to find what program, server /
applet, needs to be modified and which methods need to be overridden
in the SecurityManager.   Some code samples in this area would really
be helpful.  Any help would be greatly appreciated.

Thank you.

Sincerely,
Steve Rulison

PREVIUOUS POSTING:
I have a JAVA Applet and Server application written in version
1.4.2_05 running on a Windows XP platform.  I use the socket (String
host, int port) class on the applet side to establish a connection
with the Server and the ServerSocket (int port) class on the server
side.  When I run both the Server and Applet on the same workstation,
everything works fine but if I move the Server portion onto another
machine, I am unable to establish a connection with that Server (see
exceptions listed below).  I've tried using the IP address of the
server, the name of the server, and the fully qualified name (server
name. domain name).  All of these conventions work fine when both the
applet and the server are run from the same machine but as soon as I
separate the two programs to two different computers, it stops
working.
I even went so far as to purposely feed the server a factitious IP
Address and machine ID when I was running both processes from the same
machine to see if it would run anyway.  It did not, which tells me
that the server application is doing something with that parameter
when it establishes a connection.

EXCEPTIONS:
java.security.AccessControlException: access denied
(java.net.SocketPermission 10.44.1.250 resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.InetSocketAddress.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at PTABLookup.createSocket(PTABLookup.java:110)
at PTABLookup.init(PTABLookup.java:87)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



=======================================================================

You received this message because you are subscribed to the
Google Groups "comp.lang.java.programmer".  

comp.lang.java.programmer
[EMAIL PROTECTED]

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe


=======================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to