JavaFAQ Home » Java Newsletters
[ The Java FAQ Daily Tips, weekly publication ]
20 May 2003|
Foreword: Excuse me for
possible mistakes. English is not native language for me.
In this issue:
Hello dear friends!
The beta release of J2SE 1.5 is scheduled for late 2003. I have heard that there
will be some changes in a code writing process that will make our life
Yes, indeed. The improvements to J2SE being developed in project "Tiger" are
intended to make programs clearer, shorter, safer, and easier to develop,
without sacrificing compatibility. Java 1.5 will shift the responsibility for
writing the boilerplate code from the programmer to the compiler...
Instead of writing
String title =
you will do like this:
String title =
and it will decrease the number of compile
errors. Compiler will try to cast to String without saying it explicitly.
More about all coming changes you can read
in this excellent article:
"New Language Features for Ease of Development in
the Java 2 Platform, Standard Edition 1.5: A Conversation with Joshua Bloch"
Java wimps please close your ears ... For
the Java programmer who
thought he knew everything there was to know about
Java, have a
look at the most advanced Java newsletter archived on the
what, it won't even cost you
anything! Subscribe today - you won't be
Question: I would like to create a class that can
execute jscripts. Does any one know if there is such class?
Answer: Yes, it is Rhino. Rhino is an open-source
into Java applications to provide scripting to end users.
Be aware that it
has some limitations, Rhino is an implementation of the core language only and
doesn't contain objects or methods for manipulating HTML
More read about Rhino
I work with RMI now and need to implement a new feature into software that was
written by another people one year ago. I need to find out: what is IP address
of a client and then connect or reject the connection. I do not want to add
methods to client... It must be the way how to find out it using RMI methods.
Unfortunately I did not find with first attempt.
Your RMI server extends UnicastRemoteObject that extends
That class (RemoteServer)
has public static String getClientHost() method.
When called from a thread
actively handling a remote method invocation the hostname of the client is
Then use public static InetAddress
getByName(String host) method of java.net.InetAddress
Be aware that you do
need to try to create an instance of InetAddress. It is static.
Latest posts on our
|Coming Sunday and Saturdays date
How to get coming sundays date
with respect to surrent date taking care of the month change leap year
thread is here
Here is the scenario:
I have a window that contains a
table in a scrollpane,
the window itself has a scroll pane, when I try to
reduce the size of the window from right to left the scroll apne of the window
will be displayed.
What I want is the scrool pane
of the table will be the one to resize no the scroll pane of the window
Anyone can suggest how to
prioritize the resizing of scroll pane?
|Please help, java login script with jdbc:odbc
Could some one please help me,
i need a small example of a login code. The user and password is located in
a Access database and the connection is jdbc dbc
now i have to make a simple
login script that asks the username and password, the username and passwordt
have to machts one of the names and passwords from the database, if this name
and password are found in the database the user goes to a nother page and send a
URL code with it....
Im looking for this script on
the internet but i cant find any example, pleae help
|EXCEPTION_ACCESS_VIOLATION error with Tomcat server
I have a query regarding Tomcat
server. I am running Tomcat 4.0 server. I have a login html page from where I am
entering the valid id and password and submitting the form. As soon as I click
on submit button an error occurs saying "An unexpected exception has been
detected in native code outside the VM.
Unexpected Signal :
EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77fcab56" and server gets closed. I
am not getting how to handle this error. Please tell the solution.
|GUI - Repaint() - when will it end!!!!
Hi there, looks like every java
guy has to go thru this 1 gui/repaint() issue in life. so i am a member there.
I have a qtn - like those countless folks out there - new to java and
struggling with repaint() which dont seem to work. - can someone help? (thank
you in advance).
Heres the problem
Have this drawing application
with menus and stuff. so i draw box/lines/ circle etc. and when the mouse is
released, i add the positions etc to an array, in my paint program, i parse thru
the array and show the stuff. Now whatever i draw, doesnt appear immediately
(although i have a repaint() (also tried validate, revalidate and every command
i have learnt/come across).
funny thing is, if i press my alt key, the
"file" menu option will appear to be selected, when i press escape, the drawing
window gets focus and immediately all my drawings appear. So my question, how do
i make it do that.
Additionally (while i am on the roll here) in my menu
option i have a File/New when this is selected, i clear the array and do a
repaint(). that works beautifully and all the drawing are gone. but if i click
on a icon (designated as "new") that wont do anything until i go thru that
pressing alt (or switching to another application using alt+tab and then coming
back to my paint program).
hoping to hear from
|Input & Output
how i was wondering how do you
input a string from a file line by line which is delimited by (eg
one:hello:crap) and is output to GUI ??
FileReader reader = new
BufferedReader in = new BufferedReader(reader);
String inputLine = in.readLine();
|an some one help me wih java sreen tips
hello can some one tell me how
an i create a java screen tip on a hyperlink ...
i mean when ever some one
brings his mouse over a link there should open a window in which there should b
the information about the link ...
when i run a aplication with
Xrunhprof and times option it appears a message in my console.
stack underflow in method exit"
"HPROF ERROR: thread local table NULL in
method exit 006A629C"
Does Somebody know whatґs up?
|Embedding Fonts in Java
Is there a way to embed fonts
in to a java applet??
If you can answer it would be greatly appreciated
I have a problem
regarding SunOne Application
server7.0 installed on solaris5.8.
getting 11000 records in the cached row set. But
while populating the
cached row set
(crs.populate(resultset)) with the result set the
server is real slow taking as long as half an hour for
The same thing when run on weblogic6.1 on windows
thread is here
|How to disable a JApplet
Hi guys,In my project,I need to
disable my Japplet when browser start it,then after getting some information,I
will enable it later;I try to use setEnable(false),but it doesn't work,the
components inside my Japplet are still active,How can I do this by one method
call or just no way to do it?Thanks
I simply cannot set my OS to
open JAR files with doubleclick. How can I set it to open with java.exe -jar.
I am using WinXP
Please ask your questions and help each
other at our Java Forum:
The Java FAQ Daily Tips is a newsletter
that is only sent to those who have specifically subscribed
to it (double opt-in).
To subscribe/unsubscribe to "The Java FAQ
Daily Tips" weekly edition newsletter visit our page
If you have troubles please contact us: firstname.lastname@example.org
If you have added a link to http://javafaq.nu on your WEB-site, please let us
know and you will get listed on our
"pages linking to us" pages! If your
page is a programming is programming relates you will of
course get listed in the WEB-directory as well. Also, if you link to us, you
have a chance to be listed in this
newsletter as well.
More information and graphics artworks can
be found here
For information on advertising on the Java
FAQ's Daily Tips Newsletter, send an email to: email@example.com
You will get the answer
immediately from auto responder!
Send your comments, questions, praise and
complaints to us: firstname.lastname@example.org
Copyright (c) 2000 -
2003 John Andersson, All rights reserved.
Printer Friendly Page
Send to a Friend
Search here again if you need more info!