Recent update: 2008-5-9

Publicly available JRE's other than Sun

68 byte By jmyrla at 2008-2-27
May I know a list of Publicly available JRE's other than Sun

Multiple catch?

954 byte By gysz at 2008-2-21
HiI would like to suggest (if this is the proper topic and/or it wasn't suggested already) the following construct:try {...} catch(SomeException1, ..., SomeExceptionn e) {//treat it}insteed of:try {...} catch(SomeException1 e) {//treat it} ... catch (SomeExceptionn e) {//treat it in the same ...

Mechanism to get rid of NullPointerException

2323 byte By MrMagic at 2008-2-20
Hi, I hope this is the right place to introduce my idea. You all know these ugly NullPointerExceptions which occur occasionally. I think one major problem is, that there are two possibilities of error handling: If a method fails, it can throw an Exception, which is of course the clean way to ...

Give unused memory back to OS

695 byte By MartinHilpert at 2008-2-17
My boss just shakes his hade when i tell him that you need to know how much memory a Java application can take (for setting the -Xmx option) and that the JVM doesn't return unused memory back to the operating system. This leads to Java applications being memory eaters and the only workaround ...

Post 5.0 (Tiger): offer 'force free object references'

1147 byte By MartinHilpert at 2008-2-16
Possible memory leaks in Java applications can easily occur, if the object that is released to the garbage collector (no reference to this object from the application) still access static resources. There is currently no way to tell the VM to free these resources also (because they are static ...

JAIN SIP

378 byte By nokis at 2008-2-11
Hi,I'm trying to use the JAIN SIP api. After some unsucessful effort at attempting to get this to work, I'm looking for a simple example to show me how to log into a sip server. I'm primarily looking at IM with SIP and would like to be able to login to a SIP server (sip.company.net:443) with ...

How to print PDF files using java print API

250 byte By jayakumarsin at 2008-2-10
Hi,I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.Thanks in advance

Is the Java Communications API Compatible with WinXP, WinModem?

430 byte By alchemista at 2008-2-7
I'm trying to use the Communications API, but no matter what I do, it always detects 0 ports.I am running Windows XP and have a WinModem. Does anyone know if the Comm API is compatible with the combination of JDK1.4.2/WinXP/WinModem?Under my device manager it lists no COM ports, so it seems ...

java program to access the modem

274 byte By Dipu77a at 2008-2-3
Hi,I want to use java program to access the modem on windows.I have dowloaded the javax.com api for it. Can I use it to communicate the modem through the serial port.If any one has tried this earlier please help me out.Thank youDipu

Can not find the ports

171 byte By coral9527a at 2008-2-2
I use javax.comm to access the serial ports. On my IBM T40, it runs , but on the desktop PC , can not find the ports. Why? Help me please.-- coral9527

Singleton pattern over Factory pattern

417 byte By ckollareddy at 2008-2-1
HiWhat is the difference between the Factory and Singleton pattern.Can we use a singleton (pattern) class to create other object instances and return them.What are the advantages and disadvantages for using the Singleton pattern here.Or do we have to use only a factory (pattern) class to do the ...

traffic light applet help me

761 byte By djdarylfa at 2008-1-29
Hello i am a student at the HOGE SCHOOL VAN AMSTREDAMand i have recently started using java's jbuilder and i am leraing how to program in java, which i find very joyful although it can be sometimes very frustrating.My problem is i have to make a trafficlight applet:class trafficlight.4 traffic ...

JDK1.5 (Tiger) and JCP

1311 byte By attiasra at 2008-1-28
Hi, a beta of JDK1.5/Tiger is supposed to be out by the end of the year. We've heard million times about the new language features (generics, autobox, ...) but nobody ever mentions which of the additional JCP will make it. The list of JCP supposed to be in 1.5 can be found at ...

javax.comm on pocket pc / MIPS ?

247 byte By slomomana at 2008-1-27
I just downloaded suns communication api javax.comm.it's for communication over serial and parallel-ports.does it run on Pocket PC, too?does it run under J2ME?does it run under the J2ME - MIPS profile?thx

Can JDO replace Entity beans.

193 byte By selkumarm at 2008-1-21
I feel that while designing a J2EE application, using the Java Data Objects alongwith Entity beans is somewhat redundant. Is it so or there is any reason behind this architecture?

Who wants 5 dollars ?

1179 byte By nath_amita at 2008-1-12
I wrote a public class Time ( saved it in Time.java ) in a package amit.java.time and another public applet class TimeTest ( saved it in TimeTest.java ) which imports the Time class . Both the class and the applet class code compiled successfully . But when I run the appletviewer from command ...

Cannot find PortableRemoteObject

1133 byte By factor3 at 2008-1-10
Greetings:I am attempting to compile an EJB test client using the Sun tools. I am running on a Red Hat Linux environment. My classpath is as follows:CLASSPATH=/home/work/research/jdk1.3.1_01and I am attempting to do the compile using compile.sh, which contains the following ...

List classes in package

462 byte By kpaulsa at 2008-1-10
Is there a JSR for listing packages within a class?For example, instead of writing an algorithm to disect "java.class.path" list all the files and stick them in a map, the ClassLoader could do this as classes are created. Such a document would also suggest functions simmilar to String [] ...

invocation of other class

133 byte By roneypatela at 2008-1-10
how can i run "main" method of other class ,that is not located in present working directory,in my running application?

null metadata keyword -> JCP idea if enough support ?

3018 byte By trix1234a at 2008-1-9
Null Metadata Keywords,In an ideal development world we apply proof of correctness algorithms to our source code to prove that we've handled all possibilities and there are no bugs. We need to ensure that all functional possibilities are handled. Ideally we need to tie all the various ...

"Coffee is to stool as JAVA is to tool."

711 byte By lgdouglas at 2008-1-8
I have been using java for 4 years now. I am really getting sick and tired of its poor enviroment stablization.I think it is very close to one of the most powerfull tools available mainstream today. However, I think its deployment and evolution have been rushed without learning that a language ...

Individual Contribution

162 byte By St0rm at 2008-1-7
I wish the JCP entry for individuals was cheaper. I can't afford it, but I would really like to clean up some of the API and make some suggestions.

How do I import a .gif?

963 byte By threebrain at 2008-1-7
Hi! :-)I'm just learning :-OI figure I'm going to learn java better by making a fun game! So, i'm going to do it all in baby steps.My first question, is how do I import a .gif file and give it a variable or class value? Like with a JOPtionpane, whatever comes in from the users input gets a ...

How to submit a success story to Sun?

186 byte By clinton_listenera at 2008-1-7
Hi,can anyone tell me how I can submit a success story toSun? There used to be a Web site for doing that, butI couldn't find it any more.Thanks a lot

can a serious 3d game be made entirely in Java?

189 byte By DaShiznit at 2008-1-6
if so, what would be the minimum specs of the development computer and would i use an applet? if i was designing the game with a console in mind, what would be the best route?

how to generate random numbers of the same at each time of execution of thm

1332 byte By jayashankar at 2008-1-5
dear friendsi am facing a problem that the random numbers generated at time of each exectuion of the program are not the same, i want to generate the same random numbers every time time i run the program. i need your help. i am giving the code in c++ if anybody can help in providing the ...

A* Search Algorithm

438 byte By aoifes272a at 2008-1-1
hello ...HELP !!!Having a slight problem implementing the A*Search in Java. We have it calculating the straight line distance from nodes to goal using .cost, however we need to get individual path distances between the nodes, preferably without hardcoding. We were thinking of using the addEdge ...

Please help!How to convert String to float?

167 byte By xueqingwang at 2007-12-30
I meet a problem.That is I need to convert a String variable to a float variable.for example:convert String s="123" to float f=123.0

Making my verry own chatroom.

159 byte By thegamemaster1 at 2007-12-29
Someone please help me i want to make my verry own chatroom.Without sponcers like bravenet and bassen.How can i do that.Please Help Thanks

Java language proposal #2

1774 byte By SteveDuToronto at 2007-12-24
Java forces software designers to choose between synchronized and unsynchronized access when writing a class. Often, the most general-purpose design requires synchronization, while a number of important uses of the class do not. Synchronized wrapper classes are inconvenient to write and ...

FrontController Apache / Tomcat

2548 byte By stockmry at 2007-12-22
I'm trying to implement the FrontController design pattern from Sun. But we keep on running into problems when we port the application to apache/Tomcat structure. It works fine in a tomcat stand alone. De context is initialised and the servlet is found using the url pattern, however when we ...

Data transfer through usb ports

245 byte By OiyeMagohaa at 2007-12-18
Am thinking of coming up with a program that will facilitate data transfer between two computer systems through the usb ports.Is this possible and if so where can I start from .i.e. the neccessary api required and any sample codes?

No Poison Pill?

391 byte By -@-a at 2007-12-13
I happened to read an article in today's San Jose Mercury describing impending layoffs at Sun. This article said that Sun had removed its "poison pill" measures that had been intended to counter any hostile take-overs. I am no expert on this subject. But I am wondering if MIcrosoft would ...

JTextArea does not update

951 byte By kapsandaa at 2007-12-10
I have a foo.exe program that generates output. I want to capture that output and put it in a JTextArea. It works fine if I system.out it to the shell but does nothing when I putit in the JTextArea. Is there any flush for JTextArea? Should I use something else to get this to work? I would ...

Code Review

22378 byte By Adeodatus at 2007-12-10
Anywho, I've wanted (for a while, yet) a BigFraction class. So I made one. I'd like to get comments on it, though, so:/* Author: Adeodatus***//**package java.math;**/import java.math.*;public class BigFraction extends Number implements Comparable<BigFraction>{public static final ...

JAVA multiple class file

5856 byte By whasian85a at 2007-12-7
I just started learning JAVA a couple of days ago and the first program I wrote had two classes in one file. here is the program :class fib_num {public int value;public boolean is_even;} class Fibonacci {/** Print the Fibonacci sequence for values < MAX and mark even numbers with an asterick ...

Retrive file information

97 byte By tssprograma at 2007-12-1
How to retrieve the file information such as file size, fie type, last date modify/create?

Unexpected NaN from arithmetic operation with double

1423 byte By Ben_Pha at 2007-11-30
Unexpected NaN from arithmetic operation with doubleI抦 not sure if this is the right place to post this message but I hope someone can help. I'm puzzled by a very strange computational error. Java is multiplying two doubles (a[2]*b[2] or 0.0 * 0.0) and is getting NaN. I've attached the code ...

System guide

708 byte By hellosamhia at 2007-11-27
Hi experts,I have been programming in Java for a while but I'm relative new to system design. I was asked to write a web-based system to manage student information (such as marking their test result, generate reports based on the marks).In the end, I would like it to be able to use by multiple ...

enum, switch(), ensuring completedness and uninitialized variable warning

1237 byte By art64a at 2007-11-27
Hello!The problem is as follows: I have an enum class, let it be E, and want to ensure that some switch(E) statements are complete in the sense all E values have cases in each of switch(E). This way, if I would add a new element to E, the code would not be compilable if one of these switch(E) ...

OOD Gems

862 byte By Gargoylea at 2007-11-24
Like the title of this thread the brevity and value of experienced design advice often helps to navigate the volume of material available.I have found this particularly true with Java when reading all the methods of a new object may not be the best use of precious developer time if there are ...

Enterprise Information System

121 byte By rafi_onlinea at 2007-11-22
dear sir, please can u send me jdm architecture .the communicatin between user and jdm architecture.

Please help: Error using Jakarta-tomcat 4.0 beta

2775 byte By yahyaaccess at 2007-11-15
Hi all,Could you please help me with a following error?I am trying to start Jakarta-tomcat 4.0:C:\ Jakarta-tomcat 4.0\bin\startup.bat and I receive the error:Catalina.start: LifecycleException: null.open: java.net.BindException: Address already in use: JVM_BindLifecycleException: null.open: ...

Odd Draw Behavior - Slow Ellipse2D Draw

1031 byte By botissuesa at 2007-11-15
Summary:A game I have written uses bitmaps and lots of Ellipse2Ds. The Ellipses are in the background and occasionally need to all be redrawn (there could be many - let's say 100 at a time). This works fine on a Windows box, and Macs from G3 - current Intels. When I attempt to run the ...

Java Game Development - Java ME - RPG Game Stages

493 byte By Jasonca at 2007-11-14
I have a simple RPG games where player attack enemies and collect points. I need to design a few stages for this game (basically, my concept of different stages is just changing the maps of the game.) but i have no idea how the games stages works? Do I ned to create new classes to represent ...

hi

104 byte By ranipeta at 2007-11-14
can any one help me and say nice tutorials for struts to understand well. if u have also send me.

Separation of tiers

425 byte By pmohanana at 2007-11-14
Hi...,In one of our application, we are thinking to separate the Web Layer(Jsp/JSF) & deploy it on the Web Server , EJB's on the App Server. My question is ,-what benefits does it provide having such separation?-When should we decide to separate the web tier from the application server?- ...

Performance Issues with Validation Framework

438 byte By irshad007a at 2007-11-14
I am planning to use Validation Framework in my project (non-struts based ) for the form validations. But I am not too sure about the performance issues I am gonna face bcoz of this. Since its a banking application so any response beyond half a second would not be bearable.Please share ur ideas ...

SDP-Library <--> SIMPLE-Library?

502 byte By armaged_dona at 2007-11-14
Hello everyone,I'd like to implement the SDP-Protocol in combination with SIP in J2ME.My questions are: 1. Is it possible to combine the SIP-Stack with this SDP-Implemenatation http://jcp.org/en/jsr/detail?id=1412. Where is the library (source code) ?3. I'd like to create a chat based to ...

problem about normal distribution

194 byte By seablue1023a at 2007-11-14
i want write a algorithm to implements the normal distribution formula. i worked hard but without success. does the jave liberary includes one? or please some write one for me. thank you!