| what's wrong with this java statement? |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Help with Extending a classHi,
I am writing a distributed Battleship game using RMI. I need this
class to extend both javax.swing.JFrame AND UnicastRemoteObject. Is
there anyway around this?
public class MainGUI extends javax.swing.JFrame implements
BattleShipClientIntf {
Thanks.
- 6
- Underline in a JTextfieldIs it possible to display underline in a JTextfield? It is possible
using styles in styled text area. But how to do it on JTextfield? What
is the related function?
-Sameer
- 6
- Sexy Latinas Get Fucked Before Swapping Some Cum Just few link on some movies...
All just for you...
Download
>>>>> http://download-video.12w.net
>>>>> http://world-sex.urllogs.com
>>>>> http://video-sex.12w.net
CLICK FREE DOWNLOAD VIDEO PORN...
L
I
C
K
T
O
W
A
T
C
H
V
I
D
E
O
P
O
R
N
D
O
W
N
L
O
A
D
F
R
E
E
.
.
.
W
E
L
C
O
M
T
O
M
O
V
I
E
S
P
O
R
N
D
O
W
N
L
O
A
D
.
.
.
- 9
- Networking (ccna & ccnp) Interview Q & A , Exam MaterialsHi,
Frenz, Hope all r fine, Networking Materials for Beginners,..
Below sites are too usefull for Networking students..Plz reply u'r
comments about tis site coz i want to improve my site to provide more
materials abt N/w-ing
Thanks
Regards
http://cinemas4u.blogspot.com
Basics Q & A {Switching}
http://cinemas4u.blogspot.com/2006_11_23_archive.html
OSI
http://cinemas4u.blogspot.com/2006_10_04_archive.html
Important Networking Q & A
http://cinemas4u.blogspot.com/2006_10_28_archive.html
TCP /IP Review
http://cinemas4u.blogspot.com/2006_10_26_archive.html
Basic Networking Q & A
http://cinemas4u.blogspot.com/2006_10_26_archive.html
EIGRP Q & A
http://cinemas4u.blogspot.com/2006_10_07_archive.html
OSPF Q & A Part -II
http://cinemas4u.blogspot.com/2006_10_30_archive.html
Routing Information Protocol
http://cinemas4u.blogspot.com/2006_10_31_archive.html
Routing Information Protocol Version 2
http://cinemas4u.blogspot.com/2006_10_31_archive.html
IGRP Q & A
http://cinemas4u.blogspot.com/2006_11_01_archive.html
V-LAN
http://cinemas4u.blogspot.com/2006_11_09_archive.html
Networking Basics
http://cinemas4u.blogspot.com/2006_11_08_archive.html
Layer 3 Switching
http://cinemas4u.blogspot.com/2006_11_07_archive.html
Dynamic Routing Protocols
http://cinemas4u.blogspot.com/2006_11_04_archive.html
Dynamic Routing Protocols Part- II
http://cinemas4u.blogspot.com/2006_11_05_archive.html
Static Routing
http://cinemas4u.blogspot.com/2006_11_03_archive.html
OSPF Q & A in CCNP
http://cinemas4u.blogspot.com/2006_11_14_archive.html
IP Routing Principles
http://cinemas4u.blogspot.com/2006_11_17_archive.html
Ethernet LAN's-Layer-2 Q & A
http://cinemas4u.blogspot.com/2006_11_18_archive.html
Switching ( Multilayer Switching)
http://cinemas4u.blogspot.com/2006/12/switching-multilayer-switching.html
Basics Q & A {Switching}
http://cinemas4u.blogspot.com/2006/11/basics-q-switching.html
- 10
- 11
- 11
- Internet explorer security message Hi
I have a web page with a form in it. I push the submit button
it does well another page is opened. But when I push the back button
on the toolbar to recall the previous page Internet Explorer gives a
security message saying that the previous page contains postdata and
internet explorer doesnt send it for me. So I need to push the refresh
button and a try again button to reload the previous page. Isnt this
to complicated for user. I use lots of pages which contain postdata.
So a user needs to push the refresh button many times to get the
previous page.
How do I solve this problem? Is there anyway to disable this behaviour
of internet explorer? Or should pass the form by get method instead of
post method?
Thanks
Sinan
- 11
- Vp of Software EngineeringWe, a few ex Columbia University, Microsoft, and Google Employee's
(and others) are developing a software and hardware solution for
children,
educators and parents. Our goal is to increase education to
children/students, while decreasing video games / PC games / online
games and website visits / cell phone activity usage. This will be
behavior modification approach to the learning experience, for
children between the ages of five and eighteen. Parents and
educators
will now have a tool that encourages learning and creative problem
solving by motivating their children to earn game / play time /
phone
time.
Parents and educators will
also have a way to control their child's/students obsession.
We will be able to now limit and/or block the amount of time played
with video
games / PC games / online activities, installing a propriety
education
portal (similar to linking to Wiki portal) and/or linking to the
school systems curriculum, which advances game play / online time /
phone time with successful completion of correctly answered
questions,
and learning modules, changing content each day and time allotted
for
continued game play. We are also creating games...
The game or online use will be blocked, using the form of a
software/hardware solution, until successful completion of tasks. We
are not only providing a service, but have created several win-win
scenarios. The child/student attention is now divided between
leisure
activity and learning transferable marketable skills through
knowledge
building by answering questions requiring creative problem solving
while blocking online use/pc and game consoles. Children or students
now have double the benefit since the education portals will shape
behavior to help them reach both their short term goals through
earning game time and long terms goals of employment or being
productive members of society.
If you're interested in working with us, please email us. We are
working in:
> - JSP/Servlet
> - Flex/Flash
> - Spring Framework
> - J2EE
> - mySQL
And other open source.
* This endeavor will be profitable for you; we
only will have a team of 12-15. We will be testing our modules soon.
My Uncle Michael Vitelli is the SVP of Best Buy, and we have top
marketing members from Google, schools and sales growing the company.
You will have to join a Google group to collaborate, we all work
regular Jobs -this currently is a part time endeavore.
Thank you for your time.
Please send contact info via our webpage w/ a brief description of
exp. Then you will be asked for a cv, if chosen. No offshore firms,
no H1B...
Regards,
Michael Vitelli
www.gamingkrib.com
- 11
- Help: jsp:include error???Hello,
I am studying with "Core Servlets and Java Server Pages Volume1" on
Servlets and JSP.And I use Resin for
examples in the book. (The problem is at chapter 13.1)
I have one jsp and one html file as below:
C:\resin\webapps\WebModule\WhatsNew.jsp
\WEB-INF\web.xml
\WEB-INF\aaa.html
WhatsNew.jsp:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<TITLE>What's New at JspNews.com</TITLE>
<LINK REL=STYLESHEET HREF="JSP-Styles.css" TYPE="text/css">
</HEAD><BODY>
<TABLE BORDER=5 ALIGN="CENTER"><TR><TH CLASS="TITLE">What's New at
JspNews.com</TABLE>
<P>
Here is a summary of our three most recent news stories:
<OL><LI><jsp:include page="WEB-INF/aaa.html"/></OL>
</BODY></HTML>
aaa.html:
<B>Bill Gates acts humble.</B> In a startling and unexpected
development, Microsoft big wig Bill Gates put on an open act of
humility yesterday.
<A HREF="http://www.microsoft.com/Never.html">More details...</A>
Here aaa.html is wanted to ben shown in the WhatsNew.jsp.
But when I call the page as http://localhost/WebModule/WhatsNew.jsp.
it gives the error given below. If I put the aaa.html to the WebModule
folder as the WhatsNew.jsp it works. But I wanted aaa.html cannot be
seen by clients.Author also states this as:
"Finally, note that you are permitted to place your pages in the
WEB-INF directory. Although the client is prohibited from directly
accessing files in this directory, it is the server, not the client,
that accesses files referenced by the page attribute of jsp:include.
In fact, placing the included pages in WEB-INF is a recommended
practice; doing so will prevent them from being accidentally accessed
by the client (which would be bad, since they are usually incomplete
HTML documents)."
Error is:
java.io.FileNotFoundException: /WebModule/WEB-INF/aaa.html
at com.caucho.servlets.FileServlet.service(FileServlet.java:245)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:113)
at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:129)
at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:211)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:476)
at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:345)
at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:807)
at _jsp._whatsnew__jsp._jspService(/WhatsNew.jsp:18)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:571)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:155)
at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:211)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:177)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:331)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:464)
at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
at java.lang.Thread.run(Thread.java:534)
What is wrong?
Please help...
Thanks.....
- 14
- extract information fron a web pageim wanting to extract information fron a ebay web page auction. wanted is
the item number , date , cost, discription then have 3 more fields to fill
in then send all to a data base
i do reserch for a database and this type of script would really help.
if you can help please let me know via email
email***@***.com
thanks
doug
- 14
- What is a type error?
Marshall wrote:
> Joe Marshall wrote:
> > Marshall wrote:
> > >
> > > Consider the following Java fragment:
> > >
> > > void foo() {
> > > int i = 0;
> > > int j = 0;
> > >
> > > // put any code here you want
> > >
> > > j = 1;
> > > i = 2;
> > > // check value of j here. It is still 1, no matter what you filled in
> > > above.
> > > // The assignment to i cannot be made to affect the value of j.
> > >
> > > }
> >
> > True, but you have hidden the pointers. Semantically, the identifiers
> > i and j refer not to integers but to locations that hold integers. The
> > assignment modifies the location.
>
> What the implementation looks like shouldn't affect how we speak
> of the logical model. In the above code, there are no pointers.
>
> By your definition, "pointer" and "variable" are synonyms. That doesn't
> seem like a good idea to me. (What if i and j end up in registers?
> I have not heard it said that registers have addresses.)
You probably won't like this, but....
The example you give above is a bit ambiguous as to whether or not it
shows `true' mutation. So what do I mean by `true' mutation? The code
above could be transformed by alpha-renaming into an equivalent version
that does no mutation:
void foo() {
int i = 0;
int j = 0;
// put any code here you want
int jj = 1;
int ii = 2;
// rename all uses of i to ii and j to jj after this point.
}
Once I've done the renaming, we're left with a pure function. I claim
that this sort of `mutation' is uninteresting because it can be
trivially eliminated through renaming. Since we can eliminate it
through renaming, we can use a simplified semantics that does not
involve a `store', and use a substitution model of evaluation.
The more interesting kind of mutation cannot be eliminated through
renaming. The semantic model requires the notion of a stateful
`store', and the model is not referentially transparent: substitution
does not work. These qualities are what make mutation problematic. My
claim is that this kind of mutation cannot be had without some model of
pointers and references.
There is a further distinguishing characteristic: Can I write a
program that detects the mutation (and acts differently depending on
whether there is mutation or not)? It is unclear from your example
above whether you intended this to be possible, but certainly there is
no way for a caller of foo to tell that foo reassigns an internal
variable. If there a procedure is extrinsically a pure function, then
there is no real meaning to any `mutation' that goes on inside; there
is always a way to turn the internal mutation into a pure function
through alpha-renaming.
>
> Clearly there is *some* difference between a language which allows
> explicit pointers and thus aliasing and one that doesn't. What term
> would you use? First-class variables?
My argument to you in re this statement:
> Again, I disagree: it is posible to have mutability without
> pointers/identity/objects.
is that mutability without a notion of pointers, identity, or objects
is trivially eliminated through alpha renaming and thus isn't the
`mutability' of interest.
- 15
- useBean class attributeHi there,
I am operating with JBoss4 and Tomcat5.
Jasper throws me an exception because of an invalid value for the
class attribute.
Path is set correct also in the WAR-File.
The problem seems to be that the class isn't a bean.
Therfore I changed the errorOnUseBeanInvalidClassAttribute flag in
Tomcat to false, but that didn't help either.
Does anyone know how to handle that problem?
Cheers
- 15
- applet to applet communicationI have an app and the latest running on an NT4 box, and the latest
microsoft security patch has broken the applets.
Applet A opens an new browser window which contains Applet B.
Applet B can no longer get information from applet A.
Any ideas on how to get these 2 applets to communicate with each other,
in different browser windows? This is running in Netscape 4.7.
Has anyone else had this problem>
Thanks!
Gene
- 16
- SETTING POSITIONHello,
I am new to Java and have been practicing by placing graphical shapes on
screen. I would like to know how to choose the coordinates where the shapes
appear within my applet window. I can't seem to find any helpful references
on this seemingly simple task. If anyone could give me details of the method
required I would really appreciate it.
Many Thanks.
- 16
- IcedTea - a first step towards OpenJDKIcedTea is a temporary fork of OpenJDK which allows building with a free
toolchain and adding/replacing code which is not yet available under a free
license. First deb Packages for amd64 and i386 are available at
deb http://people.ubuntu.com/~doko/ubuntu/ gutsy/
deb-src http://people.ubuntu.com/~doko/ubuntu/ gutsy/
Although the packages are built on gutsy, they are installable on sid as well.
These packages target developers only. Feedback about the following topics is
appreciated:
- packaging and installation issues; the packaging is derived from the
sun-javaX packages, so the packages do have the same "features" and
bugs.
- license issues; we currently cannot upload the packages, because some
files still have non-free or no licenses. Unfortunately there doesn't
exist yet a list of problematic files.
- usability; do packages and applications build and run with the new
jre and jdk (focus on main)?
Please contact Michael Koch or me if you do want to join the packaging and
maintainance effort. Thanks for any input.
Matthias
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
|
| Author |
Message |
Nick

|
Posted: 2006-4-18 8:59:00 |
Top |
java-programmer, what's wrong with this java statement?
i can execute the following statement properly
stmt.execute("insert into computer values('fd','mic',123,'fds')");
but when i substitute the parameters into the statement errors
occour,what's wrong with the following statement?
*jmodel ,jbrand, jprice, jdesc are text field
stmt.execute("insert into computer values ('"
+jmodel.toString()+"','"+jbrand.toString()+"',"+Integer.parseInt(jprice.toString())+",'"+jdesc.toString()+"')");
|
| |
|
| |
 |
TheOne

|
Posted: 2006-4-18 9:07:00 |
Top |
java-programmer >> what's wrong with this java statement?
I think you will have to use prepared statement for using variables
like that.
Nick wrote:
> i can execute the following statement properly
>
> stmt.execute("insert into computer values('fd','mic',123,'fds')");
>
> but when i substitute the parameters into the statement errors
> occour,what's wrong with the following statement?
>
> *jmodel ,jbrand, jprice, jdesc are text field
>
> stmt.execute("insert into computer values ('"
>
> +jmodel.toString()+"','"+jbrand.toString()+"',"+Integer.parseInt(jprice.toString())+",'"+jdesc.toString()+"')");
|
| |
|
| |
 |
Roy Epperson

|
Posted: 2006-4-18 12:11:00 |
Top |
java-programmer >> what's wrong with this java statement?
Nick wrote:
> i can execute the following statement properly
>
> stmt.execute("insert into computer values('fd','mic',123,'fds')");
>
> but when i substitute the parameters into the statement errors
> occour,what's wrong with the following statement?
>
> *jmodel ,jbrand, jprice, jdesc are text field
>
> stmt.execute("insert into computer values ('"
>
> +jmodel.toString()+"','"+jbrand.toString()+"',"+Integer.parseInt(jprice.toString())+",'"+jdesc.toString()+"')");
>
To use ' " and several other characters in a value, they must be
escaped. Prepare statements take care of the escaping for you; but
require more code. But it simplifies the escaping and
PreparedStatements can be reused if doing a lot of inserts at one time.
There is a good example on the JDBC tutorial on java.sun.com. Watchout
- SQL indicies are 1 based not 0 based as in Java.....
|
| |
|
| |
 |
sush

|
Posted: 2006-4-18 13:55:00 |
Top |
java-programmer >> what's wrong with this java statement?
please check the spaces
|
| |
|
| |
 |
Venkatesh

|
Posted: 2006-4-18 16:25:00 |
Top |
java-programmer >> what's wrong with this java statement?
Hi,
The problem is because of usage of "toString()" .... U should use
getText() to get the text present in a text field.
Try executing this statement and it should work:
stmt.execute("insert into computer values ('"
+jmodel.getText()+"','"+jbrand.getText()+"',"+Integer.parseInt(jprice.getText())+",'"+jdesc.getText()+"')");
|
| |
|
| |
 |
Vova Reznik

|
Posted: 2006-4-18 21:43:00 |
Top |
java-programmer >> what's wrong with this java statement?
Nick wrote:
> i can execute the following statement properly
>
> stmt.execute("insert into computer values('fd','mic',123,'fds')");
>
> but when i substitute the parameters into the statement errors
> occour,what's wrong with the following statement?
>
> *jmodel ,jbrand, jprice, jdesc are text field
>
> stmt.execute("insert into computer values ('"
>
> +jmodel.toString()+"','"+jbrand.toString()+"',"+Integer.parseInt(jprice.toString())+",'"+jdesc.toString()+"')");
>
What was the error(s)?
Was it SQLException? (because fields in data base are too short and
string returning by JTextField::toString() usually very long)
Was it NumberFormatException?
(because you didn't override one of your text field toString() to
return numeric string?)
You have already one response about using text fields:
instead of toString use getText
|
| |
|
| |
 |
Nick

|
Posted: 2006-4-18 21:57:00 |
Top |
java-programmer >> what's wrong with this java statement?
thanks!
|
| |
|
| |
 |
Nick

|
Posted: 2006-4-18 21:57:00 |
Top |
java-programmer >> what's wrong with this java statement?
thanks!
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- trying to integrate jfcUnit on MavenI have been trying with no success to add the jar jfcUnit.jar on my
maven project. the main problem is that anytime i am trying to build
it. I get the following message:
Attempting to download jfcunit.
WARNING: Failed to download jfcunit.
The build cannot continue because of the following unsatisfied
dependency:
jfcunit
On my project.xml I have defined the jfcunit dependency as follows:
<dependency>
<groupId>commons-cli</groupId>
<artifactId>jfcunit</artifactId>
<jar>jfcunit</jar>
</dependency>
on the file system itself i have inserted this jfcunit on commons-cli
directory. I have also added to the classpath, and I have tried on
eclipse and it works. Nevertheless wnytime i am trying to build a
project sing maven, i am getting the same error.
I would appreciate any help regarding this matter.
Thanks
- 2
- Arrow key functionality in the ButtonGroupHi All,
I added 4 JRadio buttons to ButtonGroup. For these radio buttons i am
unable to achieve the arrow key functionality. here i am attaching the
code
rateList = theController.getDeleteOptionList();
for (int i = 0, j = 1; i < rateList.size(); i++) {
ListElement listRb = (ListElement) rateList.get(i);
JRadioButton radioBtn = new JRadioButton(listRb.getTextValue());
radioBtn.setActionCommand(listRb.getTextValue());
radioBtn.addActionListener(actionclass);
deleteButtonGrp.add(radioBtn);
}
Thanks for ur help in advance...
Srinivas.
- 3
- JList/MouseListenerHi all
I'm using two JLists with the same MouseListener in a JFrame. How can I find
out on which JList the MouseEvent was released?
Is it generally possible or should I use a MouseListener for each JList?
Thanx for your help
Roman
- 4
- Shift-click doesn't workG'day all
Just recently IE has done something - it wasn't me!!
When i shift-click now to open in a new window it doesn't work - the new
page will open but wo'nt load anything, it just gets stuck.
Any idea on how to fix it?
Cheers
B.
- 5
- Bug#476978: marked as done (default-jre: long description unfinished)This is a multi-part message in MIME format...
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
Your message dated Sat, 26 Apr 2008 22:17:02 +0000
with message-id <email***@***.com>
and subject line Bug#476978: fixed in java-common 0.30
has caused the Debian Bug report #476978,
regarding default-jre: long description unfinished
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact email***@***.com
immediately.)
--
476978: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476978
Debian Bug Tracking System
Contact email***@***.com with problems
Received: (at submit) by bugs.debian.org; 20 Apr 2008 14:01:53 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02
(2006-07-26) on rietz.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-9.9 required=4.0 tests=BAYES_00,FORGED_RCVD_HELO,
HAS_PACKAGE autolearn=no version=3.1.4-bugs.debian.org_2005_01_02
Return-path: <email***@***.com>
Received: from mail.biedermanns.net ([213.133.100.49] helo=mail.biedermann.info)
by rietz.debian.org with esmtp (Exim 4.63)
(envelope-from <email***@***.com>)
id 1Jna76-0008TR-Q6
for email***@***.com; Sun, 20 Apr 2008 14:01:53 +0000
Received: from chello084112034056.10.11.vie.surfer.at ([84.112.34.56] helo=edna.deb.at)
by mail.biedermann.info with esmtpsa
(Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1 (Debian))
id 1Jna74-0001dP-37
for <email***@***.com>; Sun, 20 Apr 2008 16:01:51 +0200
Received: from rhonda by edna.deb.at with local (Exim 4.69)
(envelope-from <email***@***.com>)
id 1Jna7R-0006Pe-LV
for email***@***.com; Sun, 20 Apr 2008 16:02:13 +0200
Date: Sun, 20 Apr 2008 16:02:13 +0200
From: Gerfried Fuchs <email***@***.com>
To: Debian Bug Tracking System <email***@***.com>
Subject: default-jre: long description unfinished
Message-ID: <email***@***.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.39-0.1
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
Delivered-To: email***@***.com
Package: default-jre
Version: 1.5-29
Severity: minor
Hi!
#v+
Description: Standard Java or Java compatible Runtime
This package points to the Java runtime, or Java compatible
runtime recommended for the powerpc architecture,
which is java-gcj-compat-dev for .
#v-
I guess there is something missing before the final stop. :)
Rhonda
Received: (at 476978-close) by bugs.debian.org; 26 Apr 2008 22:31:37 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02
(2006-07-26) on rietz.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-7.7 required=4.0 tests=BAYES_00,FVGT_m_MULTI_ODD,
HAS_BUG_NUMBER,HEADER_X_KATIE,IMPRONONCABLE_2,MURPHY_WRONG_WORD1,
MURPHY_WRONG_WORD2 autolearn=no
version=3.1.4-bugs.debian.org_2005_01_02
Return-path: <email***@***.com>
Received: from ries.debian.org ([128.148.34.103])
by rietz.debian.org with esmtp (Exim 4.63)
(envelope-from <email***@***.com>)
id 1Jpsvh-0005jT-Ds
for email***@***.com; Sat, 26 Apr 2008 22:31:37 +0000
Received: from dak by ries.debian.org with local (Exim 4.63)
(envelope-from <email***@***.com>)
id 1Jpsha-0000pq-Pt; Sat, 26 Apr 2008 22:17:02 +0000
From: Michael Koch <email***@***.com>
To: email***@***.com
X-DAK: dak process-unchecked
X-Katie: $Revision: 1.65 $
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Subject: Bug#476978: fixed in java-common 0.30
Message-Id: <email***@***.com>
Sender: Archive Administrator <email***@***.com>
Date: Sat, 26 Apr 2008 22:17:02 +0000
Source: java-common
Source-Version: 0.30
We believe that the bug you reported is fixed in the latest version of
java-common, which is due to be installed in the Debian FTP archive:
default-jdk-builddep_1.5-30_amd64.deb
to pool/main/j/java-common/default-jdk-builddep_1.5-30_amd64.deb
default-jdk_1.5-30_amd64.deb
to pool/main/j/java-common/default-jdk_1.5-30_amd64.deb
default-jre-headless_1.5-30_amd64.deb
to pool/main/j/java-common/default-jre-headless_1.5-30_amd64.deb
default-jre_1.5-30_amd64.deb
to pool/main/j/java-common/default-jre_1.5-30_amd64.deb
java-common_0.30.dsc
to pool/main/j/java-common/java-common_0.30.dsc
java-common_0.30.tar.gz
to pool/main/j/java-common/java-common_0.30.tar.gz
java-common_0.30_all.deb
to pool/main/j/java-common/java-common_0.30_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to email***@***.com,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Koch <email***@***.com> (supplier of updated java-common package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing email***@***.com)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 27 Apr 2008 00:13:55 +0200
Source: java-common
Binary: java-common default-jre default-jre-headless default-jdk default-jdk-builddep
Architecture: source all amd64
Version: 0.30
Distribution: unstable
Urgency: low
Maintainer: Debian Java Mailing List <email***@***.com>
Changed-By: Michael Koch <email***@***.com>
Description:
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-builddep - Standard Java or Java compatible build dependencies
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
java-common - Base of all Java packages
Closes: 476978
Changes:
java-common (0.30) unstable; urgency=low
.
* Fix description generation for default-jre. Closes: #476978.
Checksums-Sha1:
5041e6f847455fa7f4e562f8d30913d9a1b66a10 1022 java-common_0.30.dsc
86dd75060a98ff5450a8eea5450c9290b57a2c48 66845 java-common_0.30.tar.gz
1855b7ca6ea99d03d01f9ce455b046d1b83ae50a 77022 java-common_0.30_all.deb
38200498bf10fc39c35d52d91e78077dc311d6cc 1034 default-jre_1.5-30_amd64.deb
f0563383f80aa063fea43010ee1c4c6b07e2ad3c 5568 default-jre-headless_1.5-30_amd64.deb
9fe0b0f9a0b90b7209c304b51126d3168be2b9ce 1030 default-jdk_1.5-30_amd64.deb
b3c52196e45a6f2551925ba5fe0f6349081e6e98 984 default-jdk-builddep_1.5-30_amd64.deb
Checksums-Sha256:
4f3dd377ea00d049d02dfd3f5accde7ce3dfda13d6127a76364c601dd6c9254b 1022 java-common_0.30.dsc
9ac642626c5631a9f883440862b4aa3a8b7288dcb21ae6bb63fbde5ead3a3546 66845 java-common_0.30.tar.gz
600554190a9c05d2f2b93b803eb146627208edb6acf8030f0cde3cb10a9e2bc0 77022 java-common_0.30_all.deb
53044965f85e51f762d03e2f9cdbfd919b9e619030e761258c13b5452b08bf34 1034 default-jre_1.5-30_amd64.deb
c26d792bef37535f12165880a60ef7dbaa00f57d78148d028bb26ce6b7f50738 5568 default-jre-headless_1.5-30_amd64.deb
f0e51ce63685ee14aaf716d2c1c0882f1e84cf11985522504e5b71460ffaa525 1030 default-jdk_1.5-30_amd64.deb
d243edd83651a97ea819043db83a4a115933bd378a9b636521fe0b656912e296 984 default-jdk-builddep_1.5-30_amd64.deb
Files:
b682cd43f6d7ca8abafa585aab5ddd08 1022 misc optional java-common_0.30.dsc
7c963d75a24b2eabf11b35f7f93e1120 66845 misc optional java-common_0.30.tar.gz
4b2f240539a66dde0b0e887364ad0d32 77022 misc optional java-common_0.30_all.deb
242e2f95fedff420a458ba488819cce0 1034 interpreters optional default-jre_1.5-30_amd64.deb
e9a57f3a6b29884c9d5de3eadf650cfd 5568 interpreters optional default-jre-headless_1.5-30_amd64.deb
ddfb196b43e2b388a16d5001bfad3857 1030 devel optional default-jdk_1.5-30_amd64.deb
67604df5ffdc994c5b688a0f41143575 984 devel optional default-jdk-builddep_1.5-30_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIE6nkWSOgCCdjSDsRAgtfAKCXqb9P9pKdYaqFNC+14rOM/peFngCfflI6
1XdeIAPvVGcyTCwU/KxQWSc=
=2SAN
-----END PGP SIGNATURE-----
- 6
- Problem about JavaMailHi,
I'm just trying to use JavaMail and have a strange problem.
(See the code snippet below)
When running it, the exception error message is:
errorjavax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost,
port: 25;
nested exception is:
java.net.ConnectException: Connection refused
the problem is in the line with //!!!!
If I comment this line out, it works fine.
The purpose of this line to invoke check_server is to
have a check first.
Who can give me some hints?
Thanks much!
================================================
import java.sql.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
/** Class handles sending email messages. */
public class email {
private static String mail_host = null;
public static void main (String[] args) {
mail_host = "mrby.8866.org"; //which is a valid mail server
if ( check_server(mail_host) ) //!!!!!
send();
}
public static void send ()
{
String to = "root@localhost";
String subject = "hello,world";
String total_message = "test email";
String from = "email***@***.com";
String host = mail_host;
Properties props = new Properties();
props.put("mail.smtp.host", host );
Session session = Session.getDefaultInstance(props, null);
try {
// create a message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipients( Message.RecipientType.TO,
InternetAddress.parse(to) );
msg.setSubject(subject);
msg.setText(total_message);
Transport.send(msg);
System.out.println(host);
}
catch (MessagingException mex) {
System.out.println("error"+mex.toString());
}
}
// Method to check if the SMTP service on a host is available
private static boolean check_server( String host )
{
boolean flag;
Transport tr = null;
try {
Properties props = new Properties();
Session session = Session.getDefaultInstance(props,null);
tr = session.getTransport("smtp");
tr.connect(host,null,null);
flag = true;
tr.close();
}
catch (MessagingException mx) {
flag = false;
}
finally {
try {
if (tr != null) {
tr.close();
}
}
catch (MessagingException mex) {}
}
return flag;
}
}
- 7
- a simple question realted to StringBufferHi,
I am using a StringBuffer to hold a line with fixed length of 72 chars.
Later, I am going to put char at a specified location, using
setCharAt(location, char) method.
But this code doesn't work:
<Java>
StringBuffer line = new StringBuffer(72);
line.setCharAt(5, 'A');
</Java>
This code works:
<Java>
StringBuffer line = new StringBuffer(72);
for (int i=0; i<72; i++) //make the StringBuffer contains 72 empty chars
{
line.append(' ');
}
line.setCharAt(5, 'A');
</Java>
I found that this required for loop is ridiculous. Reading the Java
document of StringBuffer suggests the first version is correct and
should work. I don't understand it.
Thank you very much for your help.
- 8
- new java.util.Date(0)Hi,
I'm sure this is some kind of Locale issue and is probably documented in the
spec, but I looked there and there are many things documented there. It
would be nice if the experts in this ng could explain the right way to think
about it.
System.out.println(new Date(0));
yields
Wed Dec 31 19:00:00 EST 1969
I guess this is the time in NY (which is what my computer is set to) when in
London it was 1/1/1970 00:00am. How can I use Date more generically?
For example, I have code which returns historical temprature. If I ask it to
return the temprature as of "1/1/1970" it will convert the string to the
Date (which is Date(0)) and then return the temperature as of 12/31/1969. I
could artificially add 5 hours, but then it won't work in CA. I could add 8
hours but then it won't work in Moscow. I could add 1 day, but then it won't
work in London.
Thanks!
Aaron Fude
- 9
- Java Axis2 Client Calling .NET 2.0 Web Service..I am able to get the call to the .net 2.0 web service with this code:
[code]
InventoryServicesStub stub = new InventoryServicesStub(null,
"http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx/Ping");
InventoryServicesStub.Ping ping = new InventoryServicesStub.Ping();
InventoryServicesStub.PingResponse response = stub.Ping(ping);
String results = response.getPingResult();
System.out.println("Response : " + results);
[/code]
I can see it execute in Visual Studio debugger and return. When control
comes back to my eclipse debugger, I get the following AxisFault:
"First Element must contain the local name, Envelope"
How do I fix this?
Here is my WSDL:
[code]
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://tempuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="Ping">
<s:complexType />
</s:element>
<s:element name="PingResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="PingResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetInventoryReport">
<s:complexType />
</s:element>
<s:element name="GetInventoryReportResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="GetInventoryReportResult" type="tns:Results" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Results">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="timestamp"
type="s:dateTime" />
<s:element minOccurs="0" maxOccurs="1" name="status"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="message"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="report"
type="tns:ArrayOfInventoryReport" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfInventoryReport">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
name="InventoryReport" nillable="true" type="tns:InventoryReport" />
</s:sequence>
</s:complexType>
<s:complexType name="InventoryReport">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="CONTRACT"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PRODUCT_NAME"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="VOLUME_TYPE"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="MV_HEADER_DATE"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="TICKET"
type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="BARRELS"
type="s:double" />
<s:element minOccurs="1" maxOccurs="1" name="PRODUCT_ORDER"
type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="SORT_ORDER"
type="s:int" />
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="PingSoapIn">
<wsdl:part name="parameters" element="tns:Ping" />
</wsdl:message>
<wsdl:message name="PingSoapOut">
<wsdl:part name="parameters" element="tns:PingResponse" />
</wsdl:message>
<wsdl:message name="GetInventoryReportSoapIn">
<wsdl:part name="parameters" element="tns:GetInventoryReport" />
</wsdl:message>
<wsdl:message name="GetInventoryReportSoapOut">
<wsdl:part name="parameters"
element="tns:GetInventoryReportResponse" />
</wsdl:message>
<wsdl:portType name="InventoryServicesSoap">
<wsdl:operation name="Ping">
<wsdl:input message="tns:PingSoapIn" />
<wsdl:output message="tns:PingSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetInventoryReport">
<wsdl:input message="tns:GetInventoryReportSoapIn" />
<wsdl:output message="tns:GetInventoryReportSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="InventoryServicesSoap"
type="tns:InventoryServicesSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Ping">
<soap:operation soapAction="http://tempuri.org/Ping"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetInventoryReport">
<soap:operation
soapAction="http://tempuri.org/GetInventoryReport" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="InventoryServicesSoap12"
type="tns:InventoryServicesSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Ping">
<soap12:operation soapAction="http://tempuri.org/Ping"
style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetInventoryReport">
<soap12:operation
soapAction="http://tempuri.org/GetInventoryReport" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="InventoryServices">
<wsdl:port name="InventoryServicesSoap"
binding="tns:InventoryServicesSoap">
<soap:address
location="http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx"
/>
</wsdl:port>
<wsdl:port name="InventoryServicesSoap12"
binding="tns:InventoryServicesSoap12">
<soap12:address
location="http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
[/code]
- 10
- XML QuestionsI have a very simple XML document for settings in an program I have written.
I want to be able to read in and update these settings.
- Would I be better using DOM or SAX?
- What would be the best parser for me?
Also, as I'm new to XML in Java (and also fairly new to Java) I'm still
unsure on what effect exactly implementing XML in my program will have. It's
a very simple program (the java files are 35kb in total) - it appears to me
that if I use XML then I'll have to include a comparatively huge XML parser
with my program when distributing it - I've just downloaded the IBM one and
it's 2.6MB. Is this true or am I misunderstanding something fundamental
here?
TIA.
- 11
- Yet another error patternRoedy Green wrote
> The problem turned out is that there is a lot of repetitive
> gobblegegook you need to make Java GUIs work. The easiest way to
> generate it is to copy paste from where you did it before, and then
> change the variable name in half a dozen places.
>
> The catch is, if you forget one of the half-dozen places the code will
> compile, but do something strange.
>
> [...]
>
> How to avoid being bitten?
I have been bitten by this copy-paste error a few times too. I find that two
things work really well for me to avoid it:
- Define variables in as narrow scope as possible. For instance, I have
often found that most of my GUI elements only need to be referenced during
construction, not during normal operation when all the listeners are set up,
so most of my buttons, menus, lists, tables, etc, are defined as final
method variables, where different parts of the GUI is constructed in
different methods. In extreme cases (like in test code) I have even break
long methods into a list of scopes to ensure that variables are not "reused"
without initialization by accident.
- If I copy more than a one or two lines, I stop and think if perhaps it
would be better to refactor the otherwise copied code into a new method.
Regards,
--
Filip Larsen
- 12
- FreeBsdCrypt updatedAlas, I don't have the time to make a proper port of this (but if someone
else wants to, please do feel free) but since there's an update and folks
may find this useful, I thought I'd mention it anyway.
FreeBsdCrypt can be found at
http://spatula.net/software/FreeBsdCrypt-1.1.jar . This contains an
implementation of FreeBSD-style MD5 crypt, which many have found useful
when trying to integrate Java stuff with FreeBSD stuff, or migrating from
other languages to servlets, or whatever.
The jar contains all the API docs, source code, and the complied class.
Usage is pretty simple anyway:
String result = FreeBsdCrypt.crypt("password", "salt");
The major change in this version is correcting the way the class name is
capitalized. It needed to start with an uppercase letter since it's a
class name, and then Pascal-casing the rest of it. Consensus on the web
seems to be that acronyms of 3 letters or more are to be Pascal-cased.
Nick
--
"The aptly-named morons.org is an obscenity-laced screed..."
-- Robert P. Lockwood, Catholic League director of research
Nick Johnson, version 2.1 http://web.morons.org/
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 13
- Datasource problames + accessing the, outside of a containerHi,
I'm completely new to J2EE and currently struggling with datasources.
We have a Oracle database we'd like to access via jboss. I've set it up as a
datasource using the oracle-xa-ds.xml fiel as an example. This appears to
have worked, in as much as we can now see it via JNDIView .
I'm having no luck actually using it however.
To test I created a servlet containg the following code :-
try
{
ic = new InitialContext();
ic.addToEnvironment("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
ic.addToEnvironment("java.naming.provider.url","jnp://localhost:1099");
ic.addToEnvironment("java.naming.factory.url.pkgs","org.jboss.naming.client");
ic.addToEnvironment("j2ee.clientName", "test");
}
catch (NamingException e)
{
out.println("Could not create JNDI " + "context: " +
e.toString());
}
try
{
DataSource ds = (DataSource) ic.lookup("java:XAOracleDS":);
con = ds.getConnection();
}
catch (Exception ex)
{
out.println("Unable to connect to database. " + ex.getMessage());
}
This fails telling me that test is not bound.
What am I doing wrong?
Our eventual plan is to have applications access this datasource from
outside of jboss. I've seen a couple of posts now suggesting that this might
not be possible. Can anyone confirm if this is the case?
Thanks
hjc
- 14
- Difference between 1.3 and 1.4 in JTable?Hi,
I wrote an application that uses a JTable to display some data. I wrote
my own cellrenderer that provides rows that contain multiple lines of text.
When a row is deleted all other rows are rerendered and the rowheight para-
meter is updated accordingly. This works in 1.3. But in 1.4 (I tried different
JDKs on different platforms (Linux/MacOSX/Windows..) the rowheights are not
updated. Is there a difference in the evaluation of this in 1.4? Maybe that
I have to change the rowheigth at a later point in the program?
Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: email***@***.com
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres
- 15
- custom jtable copy command?Hi.
I am trying to implement a custom behavior on the copy command on
jtable.
Basically I force the entire row to be selected when a user is working
with myJtable. I feel this is a good design because it allows the user
to quickly see what they are working with, without a doubt.
However I would like to customize the copy command on the jtable
because some of the items in the row are images, which I would not like
to allow the user to copy (it gets converted into text, and it looks
ugly!).
What I would like to do is have the copy command ignore the columns
with the images in them, and only copy the textual columns. Im not
sure how to go about doing this, does anyone have any insight for me?
Thanks!
|
|
|