| Question: Gui Looks Different |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- How do you do THAT with genericsI am working on an event mechanism. Part of my need is to be able to
have a pool of events that can be reused, rather than incurring the cost
of instantiating one via reflection every time I need one. The pool
interface has this method for checking out an event:
<E extends Object & Event> E checkout(Class<E> cl);
Creating an event from this is easy; "return cl.newInstance();" works
fine. The problem is in storing them for later use.
Since there are many event classes in the event hierarchy, and since I
want this method to be able to return an event of the exact type (so I
don't have to cast it after getting it), I thought to use an inner class
(PoolList<E extends Event>) that holds a list of just one type of Event
and tracks which of its objects are in use and which are available. Then
I could use a Map to key these PoolList objects by Class.
That map is the problem. I need to have it store Class<E> as keys and
PoolList<E> as values...the same parameter (E) in both. Except that the
parameter isn't fixed...it could be any implementation of Event. So the
closest thing that I have is...
private Map<Class<? extends Event>, PoolList<? extends Event>> pool;
...which is wrong because it can't guarantee that the type parameters to
Class and to PoolList are the same (only that they are both
implementations of Event, but they could very well be different ones).
Something like...
private <T extends Event> Map<Class<T>, PoolList<T>> pool;
...would work, except that it isn't legal (the <T extends Event> part
can't be used for fields, only for generic methods). It makes sense that
there should be SOME way to do it...all of the necessary type
information is there at compile time and nothing that's needed at
runtime gets erased. But I can't come up with it.
All I need is a Map that knows that if one type parameter is being used
in the key, the same one should be used in the value. Is there a way in
generics to do this?
- 1
- Java Training*Free* and Guaranteed placementsHello,
I would like to quickly introduce our training programs to you. Please
do refer your friends or colleagues for the same.
We have two batches starting from June 3rd 2006. Training will last for
5 weeks and is free with Guaranteed placements within a month from
completion of the batch.
JAVA TRAINING
Batch Starts: June 3rd 2006
Duration: 5 Weeks
Location: East Windsor, CT
We will provide-
* Free accommodation * F1 to H1 transfer * Ongoing
onsite
support after getting placed * Green Card processing
We have an excellent Referral Policy. Please feel free to contact us
for
more information regarding the same.
call me ASAP at 860 436 6396
Regards,
Surbhi
Credent Technologies
30 Brookfield st, Suite - A, South Windsor, CT 06074
| Day-time: 860 436 6393 | Fax: 8603712779
email***@***.com
- 3
- Specify security access in JNLPIs it possible to specify what access the web start application needs to
run?
Using the JNLP code
<security>
<all-permissions/>
</security>
All access can be gained, but I would like to restrict it to contacting
certain servers and clipbaord access. More like 'java.awt.AWTPermission
"accessClipboard"'. Is it possible to use this policy code in the JNLP file?
G
- 3
- The new Net Beans IDE Java developer software. Good in theoryNowadays when you obtain the SDK form java.com
you get a new interactive programming environemt
much like the Borland C++ IDE.
Up to now I've been developing applications "the old way"
using the operating system command line method.
that is, javac MyApp.java
Then my computer at home crashed and I decided to install the
JDK on my office computer. This was when I got the new
Net Beans IDE. It all seemed good in theory, having eveything
conveniently in one package, the editing, compiling and
executing of your program. It even promised a way to assemble
Jar files.
The problem is that application programs which compiled just fine
using the Command line compiler (javac MyApp.java) seemed to generate
numerous "Cannot Resolve Symbol" errors on this new IDE thing.
This is despite I had all necessary classes in the same directory.
Another thing, I cannot make Jar files for my applets.
I also han do problems with the command line method.
I just don't understand. What's worse is that there are no readily
available online resources to address such issues.
Thank goodness I didn't have to pay for this thingy.
What did these super-qualified programmers employed by Sun Microsystems
lear in college?
I finally got my home computer up and running again and
I so happend to have an SDK (command line java compiler) from a CD I got
with a Java textbook.
I loaded it onto my computer and I am back in business again.
Francis
- 3
- Regular Expression to match the domain part of an email addressHi,
I'm trying to compile a regular expression that will match the domain
part of an email address. The email address has been split into 2
strings, the part before the @ sign and the part after the @ sign.
This regular expression is just working with the part after the @ sign.
The pattern that I have compiled appears to work for all combinations
except for something like:
a.com
b.com
However, the following do get matched:
a.co.uk
b.co.uk
I think the problem I have is because this combination is only a single
character long. The regular expression is truly horrendous, but I'm now
stuck with the way it has been done and need to figure out how to
modify it to accept the combination of "a.com" as a domain part of an
email address.
Can anyone tell me what's causing this problem from the expression
below?
Pattern.compile("^([\\*\\w]([\\*\\w\\-]{0,61}[\\*\\w])?\\.)*[\\*\\w]([\\*\\w\\-]{0,61}[\\*\\w])\\.[\\*\\w]([\\*\\w\\-]{0,61}[\\*\\w])?$");
Many thanks,
Emma
- 7
- Adding Fractions ProblemI can use the code below to add fractions together through adding instances
of the class Rational together, but my code to reduce the result to its
lowest terms has no effect. Why is this?
public class Rational
{
// instance variables - replace the example below with your own
private int numerator;
private int denominator;
public Rational()
{
}
public Rational(int num, int denom)
{
numerator = num;
denominator = denom;
}
public int getNumerator()
{
return numerator;
}
public int getDenominator()
{
return denominator;
}
public Rational add(Rational rhs)
{
int numerator1 = (rhs.getDenominator() * numerator);
int newDenom = (rhs.getDenominator() * denominator);
int numerator2 = (denominator * rhs.getNumerator());
int newNum = (numerator1 + numerator2);
if((newDenom % newNum) == 0)
{
// This code is supposed to reduce the result to its lowest
terms
int commonFactor = (newDenom / newNum);
newDenom /= commonFactor;
newNum /= commonFactor;
}
return new Rational(newNum, newDenom);
}
}
- 8
- A simple way to play a file in an ApplicationHi all,
I am looking for a simple way to play a sound clip (.au file) in a java
application (not applet). AudioClip in java.applet seems to require URLs for
clips, and the Java Sound API looks a little too elaborate for what I am
trying to do. All I need is for this .au file to be played once inside
another method. Can anyone give me some pointers here?
TIA
- 9
- 9
- Barcode reading in JavaHi Everybody I am an MCA student.
I want to know how does the bar code reaer works and How we can use it
in a poject where we can take input by reading the bar code and
display the information about the item.
like in malls they just read the barcode and all the info comes there?
Which tool to use?
I am a fresher and want to implement this in project.
Thank U
Pankaj
- 9
- What is meant by 'canonical representation'Hi,
I was reading the sun java api 1.4.2 and found the following for
String.intern().
public String intern()
Returns a canonical representation for the string object.
What is a canonical representation? Any example?
//Mikael
- 9
- Her tight ass shows a massive gape as a cock drills her arse 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
- 9
- applet doesn't find jars !!Greetings, I'm trying to create graphics with jfree in an applet
here are the facts :
<HTML>
<HEAD>
<TITLE>Hello to Everyone!</TITLE>
</HEAD>
<BODY>
<APPLET codebase="http://localhost/applets/classes"
CODE="AppletBarChartDemo.class"
WIDTH="400"
HEIGHT="325"
archive="jfreechart-0.9.18.jar, jcommon-0.9.3.jar, log4j-1.2.8.jar>
<PARAM name="sourcexml" value="donnees.xml" >
</APPLET>
</BODY>
</HTML>
My console says :
java.io.IOException: Server returned HTTP response code: 400 for URL:
http://localhost/applets/classes/log4j-1.2.8.jar>
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
java.lang.NoClassDefFoundError at
org.jfree.chart.ChartFactory.createBarChart(ChartFactory.java:386)
java.lang.NoClassDefFoundError at
org.jfree.chart.ChartFactory.createBarChart(ChartFactory.java:386)
but my webserver (IIS on w2K) structure is thus :
root/applets/classes/
in it, I got the class files and the afore mentioned jars
And of course, I can run it under eclipse as an applet !!!
Browsers tested are IE6 and Firefox..
any tips ?
- 11
- Response Control ProblemI am trying to connect to IBM Directory server using Sun JNDI
implementation. The scenario: Connecting to the directory using an
expired password. When I do this I expect to get a Password Expiration
response control that indicates that the password has been expired.
However when i execute the code I get no response control. The context
returned is null. Snippet of my code is shown below:
Hashtable env = new Hashtable(11);
env.put( Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://.../");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "dn...");
env.put(Context.SECURITY_CREDENTIALS, "...");
Control[] ctls = new Control[] {new PasswordPolicyRequestControl()};
ldapctx = new InitialLdapContext(env,ctls);
It throws AuthenticationException where I try to get the response
control but it returns null.
Thanks.
Ashish
- 12
- (Review ID: 186942) # HotSpot Virtual Machine Error, Internal
--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, Jun 02, 2003 at 14:30:27 -0700, Tom Samplonius wrote:
> > FULL OS VERSION :
> > FreeBSD sherman.cs.miami.edu 4.5-RELEASE-p26 FreeBSD 4.5-RELEASE-p26 #1: Sun Mar 30 17:45:29 EST 2003 email***@***.com:/usr/obj/usr/src/sys/SHERMAN i386
> Probably should use 4.8-RELEASE instead, and upgrade the Linux emulator.
I encounter the same error, with my 5.1-BETA
Terry [/home/ijliao] -ijliao- /usr/local/linux-sun-jdk1.4.1/bin/java -version
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_03-b02 mixed mode)
#
# Error ID: 4F533F4C494E55580E43505002DD
#
Abort (core dumped)
--
The sooner you start to code, the longer the program will take.
--- Roy Carlson
--IJpNTDwzlM2Ie8A6
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iD8DBQE++ZZyrMYBZRHAI4IRAtlWAKC0FYiYG7KRDPC5H5W8VA3MGhDDWQCaAnsl
CFbtsDjRYc6BIM/KFEl6RVM=
=TXcN
-----END PGP SIGNATURE-----
--IJpNTDwzlM2Ie8A6--
- 16
- Java Swing Certified?I'm a Java Certified programmer (310-035) and currently I'm working
with Swing GUI components in my job.
I would like to ask if anybody knows if there's any certification exam
for Swing-AWT. I know this topic was removed from the programmers exam,
but I think this is still included in another exam.
Are there any good book to recommend for Swing?
Thank you.
Pablo
|
| Author |
Message |
Ken Browning

|
Posted: 2007-8-15 22:39:00 |
Top |
java-programmer, Question: Gui Looks Different
I am a fairly new java developer, so the answer to my question may be
obvious to the veterans, but it is not obvious to me, so here goes. I
have an application that has several progress bars and other guid
widgets in it. On the system (a desktop with CRT) where the code was
developed the GUI looks normal. If I run the same code on my laptop,
the app still runs but the GUI is not drawn correctly. Is there a fix
(easy or otherwise) for this? Many thanks in advance,
Ken Browning
|
| |
|
| |
 |
Karsten Lentzsch

|
Posted: 2007-8-15 23:05:00 |
Top |
java-programmer >> Question: Gui Looks Different
Ken,
> [...] On the system (a desktop with CRT) where the code was
> developed the GUI looks normal. If I run the same code on my laptop,
> the app still runs but the GUI is not drawn correctly. Is there a fix
> (easy or otherwise) for this? [...]
The Look&Feel differs with the Java version you're using.
Sun has improved the Windows and cross-platform L&fs
with every version; the newer the better.
I provide the free JGoodies Windows L&f that is based
on the Sun Windows L&f. It corrects a bunch of issues
Sun's Windows L&f and adds some options. Find more
information here: https://looks.dev.java.net/
-Karsten Lentzsch
|
| |
|
| |
 |
Ken Browning

|
Posted: 2007-8-15 23:20:00 |
Top |
java-programmer >> Question: Gui Looks Different
The Java SDK/JRE versions (the latest from the Sun web site) are the
same on both machines, so there is no difference there.
On Wed, 15 Aug 2007 17:04:56 +0200, Karsten Lentzsch
<email***@***.com> wrote:
>Ken,
>
>> [...] On the system (a desktop with CRT) where the code was
>> developed the GUI looks normal. If I run the same code on my laptop,
>> the app still runs but the GUI is not drawn correctly. Is there a fix
>> (easy or otherwise) for this? [...]
>
>The Look&Feel differs with the Java version you're using.
>Sun has improved the Windows and cross-platform L&fs
>with every version; the newer the better.
>
>I provide the free JGoodies Windows L&f that is based
>on the Sun Windows L&f. It corrects a bunch of issues
>Sun's Windows L&f and adds some options. Find more
>information here: https://looks.dev.java.net/
>
>-Karsten Lentzsch
|
| |
|
| |
 |
Thomas Kellerer

|
Posted: 2007-8-15 23:33:00 |
Top |
java-programmer >> Question: Gui Looks Different
Ken Browning wrote on 15.08.2007 16:38:
> I am a fairly new java developer, so the answer to my question may be
> obvious to the veterans, but it is not obvious to me, so here goes. I
> have an application that has several progress bars and other guid
> widgets in it. On the system (a desktop with CRT) where the code was
> developed the GUI looks normal. If I run the same code on my laptop,
> the app still runs but the GUI is not drawn correctly. Is there a fix
> (easy or otherwise) for this? Many thanks in advance,
> Ken Browning
I assume you are using a Windows computer. In that case problems with painting
in Java are most of the time caused by problems in the graphics driver. Try
running your application with -Dsun.java2d.noddraw=true to turn off the usage of
DirectDraw in Java. That might fix your problems. If it doesn't try to upgrade
your graphics driver on the laptop.
Thomas
|
| |
|
| |
 |
Karsten Lentzsch

|
Posted: 2007-8-15 23:57:00 |
Top |
java-programmer >> Question: Gui Looks Different
Ken Browning wrote:
> The Java SDK/JRE versions (the latest from the Sun web site) are the
> same on both machines, so there is no difference there.
Sure? And the classpath is the same?
The Sun (and JGoodies) Windows L&f aim to honor
the desktop settings including the theme, font
rasterizer algorithm and some fonts.
What are the differences you're seeing?
You may provide two screenshots, so we can
see the differences.
-Karsten
|
| |
|
| |
 |
Roedy Green

|
Posted: 2007-8-16 0:44:00 |
Top |
java-programmer >> Question: Gui Looks Different
On Wed, 15 Aug 2007 09:38:36 -0500, Ken Browning
<email***@***.com> wrote, quoted or indirectly quoted someone who
said :
> On the system (a desktop with CRT) where the code was
>developed the GUI looks normal. If I run the same code on my laptop,
>the app still runs but the GUI is not drawn correctly.
I trust you used a layout, not absolute positioning.
See http://mindprod.com/jgloss/layout.html
If you didn't, you are coding for only one machine.
Does one of the machines have a larger default font configured?. This
can confuse.
See http://mindprod.com/jgloss/ruler.html
to get a Mioplanet software ruler to measure the heights and widths of
various things in pixels to see exactly what is wrong.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- jdbc on tomcatHi all,
I'm experiencing a unusual problem in
Apache Tomcat/4.1
sdk:1.4.1_03-b02
Linux 2.4.20-8 i386
I've got an application running on commons-DBCP
everything seems ok:
- libs in the commons/lib folder
- datasource in the context:
<Resource name="jdbc/devel4_minePooledDS" scope="Shareable"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/devel4_minePooledDS">
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@10.10.45.4:1521:orlx</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30000</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>500</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>30</value>
</parameter>
<parameter>
<name>password</name>
<value>mine</value>
</parameter>
<parameter>
<name>username</name>
<value>mine</value>
</parameter>
</ResourceParams>
- enabled in web.xml:
<resource-ref>
<description>Resource for DB connections</description>
<res-ref-name>jdbc/devel4_minePooledDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
- used in this way:
InitialContext initCtx = new InitialContext();
DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/devel4_minePooledDS");
Connection conn = ds.getConnection();
- the application simply doesnt start with the following errors, not
so helpful, to be honest:
2004-05-04 09:46:06 StandardWrapperValve[action]: Allocate exception
for servlet action
javax.servlet.ServletException: Servlet.init() for servlet action
threw exception
at org.apache.catalina.core.StandardWrapper.loadServlet(Unknown
Source)
at org.apache.catalina.core.StandardWrapper.allocate(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.lang.StackOverflowError
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.acceptElement(ValidationConsumer.java:1795)
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.acceptElement(ValidationConsumer.java:1795)
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.acceptElement(ValidationConsumer.java:1795)
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.acceptElement(ValidationConsumer.java:1795)
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.acceptElement(ValidationConsumer.java:1795)
at gnu.xml.pipeline.ValidationConsumer$ChildrenRecognizer.acceptElement(ValidationConsumer.java:1795)
..
.
.
I didn't find anything similar
any helop will be appreciated
thanks in advance
jc
- 2
- Comparing two long numbersJohn B. Matthews <email***@***.com> wrote:
>> I meant (Math.sqrt(5.)-1)/2, which is theoretically the same, but
>> numerically more stable, since the divisor is simpler.
>> But then it would be Math.PHI, and at least as exact as each of the
>> formulae, if not better than both. :-)
> You're right: I inverted but didn't simplify! But isn't
> (Math.sqrt(5.)-1)/2 equal to 1 / phi?
IIRC, PHI is the one with a "1" before the decimal point, so, yes,
your aspect ration was near 1/PHI actually. The other solution
of "x = 1/x + 1" is -1/PHI (-0.618...)
Just hold the height fixed, and make the width of your component
<wish>Math.PHI</wish> times longer. Or if really the width is
given, then make the height a PHI'th.
PS: I think we should think about ending this subthread, shouldn't we?
- 3
- Problem With Eclipse IDE and perforce plugin.Hi I am running Eclipse SDK Version: 3.1.0 Build id: I20050627-1435
It has perforce plugin P4WSAD Client API Team provider core and
Provider UI all version 2005.2.3573
Each time I compile the project I got follows exception. I does not
prevent from working successfully but kind annoing.
Error 2006-10-19 10:46:56.703 Problems occurred when invoking code from
plug-in: "org.eclipse.core.resources".
java.lang.NullPointerException
at
com.perforce.team.ui.actions.TeamAction.getShell(TeamAction.java:154)
at
com.perforce.team.ui.actions.AddEditDeleteAction.doAddEditDelete(AddEditDeleteAction.java:70)
at
com.perforce.team.ui.PerforceMarkerManager.resourceChanged(PerforceMarkerManager.java:111)
at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:276)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:270)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:144)
at
org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:185)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Thank u Vlad.
- 4
- quartic polynomial solverHi,
I'm looking for a java method or Math lib which solves quartic
polynomial equations a4 x^4 + a3 x^3 + a2 x^2 + a1 x + a0 = 0.
My google results pointed to dead links. Any help appreciated.
Thanks,
Lothar Leidner
- 5
- Register Now - BOF 36 JBoss SEAM and JavaServerFacesHello world,
This is a quick reminder that the BOF 36 is still on track as
scheduled for the 16th of April. If you are in or around London area
and think you would like to attend but missed the initial
announcement, well here's the link again
ttp://www.jroller.com/javawug/entry/javawug_bof_36_jboss_seam.
Secondly, I would also like to formally announce that there is a Code
Camp holding on the 19th of April at the same venue. More about the
Code Camp later.
Please note that these are TOTALLY FREE events organised by the London
based JavaWUG. So, just put your name down and come along.
http://www.jroller.com/javawug/entry/javawug_bof_36_jboss_seam#register
If you have any queries or need something clarified, please leave a
comment on this page.
Evans Anyokwu
http://www.javawug.org
- 6
- ORBSocketFactory in JDK15I've created an ORBSocketFactory for use in JDK14. I now need to create one
for JDK15. It seems that the interface has substantially changed and that
it no longer provides the IOR, which I need access to to decide what kind of
socket to create.
The JDK14 classes had extensive javadocs. The JDK15 classes have zippo.
Can someone provide some useful tips on porting?
Regards,
Alan
- 7
- Bug#365408: Millions of men use thisGive your woman extraordinary pleasure and extraordinary orgasms.
http://www.Plixiets.com/
Too hot to handle
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 8
- Sun J2SE 1.4.2 max heap sizeHi there !
Can anyone confirm what is the max heap size for the VM in Sun's J2SE
1.4.2 SDK (for windows 64b Itanium 2) ?
In the documentation it is mentioned that for Solaris we have a 64b
address space but I couldn't find anything regarding wintel 64b and I
would like to confirm.
Thanks/Brgds
Joao
- 9
- newbie: "reference to object is ambiguous" errorHi!
I have this error compilling my application that I have created with
netbeans:
JFrameSample.java:164: reference to Object is ambiguous, both class
org.omg.CORBA.Object in org.omg.CORBA and class java.lang.Object
in java.lang match
new Object [][] {
^
1 error
How can I fix it? I need both: org.omg.CORBA and java.lang.*
any ideas?
Thanks!
LaCo
- 10
- [OT] Re: Yet Another Web Application Mess...Hi,
Roedy Green wrote:
>... in the early 80...
> It will be that class's concern alone that
> Germans have a two part zip code.
Note that this was true in the early 80es but is no longer true since...
ah... the late 80es.
SCNR,
Ingo,
33615 Bielefeld
- 11
- SQL Server 2000 database connection problems: Can ANY one help?Environment: SQL Server 2000, Windows 2000, Eclipse, and Microsoft's SQL
Server 2000 driver for JDBC
Problem: Connection to any table in my SQL 2000 database hangs. If I stop
it, it produces the following exception:
com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine
at
org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceive
Manager.java(Compiled Code))
at
org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceive
Manager.java:137)
at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:168)
at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:186)
at
org.eclipse.jdi.internal.ObjectReferenceImpl.invokeMethod(ObjectReferenceImp
l.java:350)
at
org.eclipse.jdt.internal.debug.core.model.JDIThread.invokeMethod(JDIThread.j
ava:647)
at
org.eclipse.jdt.internal.debug.core.model.JDIObjectValue.sendMessage(JDIObje
ctValue.java:67)
at
org.eclipse.jdt.internal.debug.eval.LocalEvaluationEngine.run(LocalEvaluatio
nEngine.java:231)
at
org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.
java:562)
at
org.eclipse.jdt.internal.debug.eval.LocalEvaluationEngine.acceptClassFiles(L
ocalEvaluationEngine.java:218)
at
org.eclipse.jdt.internal.core.eval.RequestorWrapper.acceptClassFiles(Request
orWrapper.java:45)
at
org.eclipse.jdt.internal.eval.EvaluationContext.evaluate(EvaluationContext.j
ava:234)
at
org.eclipse.jdt.internal.eval.EvaluationContext.evaluate(EvaluationContext.j
ava:252)
at
org.eclipse.jdt.internal.core.eval.EvaluationContextWrapper.evaluateCodeSnip
pet(EvaluationContextWrapper.java:207)
at
org.eclipse.jdt.internal.debug.eval.LocalEvaluationEngine$1.run(LocalEvaluat
ionEngine.java:433)
at java.lang.Thread.run(Thread.java:498)
I have confirmed that server name is correct, and have pinged the port.
Looking at the following code snippet, what I am doing wrong?
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String url =
"jdbc:microsoft:sqlserver://niels-bngjqb9y1:1433;DatabaseName=Forester;";
Connection conn = null;
conn = DriverManager.getConnection(url,"sa","");
- 12
- Spring/Tomcat/Ant/Java developmentHi there,
I am trying to build my first application with the Spring framework,
Apache Tomcat and Ant. I am having trouble accessing the application.
When I try to build it with Ant I get this error:
/home/workspace/springapp/build.xml:78: taskdef class
org.apache.catalina.ant.InstallTask cannot be found
Here is my build.properties file:
appserver.home=home/apache-tomcat-5.5.20
appserver.name=tomcat
deploy.path=${appserver.home}/webapps
tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=<username>
tomcat.manager.password=<password>
And build.xml (just where the problem is occuring, since the whole file
is rather lengthy):
<taskdef name="install"
classname="org.apache.catalina.ant.InstallTask">
<classpath>
<path
location="${appserver.home}/server/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
<taskdef name="reload"
classname="org.apache.catalina.ant.ReloadTask">
<classpath>
<path
location="${appserver.home}/server/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
<taskdef name="list" classname="org.apache.catalina.ant.ListTask">
<classpath>
<path
location="${appserver.home}/server/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
<taskdef name="start"
classname="org.apache.catalina.ant.StartTask">
<classpath>
<path
location="${appserver.home}/server/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask">
<classpath>
<path
location="${appserver.home}/server/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
Does anyone have a clue as to what I'm doing wrong??
Many thanks,
Courtney
- 13
- Why does JMenuItem react to right button?In all the applications that I know, menu items react only to mouse
left-click. Swing JMenuItem, however, reacts to any mouse button click.
Swing JButton (which also extends AbstractButton) behaves as expected.
Does anybody know why? Is there any way to change this behavior?
Thanks in advance,
Diego
- 14
- Multiple Inheritance In Javahi everyone
this is my first post since i joined the group a week ago.
I m working with java for a year now since i come from a C++
background i can't help comparing the two languages.
While studying for java i found many books stating that java does not
support multiple inheritance i don't fully agree with this notion
(please don't hate me for that).
Though it is true that one cannot extend more than one class at a time
which makes perfect sense
since all the classes in java are derived from Object class and
multiple extensions would
cause multiple objects of Object to exist in the code which could be
undesirable.However java could
have provided a concept similar to virtual base classes in C++ but it
would have to be implicit like the extension to
the Object class and moreover multiple calls to the virtual base
class's(Object) constructor would have to be avoided.
(in C++ the compiler donot call the constructor of a virtual base class
from immediate derivations
rather it allows the class which is extending multiple derivations of
the virtual base class to call its
constructor directly, something which is not legal for ordinary base
classes) .Java could not provide a solution like this
since the only way to call the superclass constructor is by keyword
super which can call the constructor of
the immediate superclass only.So it is true that allowing multiple
extensions would have caused more problems
than it could solve.Still while creating patterns multiple inheritance
is sometimes inevitable.The solution to this
problem is interface.An interface in java is used to create a model of
a class,it just declare the behaviour(methods) that
a class must implement.It is worth noting that code reusabilty ,a
criteria generally used to define inheritance,while implementing an
interface is nil.That is why implementing an interface is not qualified
as inheritance.However if you have ever indulged yourself in creating
design patterns you would know that inheritance is more than just code
reusability rather in my opinion code reusability is just a consequence
of implementing inheritance in programming languages. Java allows a
class to implement more than one interface in this way a class can
implement 'behaviours' of multiple classes and thus to an extent
solving the multiple inheritance problem(without providing code
reusability).
So the question is that is it alright to say that java does not
support multiple inheritance?
nirmal.
- 15
- Trying to store fixed dates in calendar....hi,
sorry to bother you with a question somebody should have already ask,
but i was unable to find it in groups.google.com.. so ;)=
well, my problem is that i'm trying to store dates values in Calendar
(more exactly GregorianCalendar) class instances.
BUT... the stored dates keep on running upon the system date :
ie : i store 2h 34m 5s 324ms
4s later, when i print the date, it will give me something like
2h 34m 9s 450ms
it is very bothering for me...
how can i make Calendar class to store "fixed" dates... ?
or which class should i use to store "fixed" dates ?
Thanx for your help.
Pierre-Yves
|
|
|