 |
 |
Index ‹ java-programmer
|
- Previous
- 2
- Problem in connecting to a proxyHi,
i need to see if a user enters the correct username/password to
authenticate to a proxy. My problem is... through the following code,
i am
able to connect to a proxy with even invalid username/passwords.
Suppose
if the valid username and password to a proxy is test/test , i am able
to connect to the proxy using x/x . the response code returned is
always 200. Please advice..
################################
public static boolean isValidProxyAccount(String proxyServer,String
proxyPort,String proxyLogin,String proxyPassword) throws IOException
{
String go_url = new String ("http://www.google.com/");
boolean VALID_STATUS = true;
try{
URL url = new URL(go_url);
System.getProperties().put("proxySet",
"true");
System.getProperties().put("http.proxyHost", proxyServer);
System.getProperties().put("http.proxyPort", proxyPort);
HttpURLConnection con = (HttpURLConnection)
url.openConnection();
Base64Encoder b1 = new
Base64Encoder(proxyLogin+":"+proxyPassword);
con.setAllowUserInteraction(true);
String enStrProxy = "Basic "+ b1.processString();
con.setRequestProperty("Proxy-Authorization", enStrProxy);
int code = con.getResponseCode();
String retMsg = con.getResponseMessage();
System.out.println("code::"+code);
System.out.println("retMsg::"+retMsg);
System.getProperties().put("proxySet", "false");
System.getProperties().remove("http.proxyHost");
System.getProperties().remove("http.proxyPort");
con.disconnect();
if (code != 200){
VALID_STATUS = false;
throw new IOException("Failed to connect to CCO: "+retMsg);
}
}catch (Exception ex){
System.out.println(ex.getMessage());
throw new IOException(ex.getMessage());
}//catch
return VALID_STATUS;
}
- 2
- Reflection and access to type parameter?Given the SSCCE below, the need to pass A.class and B.class in
lines 25 and 25 seems redundant. However, I can find nothing in
the language that would let that be done in the constructor,
between lines 18 and 19. The obvious would be
Class<T> x = T.class;
but that of course does not work. Is there any bridge at all
between reflection and generics? I suspect the answer is no
and the code below is the best that can be done, but I'm
not sure.
1 import java.lang.reflect.Method;
2 public class TestEnums
3 {
4 public static enum A
5 {
6 V1,
7 V2;
8 }
9 public static enum B
10 {
11 X1,
12 X2,
13 X3;
14 }
15 public static class C<T extends Enum<?>>
16 {
17 public C(Class<T> x) throws Exception
18 {
19 T[] eVal = x.getEnumConstants();
20 for (Enum<?> v : eVal) System.out.println(v.toString());
21 }
22 }
23 public static void main(String[] args) throws Exception
24 {
25 C<A> ca = new C<A>(A.class);
26 C<B> cb = new C<B>(B.class);
27 }
28 }
- 2
- JavaHelp and root nodehi,
Simplifying i have a java help set as this
ROOT -> C
-> B -> b1
-> b2
-> b3
->C
I can set B as current visualized node with these instructions:
helpBroker =(DefaultHelpBroker)coreHelpSet.createHelpBroker();
helpBroker.setCurrentID(B);
my problem is that i'd like to hide the other nodes setting B as tree
root node so that i could only see B and its children b1,b2,b3.
This is because entire help set is recovered from a big manual
describing a lot of applications and i'd like to show only one referred
by node B avoiding to show others that couldn't be installed.
Can you help me?
thanks
- 3
- Riddle me thisOn Mon, 07 Nov 2005 11:35:27 GMT, "Sharp Tool"
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :
>All these distribution dont include negative numbers?
A normal is clustered about a mean, nominally 0, with symmetric tails
left and right.
Poisson is a distribution of positive numbers.
Just what do these numbers measure?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 6
- Hiding default console in Windows Hello. Is it possible to hide the default console window in MS-Windows
in Java? If so, how?
When writing a Swing/JFC application in Java, it would be really nice to
somehow hide the DOS window that appears.
Thanks in advance.
--
Randolf Richardson - kingpin+email***@***.com
The Lumber Cartel, local 42 (Canadian branch)
http://www.lumbercartel.ca/
- 6
- jbuilder 2005 backward compatabilityHi
I have a project that created by jbuilder X, in the "design" panel,
everything work great, but when i use jbuilder 2005 to open it, it
only display gray. Do you know why?
thanks
from Peter (email***@***.com)
- 7
- JacOrb Multihomed serverHi everybody,
we have problems running a corba-server on a multi-homed Win2k-Box.
The machine has two network-cards. JacOrb is using the wrong IPAddress
for IOR's.
I tried the property OAIAddr. Only setting the property to 127.0.0.1
and running server and client on the same machine was successful.
Using the real address failed.
Does anyone have an advise for me ?
Thanks in advance
Ruediger
- 8
- how to mail a form in JSPhi this is ravin. i m a last year IT student and i am doing my project
at a govt. organization. i have to do one thing in my project that:
> there is a feedback form which is to be filled by any user.
> it is having four fields.
1) name
2) tel.no
3) e-mail address
4) comments
> i simply have to mail this fields to the org.'s mail address when user hits submit button. there is nothing to do with this fields.
please send releated help as early as possible.
- 9
- EMPTY_SET.iterator() and generics
In the old days, before generics, I wrote
private SortedSet onhand;
Iterator getInventoryIterator() {
return (onhand == null ? Collections.EMPTY_SET ? onhand)
.iterator();
}
... the idea being to create the SortedSet only if there are
actually some Inventory objects to store in it, and to return
a suitable Iterator whether or not the SortedSet exists.
Now, in an effort to leave prehistory behind me and adopt
generics with all their benefits, I change the SortedSet to a
SortedSet<Inventory> and change the return type of the method
to Iterator<Inventory> -- but how do I rewrite the guts of the
method to get the compiler to understand that all is well? The
problem seems to be that Collections.EMPTY_SET.iterator() returns
an Iterator<Object>, and the compiler complains when I try to
return this in place of the desired Iterator<Inventory>. I've
tried a few variations, but have only succeeded in moving the
warning message around, not in eliminating it:
return (onhand == null
? (Set<Inventory>)Collections.EMPTY_SET : onhand)
.iterator();
return (Iterator<Inventory>)
(onhand == null ? Collections.EMPTY_SET ? onhand)
.iterator();
This seems like a lot of trouble to take over the empty set,
but there ought to be *some* clean way to do it. Ideas?
--
Eric Sosman
email***@***.com
- 9
- GUI program locking up...I'm using Netbeans 5.0 beta for an IDE, with swing components. The
situation is something like this:
The program is a board game - the user chooses a building from a panel,
and then is supposed to get a message to choose what resource to pay
for it with. Here's a trace of the code:
Game (main object):
....
board[i].activate():
Game.game.setPlayer(worker);
Game.game.playerMessage("Choose a wooden building
from the building panel.");
Game.game.waitForBuild(type) :
built = false;
state = type + Game.BuildWood -
1;
mainPanel.buildings.getBP().setSelectedIndex(type-1);
while(!built)
{ Thread.yield(); }
No problems yet. This works fine, unless a building that needs to call
chooseResource is selected.
So, the user clicks one of these buildings, which activates the
following code, which is where the freeze occurs:
String r = Game.game.chooseResource():
state = Game.chooseResource;
resource = "";
while(resource.length()==0)
Thread.yield();
return resource;
Now chooseResource does work in any other context - resource gets set
by a mouseClicked event handler in a panel out there. But at this
point, the GUI stops responding. The playerMessage never gets printed,
and the click event never gets triggered. I did some investigating,
printing out numbers inside the two inmost loops, and the
chooseResource loop is continually running. I know the code's ugly,
but even so, the cause of this behavior is beyond me. Any suggestions
would be greatly appreciated!
- 12
- Read contents of a web pageI need to read the entire contents of any webpage, and return it as a
String. The other part of my assignment was to read a file and return its
contents. I did that with the following code:
private String filename;
private String contents;
public TextFileReader(String aFileName){
filename = aFileName;
}
public String readText() throws IOException{
String lineSep = System.getProperty("line.separator");
BufferedReader input = new BufferedReader(new
FileReader(filename));
String nextLine = " ";
StringBuffer contents = new StringBuffer();
while((nextLine = input.readLine()) != null){
contents.append(nextLine);
contents.append(lineSep);
}
return contents.toString();
}
----------
So, what do I have to change to be able to read webpages?
- 12
- how to set row height at runtime in a JTableHi
i am trying to set rowheight of row in a JTable using
setRowHeight(row,rowheight)
it is not affecting on Table.but if i use setRowheight(rowheight) it
applying
entire table ,please help me to solve this problem
after setRowHeight(row,rowheight), i am calling firechanged() method
also ,i t will not affecting please hemp me
- 14
- Clients are bad ?Hello John Bailo , You say :
" Open source is just about old style client software
catching of to the Web economy "
You obviously don't believe that yourself ,
otherwise you'd be using Google ... Not Moz .
- 14
- Asking help for a java io problemHello, guys! I have a problem running the following code with eclipse
showing that:
java.io.IOException: Stream closed
at sun.nio.cs.StreamDecoder.ensureOpen(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at HtmlFileParser.parseHtmlDoc(HtmlFileParser.java:32)
at HtmlFileParser.main(HtmlFileParser.java:52)
//code here:
try{
FileInputStream fin = new FileInputStream("test.html");
InputStreamReader fr = new InputStreamReader(fin);
for(i=0; i<2048; i++) buf[i] = '0';
fr.read(buf, 0, 2048); //problem here (line 32)
FileWriter fw = new FileWriter("bufWriteTest.txt");
fw.write(buf);
fw.flush();
}
catch(FileNotFoundException e) {
e.printStackTrace();
}
catch(IOException e) {
e.printStackTrace();
}
There are no syntax erro in the above code, it just dosen't work,
please help me finding out what the problem is, thank you.
- 14
|
| Author |
Message |
publius36

|
Posted: 2004-7-8 23:56:00 |
Top |
java-programmer, ?s about Process Class
I have a DOS program I am trying to supply input to using Java.
Reading from The Java Class Libraries, 2nd Ed. java.lang.Process class -
the material presented seems to imply that I will be able to do
this.
The program most definately uses just stdio... (in) being the keyboard and
(out) being the consol.
Well I can't get it to work and being the presistant bugger that i am I have
switch tactics so I can more up the learning curve.
I have resorted to just trying to display the output of mem.exe.
here is the source ::: test.java
import java.io.*;
import java.lang.*;
public class test
{ public static void main(String[] args)
{
int ch;
int status;
try
{
Process process = Runtime.getRuntime().exec("mem.exe");
InputStream in = process.getInputStream();
BufferedInputStream buf = new BufferedInputStream(in);
//try
//{
//status = process.waitFor();
//}
//catch (InterruptedException e) {status = -1;}
try
{
while((ch = buf.read()) != -1)
{
System.out.print((char)ch);
}
}
catch (IOException e) {System.out.println(e);}
//in.close();
//buf.close();
//process.destroy();
//Runtime.getRuntime().gc();
//Runtime.getRuntime().exit(-1);
//System.out.print('\n');
}
catch (IOException e) {System.out.println(e);}
}
}
It works the first time I run the class file with java test.
However, the next attempt hangs and requires a system restart inorder to get
the code to display the results.
The commented code in test.java are my attempts to do various things to
clean up this issue of not displaying the results.
Does anyone have a clue or suggestion...
thanks,
publius36
|
| |
|
| |
 |
Chris Smith

|
Posted: 2004-7-9 0:52:00 |
Top |
java-programmer >> ?s about Process Class
publius36 wrote:
> Well I can't get it to work and being the presistant bugger that i am I have
> switch tactics so I can more up the learning curve.
> I have resorted to just trying to display the output of mem.exe.
Okay. I have a number of comments. Many of them are not necessarily
related to the specific problem you've got, but here they are anyway.
First,
> while((ch = buf.read()) != -1)
> {
> System.out.print((char)ch);
> }
BufferedInputStream reads bytes. System.out writes characters (it's a
rather confused case, actually, but if you call its "print" method that
it writes characters.) Bytes and characters are *not* the same thing.
The right way to do this is to use an InputStreamReader to convert from
bytes to characters.
InputStream in = process.getInputStream();
BufferedInputStream buf = new BufferedInputStream(in);
InputStreamReader r = new InputStreamReader(buf);
then
while ((ch = r.read()) != -1)
{
System.out.print((char) ch);
}
then
r.close();
The way you've written your code only happens to work because your
system default character encoding matches the byte-truncation of unicode
for all characters that you read. As the system's default encoding
changes, or as you start working with programs that output different
characters such as accented or non-latin characters, the code will
suddenly break. InputStreamReader solves that problem.
> It works the first time I run the class file with java test.
> However, the next attempt hangs and requires a system restart inorder to get
> the code to display the results.
Actually, it probably requires killing the runaway NTVDM process on
Windows. There is a bug in modern 32-bit Windows operating systems
running a 16-bit process in a way that doesn't attach it to a physical
console, and this causes NTVDM to become confused. Since mem.exe is
just a test program for you, the answer is to choose a different program
to test with. Try "ipconfig.exe" instead.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
|
| |
|
| |
 |
publius36

|
Posted: 2004-7-9 2:33:00 |
Top |
java-programmer >> ?s about Process Class
understood the things you stated, was very much aware of the need for using
a reader
i choose not to in test, trying to trouble shoot and much hair pulling
later stated paring down the code...
i know i'm not reading characters, hence
int ch;
i'm reading bytes from the BufferInputStream hence the type cast to (char)
in the statement
System.out.print((char)ch
was trying to answer the question do i have the inputstream from the
sub-process
plugged into a buffer created by main that i can dump.
it is the second observation :
>
> Actually, it probably requires killing the runaway NTVDM process on
> Windows. There is a bug in modern 32-bit Windows operating systems
> running a 16-bit process in a way that doesn't attach it to a physical
> console, and this causes NTVDM to become confused. Since mem.exe is
> just a test program for you, the answer is to choose a different program
> to test with. Try "ipconfig.exe" instead.
>
it never ceases with billybob's MS OS's crap
anyway, thanks for the help...
since my program is definately a legacy 16-bit program
i could be barking up a tree here.
still i'll try using ipconfig.exe, just to learn a little bit more and do as
you say
get the readers and writers in place.
thanks for your timely help
sincerely, pub
"Chris Smith" <email***@***.com> wrote in message
news:email***@***.com...
> publius36 wrote:
> > Well I can't get it to work and being the presistant bugger that i am I
have
> > switch tactics so I can more up the learning curve.
> > I have resorted to just trying to display the output of mem.exe.
>
> Okay. I have a number of comments. Many of them are not necessarily
> related to the specific problem you've got, but here they are anyway.
>
> First,
>
> > while((ch = buf.read()) != -1)
> > {
> > System.out.print((char)ch);
> > }
>
> BufferedInputStream reads bytes. System.out writes characters (it's a
> rather confused case, actually, but if you call its "print" method that
> it writes characters.) Bytes and characters are *not* the same thing.
> The right way to do this is to use an InputStreamReader to convert from
> bytes to characters.
>
> InputStream in = process.getInputStream();
> BufferedInputStream buf = new BufferedInputStream(in);
> InputStreamReader r = new InputStreamReader(buf);
>
> then
>
> while ((ch = r.read()) != -1)
> {
> System.out.print((char) ch);
> }
>
> then
>
> r.close();
>
> The way you've written your code only happens to work because your
> system default character encoding matches the byte-truncation of unicode
> for all characters that you read. As the system's default encoding
> changes, or as you start working with programs that output different
> characters such as accented or non-latin characters, the code will
> suddenly break. InputStreamReader solves that problem.
>
> > It works the first time I run the class file with java test.
> > However, the next attempt hangs and requires a system restart inorder to
get
> > the code to display the results.
>
> Actually, it probably requires killing the runaway NTVDM process on
> Windows. There is a bug in modern 32-bit Windows operating systems
> running a 16-bit process in a way that doesn't attach it to a physical
> console, and this causes NTVDM to become confused. Since mem.exe is
> just a test program for you, the answer is to choose a different program
> to test with. Try "ipconfig.exe" instead.
>
> --
> www.designacourse.com
> The Easiest Way to Train Anyone... Anywhere.
>
> Chris Smith - Lead Software Developer/Technical Trainer
> MindIQ Corporation
|
| |
|
| |
 |
publius36

|
Posted: 2004-7-9 3:21:00 |
Top |
java-programmer >> ?s about Process Class
ipconfig is work well for test purposes..
however the code frag you gave...
> InputStream in = process.getInputStream();
> BufferedInputStream buf = new BufferedInputStream(in);
> InputStreamReader r = new InputStreamReader(buf);
won't work : syntax ---> public InputStreamReader(InputStream in)
you are supplying a BufferedInputStream object and not the required
InputStream object
the correct code frag should be :
InputStream in = nhProcess.getInputStream();
InputStreamReader r = new InputStreamReader(in);
BufferedReader buf = new BufferedReader(r);
to achieve what you intended.
even though the syntax for BufferedReader is
public BufferedReader(Reader obj)
I think it works because the Reader object is the superclass
of all readers, and why it can handle the InputStreamReader object.
"Chris Smith" <email***@***.com> wrote in message
news:email***@***.com...
> publius36 wrote:
> > Well I can't get it to work and being the presistant bugger that i am I
have
> > switch tactics so I can more up the learning curve.
> > I have resorted to just trying to display the output of mem.exe.
>
> Okay. I have a number of comments. Many of them are not necessarily
> related to the specific problem you've got, but here they are anyway.
>
> First,
>
> > while((ch = buf.read()) != -1)
> > {
> > System.out.print((char)ch);
> > }
>
> BufferedInputStream reads bytes. System.out writes characters (it's a
> rather confused case, actually, but if you call its "print" method that
> it writes characters.) Bytes and characters are *not* the same thing.
> The right way to do this is to use an InputStreamReader to convert from
> bytes to characters.
>
> InputStream in = process.getInputStream();
> BufferedInputStream buf = new BufferedInputStream(in);
> InputStreamReader r = new InputStreamReader(buf);
>
> then
>
> while ((ch = r.read()) != -1)
> {
> System.out.print((char) ch);
> }
>
> then
>
> r.close();
>
> The way you've written your code only happens to work because your
> system default character encoding matches the byte-truncation of unicode
> for all characters that you read. As the system's default encoding
> changes, or as you start working with programs that output different
> characters such as accented or non-latin characters, the code will
> suddenly break. InputStreamReader solves that problem.
>
> > It works the first time I run the class file with java test.
> > However, the next attempt hangs and requires a system restart inorder to
get
> > the code to display the results.
>
> Actually, it probably requires killing the runaway NTVDM process on
> Windows. There is a bug in modern 32-bit Windows operating systems
> running a 16-bit process in a way that doesn't attach it to a physical
> console, and this causes NTVDM to become confused. Since mem.exe is
> just a test program for you, the answer is to choose a different program
> to test with. Try "ipconfig.exe" instead.
>
> --
> www.designacourse.com
> The Easiest Way to Train Anyone... Anywhere.
>
> Chris Smith - Lead Software Developer/Technical Trainer
> MindIQ Corporation
|
| |
|
| |
 |
John C. Bollinger

|
Posted: 2004-7-9 6:50:00 |
Top |
java-programmer >> ?s about Process Class
publius36 wrote:
[Chris Smith wrote:]
>> InputStream in = process.getInputStream();
>> BufferedInputStream buf = new BufferedInputStream(in);
>> InputStreamReader r = new InputStreamReader(buf);
>
>
> won't work : syntax ---> public InputStreamReader(InputStream in)
> you are supplying a BufferedInputStream object and not the required
> InputStream object
A BufferedInputStream *is* an InputStream. Chris' code fragment will
work just fine.
John Bollinger
email***@***.com
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Persist JPA Entity to a file systemIs there a way to persist a EJB3 entity to a flat or xml file to test
an application if you don't hava a database at hand?
I thought I have read something about it lately but I (google) can't
find it.
Many Thanx
Andre Broers
- 2
- FWD: Install corrective pack from the MS
Microsoft Partner
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
This update includes the functionality of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned herein are the trademarks of their respective owners.
<HTML>
<HEAD>
<style type='text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black">
<BASEFONT SIZE="2" face="verdana,arial">
<TABLE WIDTH="600" HEIGHT="40" BGCOLOR="#1478EB">
<TR height="20">
<TD ALIGN="left" VALIGN="TOP" WIDTH="400" ROWSPAN="2">
<FONT FACE="sans-serif" SIZE="5"><I><B>
<A class='navtext' HREF="http://www.microsoft.com/"
TITLE="Microsoft Home Site" target="_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN="right" VALIGN="MIDDLE" BGCOLOR="Black" NOWRAP>
<FONT color="#ffffff" size=1>
<A class='navtext' href='http://www.microsoft.com/catalog/' target="_top">All Products</A> |
<A class='navtext' href='http://support.microsoft.com/' target="_top">Support</A> |
<A class='navtext' href='http://search.microsoft.com/' target="_top">Search</A> |
<A class='navtext' href='http://www.microsoft.com/' target=_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="BOTTOM" NOWRAP>
<FONT FACE="Verdana, Arial" SIZE=1><B>
<A class='navtext' HREF='http://www.microsoft.com/' TARGET=" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC="cid:fbbhiwp" BORDER="0"><BR><BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Partner<BR><BR>
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
This update includes the functionality of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="3" WIDTH="600">
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE="1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE="1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Customers should install the patch at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Run attached file. Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">You don't need to do anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF="http://support.microsoft.com/" TARGET="_top">Microsoft Technical Support</A> web site. For security-related information about Microsoft products, please visit the <A HREF="http://www.microsoft.com/security" TARGET="_top">
Microsoft Security Advisor</A> web site, or <A HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE="1">Please do not reply to this message. It was sent from an unmonitored e-mail address and we are unable to respond to any replies.<BR></FONT>
<HR COLOR="Silver" SIZE="1" WIDTH="100%">
<FONT SIZE="1" COLOR="Gray">The names of the actual companies and products mentioned herein are the trademarks of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH="600" HEIGHT="45" BGCOLOR="#1478EB">
<TR VALIGN="TOP">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1"><B>
<A class='navtext' HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us</A>
|
<A class='navtext' HREF="http://www.microsoft.com/legal/" TARGET="_top">Legal</A>
|
<A class='navtext' HREF="https://www.truste.org/validate/605" TARGET="_top" TITLE="TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN="MIDDLE">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1">
©2003 Microsoft Corporation. All rights reserved.
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/cpyright.htm" TARGET="_top">Terms of Use</A>
|
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/privacy.htm" TARGET="_top">
Privacy Statement</A> |
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/enable/" TARGET="_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
GIF89ah
GIF89a
- 3
- cmr one-to-many unidirectional - jbossHas anybody been able to get a CMR one to many unidirectional
relationship working with jboss? I'm trying to get it to work but keep
getting "foreign key constraint not allowed for this type of data
store".
The relationship is simple, I have two entity beans, person and
company and I want to have one to many unidirectional relationship
between these two beans. A person has one company, but a company has
many persons.
I want to have a company_id field in my person table that refers to
the id field in my company table. Maybe I'm missing something or doing
this wrong?
If somebody could post a working example of one to many unidirectional
I'd be mighty grateful. I'm trying to use the foreign-key-mapping
rather than relation-table, can you do this with foreign-key-mapping?
Here's what I have:
/**
* @return the company the person belongs to
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="COMPANY_ID"
* sql-type="integer"
* jdbc-type="integer"
*
* @ejb.interface-method
*
* @ejb.relation
* name="Person-Company"
* role-name="Person-belongs-to-Company"
* target-ejb="Company"
* target-role-name="Company-has-many-Persons"
* target-multiple="yes"
*
* @jboss.relation
* fk-constraint="true"
* fk-column="COMPANY_ID"
* related-pk-field="id"
*
*/
public abstract CompanyLocal getCompany();
- 4
- Class file parsersMike Schilling <email***@***.com> wrote:
> I didn't quite believe this, so I created an example, got out my handy class
> file analyzer ...
I'm curious as to which tool you use for this task. The way you said that
("got out my ...") seems to me to indicate that you've also made your own...
I have written one myself (in Tcl, not in Java, so I do the parsing completely
myself), because I didn't like javap hiding away private fields and methods.
Unfortunately the user-interface of my script is still somewhat cryptic (not
yet good enough for prime time).
PS: this is not meant as a general question about such tools. Meanwhile I know
some already, but back then, when I wrote my own, all I knew then was javap.
- 5
- Class with only methods - less memory? Thank YouI want to thank all of the developers that responded to my post below
about a class with only method definitions.
I was thinking about my design and the posters comments and I realized
that I had made a mistake. My class will contain a single member
variable. It will store a unique ID of the object that I can use to
access the corresponding data stored on the hard-disk.
Thanks for helping me figure this one out.
- 6
- Column numbers is stack trace - enhancement requestI filed the following enhancement request to Sun. Would like to hear
opinion about how useful implementing this feature would be.
Synopsis: Need column numbers in stack traces
Description:
A DESCRIPTION OF THE REQUEST :
Stack traces contain only line numbers and in certain cases line number
alone is not sufficient for figuring out where exactly an exception
occurred. Consider the following line of code.
value = getItem().getRelatedItem().getName().getValue();
If the above line throws a NullPointerException, we have no clue
whether it is the getItem, getRelatedItem or the getName that is
returning a null value. So providing just the line number is not
sufficiently helpful in narrowing down the problem. If the stack trace
also contains the column number where the null was encountered, it will
be really helpful.
Though the above code could be rewritten to several lines so that we
can clearly identify which method returned null, there are tons of such
existing code and changing them all will be an unreasonably complex
task.
- 7
- JDK 1.4.2_05I use WebLogic 8.1 on a Solaris 9 box with 8 processors. I have JDK
1.4.2_05 installed and due to long pauses with the default collector, I
tried out the Concurrent garbage collector. However, once I do that,
the system runs out of file handles within minutes of starting the load
test. Solaris is setup with 8192 as the top limit for file handles.
I tried various options within Concurrent garbage collector (like
ParNewGC, CMSParallelRemark) but all lead to system running out of file
handles.
Any inputs ?
Thanks,
Kevin.
- 8
- JMS: the confusion BEFORE writing my first Application.I read in the sun jms doc that jms is the java interface to
Middleware, like MQ series.
Does this mean I actually need MQ series? ITs to expensive. Im
already in the programming world, so this is not a school project. My
boss came to me and told me that he would like to connect to a remote
MQ series machine. With it.
Now I have taken the channel and decided to write something at my desk
with out connecting to the remote mq. I mean, even if i didnt have to
do this project, i would still like to learn it.
I really thought that j2ee already had a queing facility built in so I
didnt need to buy mq series.
If i do need a middle where queue piece, then are there any free ones.
I thought i could go into the j2ee command line tool and just set up
the queues the way they have it in the example
Can you straighten out my confusion?
jodasi
- 9
- DES in javaHi,
I need to write a method in Java for
encrypt a String with DES.
the interface is:
public String encrypt(String nameofthestringtoencript);
the return String have to be DES(nameofthestringtoencript)
What is the procedure to follow and the java methods
to do it?
Thanks in advance.
- 10
- convert xnl node to xml data typeHi all,
I am new to java programming. In my application I wanted to convert xml
node to an xml data type. The reason behind doing this is: I wanted to
write this xml node (in to a column of xml data type) with in to a
sequel server 2005 database. I am using JDBC driver (version 4) to
connect to the database. My stored procedure from the database side
accepts only xml data type and not xml Node type. So I wanted to
convert this xml Node to XML data type.
Can any help me with any input.
Thanks
Nathan.
- 11
- ports/71078: Update port: java/eclipse-pmd upgrade to supportSynopsis: Update port: java/eclipse-pmd upgrade to support eclipse3
State-Changed-From-To: open->feedback
State-Changed-By: linimon
State-Changed-When: Thu Sep 2 23:17:52 GMT 2004
State-Changed-Why:
Please submit port updates in diff -u format as versus the current
port. This makes it much easier for ports committers to understand
what is being changed. Thanks.
http://www.freebsd.org/cgi/query-pr.cgi?pr=71078
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 12
- Multiple Exception Definitions in One FileIn Ada I could have a package that consisted of a group of exception
declarations, and any compilation unit that "withed" in that package
could use them. On the other hand if I want to use my own customized
exceptions in Java, it looks like I have to declare each one individu-
ally in its own file. Is this really what I have to do, or is there a
way to declare a bunch of exceptions in one file so that I can use
them elsewhere?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
- 13
- Starting using Inversion of ControlHi
I have an existing (Java desktop) application, which I'm looking at
converting to use Inversion of Control principles. I'm just starting
to look at the Java containers - HiveMind, Pico, Spring etc.
I'm not sure about how components/services/objects always have to be
instantiated, rather than retrieved from an existing object.
In my application, I have a IHandler interface, a single instance of
which is used by a number of objects.
Currently, the instance is supplied by an Engine class, which has an
inner class implementing IHandler, and a getHandler() method which
returns an instance of the inner class.
I'm wondering how, when using Inversion of Control, I can supply this
instance of IHandler to the objects which require it.
Most of the containers seem to require that the instance is *created*.
However, in this case, the instance should be *returned* from an
existing object (which will also have been created by the container).
What's the best way to deal with this situation?
I could, for example, make the IHandler inner class to be a public
class, so it can be instantiated directly. But I'm not convinced that
exposing the class in this way is the ideal way to do this.
Thanks for your help,
Calum
- 14
- learning J2EEHi all,
I have been a java developer for around 5 years, and I think it is time to
move into the J2EE arena.
Just by looking at monster.com, it becomes very obvious how important J2EE
has become, and if anyone is planning to make Java their bread and
Given that J2EE is not used in my current job, what is the best way to learn
it on my own and in my free time?
I looked at the websites of community colleges and universities around my
area, and I found that they only offer beginner and intermediate Java
classes, with no emphasis on J2EE.
What do you guys think is a good way to achieve this goal? How do
programmers usually make the transition from Java programmers to J2EE?
I have already experimented with Tomcat and some basic jsp stuff, but i am
sure J2EE is much more than that.
Any idea is greatly appreciated, and if you have a success story, please
share it here!
Cheers
hilz
- 15
- Identify unused methods??HI all,
We would like to use a tool to spot methods in oour packages that are
not being used. We have the entire source set under Eclipse, so a
plugin would be best. We do not want anything too complex or a graph,
or statistics, just a simple report that indicates what methods are not
used. Does anyone know of such a thing?
I did look in the usual places; I found code formatters, style
analyzers, code coverage tools...but no tool that does what I've
outlined.
Thanks,
Alejandrina
|
|
|