Recent update: 2008-5-9
68 byte By
jmyrla at 2008-2-27
May I know a list of Publicly available JRE's other than Sun
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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
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
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 ...
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 ...
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 ...
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
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?
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 ...
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 ...
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 [] ...
how can i run "main" method of other class ,that is not located in present working directory,in my running application?
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 ...
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 ...
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.
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 ...
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
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?
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 ...
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 ...
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
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 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 ...
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 ...
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?
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 ...
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 ...
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 ...
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 ...
How to retrieve the file information such as file size, fie type, last date modify/create?
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 ...
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 ...
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) ...
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 ...
dear sir, please can u send me jdm architecture .the communicatin between user and jdm architecture.
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: ...
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 ...
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 ...
can any one help me and say nice tutorials for struts to understand well. if u have also send me.
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?- ...
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 ...
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 ...
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!