Question of the Week Archive
Question of the Week presents answers to key questions posed by the developer community. The intent is to pass this important, but not always easy-to-find, information on to Java Developer ConnectionSM (JDC) members. The questions are selected from the JDC Forums and special interest lists generally because: they are frequently asked, they are significant or timely, or the answers are not easily accessible.
Question of the week No.186: How does J2EETM SDK provide a JNDI DataSource?
Question of the week No.185: How can I process a file upload from the browser?
Question of the week No.184: Can JavaTM technology beat Perl
with pattern matching in large files?
Question of the week No.183: When should I use NIO?
Question of the week No.182: Is a singleton a single instance per application?
Question of the week No.181:
What is the relationship between Xerces and JAXP?
Question of the week No.180:
Is there a method to cache the ResultSet?
Question of the week No.179:
Why doesn't request.getParameter return the correct data?
Question of the week No.178:
Is it possible with SQL to store a String containing a single quotes?
Question of the week No.177:
How do I standardize times across time zones?
Question of the week No.176:
there something other than StringTokenizer I can use to split tokens in a String?
Question of the week No.175:
Is there a way to customize the display of caught exceptions?
Question of the week No.174:
Are there new J2SETM features that enable high-performance I/O code?
Question of the week No.173:
How do I point in the import statement to another subdirectory?
Question of the week No.172:
How do I know when to use Date, Calendar, or GregorianCalendar?
Question of the week No.171:
How can I can encode the output of a file to be written in a UTF-16
encoding?
Question of the week No.170:
How can I sort a hash table based on values?
Question of the week No.169:
How do I use HTTPS (SSL over HTTP) with the JavaTM Embedded Server (JES)?
Question of the week No.168:
How do I get the JTextArea to come up as a seperate frame without a main statement, and how is the JTextArea
supposed to paint itself without the pack() for the inner TextArea class?
Question of the week No.167:
How can I sign and use an applet using a self-signed cert or CA authorized in the J2SETM 1.3
plugin?
Question of the week No.166:
How do I write an application for the upcoming J2METM Personal Profile?
Question of the week No.165:
What is the difference between throw and throws?
Question of the week No.164:
How do I use the StringTokenizer class to parse a
String?
Question of the week No.163:
How can I execute DOS commands from a JavaTM application?
Question of the week No.162:
Preventing JTextArea changes size with dynamic data
Question of the week No.161:
How can I use an obfuscator with the J2METM Wireless Toolkit?
Question of the week No.160:
How do you protect your code from decompilers?
Question of the week No.159:
Where are device-specific things implemented in J2METM?
Question of the week No.158:
How can I use synchronization on a string?
Question of the week No.157:
How do I open a URL connection to a https server?
Question of the week No.156:
Is a gateway required to have a hard disk to run
Java Embedded ServerTM Software?
Question of the week No.155:
How do you create a structure like a HashMap with case insensitive keys?
Question of the week No.154:
How can I manually kill threads?
Question of the week No.153:
How can I calculate the number of bytes that come in
over an InputStream opened with the openInputStream() method
of an HttpConnection object in MIDP?
Question of the week No.152:
Why does the Calendar class appear to return wrong values for the current date?
Question of the week No.151:
What is the best way to round to two decimal places?
Question of the week No.150:
What is a tag body?
Question of the week No.149:
How can I build the J2METM CDC/Foundation Profile 1.0 FCS using RedHat Linux 7.1?
Question of the week No.148:
How do you decode a mathematical expression?
Question of the week No.147:
What is a DomParser/SaxParser?
Question of the week No.146:
What's the difference between EJBTM and
JSPTM sessions?
Question of the week No.145:
How can I search for and assign a value to HTML?
Question of the week No.144:
How Can I Emulate an HTML form in a J2METM
application?
Question of the week No.143:
How can I get the attributes of the uid using JNDI?
Question of the week No.142:
How can I add days to DateString?
Question of the week No.141:
How can I store values to a file that is created automatically?
Question of the week No.140:
Can I send an HTTP request to a servlet from a normal class without having to
use a browser to send the HTTP
requests?
Question of the week No.139:
Is it possible with SQL to store a String with a single quote?
Question of the week No.138:
What is the best method of pooling objects?
Question of the week No.137:
How do the event delivery methods work in MIDP?
Question of the week No.136:
Is there a simple way to retrieve the column name from a result set as well as
its associated data?
Question of the week No.135:
What's happening to my process output?
Question of the week No.134:
How can I improve transfer rates through a socket?
Question of the week No.133:
How does one send OOB (Out Of Band) data using java.net.Socket?
Question of the week No.132:
How can I use HTTPS with the Java Embedded ServerTM (JES) technology?
Question of the week No.131:
How do you convert from one code page to another?
Question of the week No.130:
Why am I getting PortInUseException on SolarisTM operating
environment when the serial port seems to
be available?
Question of the week No.129:
What is Unicode?
Question of the week No.128:
How do you download a new MIDlet?
Question of the week No.127:
How can I cast an array?
Question of the week No.126:
What's the difference between a JVM and a CVM?
Question of the week No.125:
How can I log in a distributed environment?
Question of the week No.124:
How do I make a ProgressMonitor modal?
Question of the week No.123:
What is the correct way to nest JAR files for Java Embedded ServerTM 2.0?
Question of the week No.122:
How to check if a string is numeric?
Question of the week No.121:
How can I hide calls to servlets and their parameters in the address and status
bar?
Question of the week No.120:
How can I convert a date in String format to a Date
object?
Question of the week No.119:
How to connect to database using SQLJ from servlet?
Question of the week No.118:
How can I open a raw socket connection under MIDP?
Question of the week No.117:
Is it possible to create vertical tabbed panes using Project Swing?
Question of the week No.116:
How do I handle the lifecycle of bundles and services in the JES 2.0 framework?
Question of the week No.115:
How can I access native fonts with JDKTM 1.2?
Question of the week No.114:
Why use Class.forName()?
Question of the week No.113:
Can a MIDlet spawn or download another MIDlet?
Question of the week No.112:
Is Java CardTM technology as secure as
standard smart card technology?
Question of the week No.111:
How can I implement the Singleton pattern in the JavaTM programming language?
Question of the week No.110:
How do objectinputstream, inputstream, and
fileinputstream differ?
Question of the week No.109:
Can I dynamically download code on KVM and MIDP?
Question of the week No.108:
How can I convert an array of objects in to an ArrayList and then
into a Hashset?
Question of the week No.107:
How can I calculate the bytes occupied by an object?
Question of the week No.106:
How can I sort objects with Comparator?
Question of the week No.105:
How to change List to String[]?
Question of the week No.104:
What class called my method?
Question of the week No.103:
Is there a way to find out how many fields are in a record from the result set?
Question of the week No.102:
How can I get values from an HTML form using JavaServer PagesTM?
Question of the week No.101:
Why does Node.getNodeValue() method return null?
Question of the week No.100:
What does the property="*" mean?
Question of the week No.99:
How can I create a digital certificate and sign an applet?
Question of the week No.98:
How do I read and write objects from a serialized file?
Question of the week No.97:
What's the diffence between green threads and native threads?
Question of the week No.96:
What's the difference between JavaServer PagesTM include tags?
Question of the week No.95:
How can an Iterator be changed into an Enumeration?
Question of the week No.94:
How can applets communicate with each other?
Question of the week No.93:
How do I add a Security Provider?
Question of the week No.92:
How can I implement the SOCKS protocol without going to an outside library?
Question of the week No.91:
Is it possible to convert a String into a Key object?
Question of the week No.90:
How can I convert String to int in JavaServer
PagesTM?
Question of the week No.89
What is the difference in results using String versus
StringBuffer?
Question of the week No.88
How can JSP be debugged at runtime?
Question of the week No.87
How can a jstring object be created from char *?
Question of the week No.86
Is it possible to build a valid line of JavaTM
code in a string and then execute it at run time?
Question of the week No.85
How can a servlet be set up to work through a proxy server?
Question of the week No.84
How does communication take place in business-to-business
e-commerce via XML over HTTP?
Question of the week No.83
Can I read and write serialized objects between JDK 1.1 and 1.2?
Question of the week No.82
How do I create an array of objects where the objects contain other arrays?
Question of the week No.81
How can an inner class be accessed from another class?
Question of the week No.80
Destroy function {connection.close()}
Question of the week No.79
Code Optimization
Question of the week No.78
How to Decrypt Email Messages
Question of the week No.77
Using the Collections Framework with JavaTM
1.1
Question of the week No.76
Accessing Images in JAR Files
Question of the week No.75
What is a "Peer"?
Question of the week No.74
How can files be attached to e-mail using
JavaMailTM?
Question of the week No.73
How do access JDBCTM from
JavaServer PagesTM?
Question of the week No.72
How can a Canvas3D object be created with
Java 3DTM?
Question of the week No.71
Is it possible to obtain and save individual frames from
an AVI movie with the JavaTM Media
Framework?
Question of the week No.70
How can a BufferedImage be resized with
Java2DTM?
Question of the week No.69
How can a second tabbed page be created the on the fly?
Question of the week No.68
How to Start Executable Files from JavaTM
Applications?
Question of the week No.67
How Does a Developer Get Started with KVM?
Question of the week No.66
Servlet Configuration Questions
Question of the week No.65
How can Chinese Text be Displayed in the JavaTM 2
Programming Language?
Question of the week No.64 Questions about
JavaTM Runtime Environments.
Question of the week No.63 How can an
applet be made from JavaBeansTM?
Question of the week No.62 How to bring up an
iconified JFrame?
Question of the week No.61 Which method can be
used to handle servlet requests?
Question of the week No.60 How to synchronize
collections?
Question of the week No.59 How to signal another
object?
Question of the week No.58 How to share objects
among servlets?
Question of the week No.57 How to find the
visible JTable Rows?
Question of the week No.56 How to redirect a
request from a servlet to JSP?
Question of the week No.55 How to obtain default
character encoding?
Question of the week No.54 Cookies Created by
Servlet.
Question of the week No.53 Applet to Servlet
Communication.
Question of the week No.52 Offscreen Graphics
without
a Window.
Question of the week No.51 How to lock columns in
a
JTable so they are not scrollable?
Question of the week No.50 How to use a horizontal
scollbar so that I can see all
the columns in a JTable?
Question of the week No.49 How to add a JPanel
containing an image to a JDesktopPane and have it
appear above the image and remain?
Question of the week No.48 How to get a JavaTM
applet to open a new browser window?
Question of the week No.47 JTextArea Focus and
Flickering?
Question of the week No.46 How to make an event
log?
Question of the week No.45 How to show a JFrame
that tells the user to wait while loading a file?
Question of the week No.44 How to draw image data
to
an array, then display it?
Question of the week No.43 How to know what
directory an application written in the Java TM programming language has
been loaded from?
Question of the week No.42 How to release the
resources that the instance of Thread occupies?
Question of the week No.41 Why do threads
sometimes stay alive when the browser window is minimized?
Question of the week No.40 How to save a
picture drawn on a Canvas object, into a Jpeg file?
Question of the week No.39 How to control the
accuracy of Timer and Threads?
Question of the week No.38 When selecting an
item from choice, how do I display the table fields?
Question of the week No.37 How can the content
of a JList be changed everytime it is queried from a database?
Question of the week No.36 Can you put an ALT
message in the applet tag?
Question of the week No.35 Memory
inspection/leak detectors
Question of the week No.34 How to add a popup
listener to a row in a JTable
Question of the week No.33 How to reduce the
lease time of my RMI objects
Question of the week No.32 How to find out
which Swing Component has focus?
Question of the week No.31 How to control
the close operations on a JInternalFrame window?
Question of the week No.30 How to print the
contents of a large JTable?
Question of the week No.29 How to render
simple HTML using JEditorPane?
Question of the week No.28 How to store an
encrypted password?
Question of the week No.27 How to calculate
the minimum amount of memory needed to run my application?
Question of the week No.26 How to restore an
iconfied JFrame to its normal state?
Question of the week No.25 How to print a
report in batch mode using the java.awt.print API?
Question of the week No.24 How to implement
a splash screen for my application?
Question of the week No.23 How to clear data
entered into a JTable?
Question of the week No.22 How to use the
NewAudioClip method to read a local audio file?
Question of the week No.21 How to launch a
Java 2 application from a Windows NT icon?
Question of the week No.20 How to speed up
printing in my JDK 1.2 Swing application?
Question of the week No.19 How to debug
Swing events?
Question of the week No.18 How to configure
callbacks in Java IDL?
Question of the week No.17 How to change a
Swing font across my whole application?
Question of the week No.16 How to remove
the "X" closing button from a dialog box?
Question of the week No.15 How to launch a
web browser from my Java application?
Question of the week No.14 How to convert my
Swing code to use new package names?
Question of the week No.13 Where to get
technical information about Enterprise JavaBeansTM?
Question of the week No.12 When I click a
JComboBox in my applet and select an element,
JComboBox never changes.
Question of the week No.11 Problems setting a
security manager when using JDBCTM in
JDKTM 1.2 Beta 4.
Question of the week No.10 How do you hide
columns and rows in a JTable component?
Question of the week No.9 How do you set ODBC
options using the JDBCTM Database Access API?
Question of the week No.8 How do you ignore user
input in a Swing application?
Question of the week No.7 How to access the
JavaTM console from the
JavaTM Plug-in?
Question of the week No.6 Missing servlet
classes in JDK TM 1.2 Beta 4
Question of the week No.5 How do you send an
image file by JavaMail?
Question of the week No.4 A problem with class
searching in JDK TM1.2 Beta 4
Question of the week No.3 Where does
JavaTM StudioTM
1.0 generate its source code?
Question of the week No.2
JDKTM 1.2 Beta 4 and the
classes.zip file
Question of the week No.1 Drag and Drop in
JDKTM 1.2 Beta 4