Hi!Does anybody know a way to report bugs automaticaly when a runtime exception occur in a java program?For example, I want to write into file with the stack trace when a NullPointerException occur.Thanks!David
public static void netCopie(Byte[] tampon, String dest){//copie d'un table de byte dans un fichierFileOutputStream d=null;try{File destination = new File(dest);d = new FileOutputStream(destination);d.write(tampon);}catch(IOException e){System.err.println(e.getMessage());}finally{if ...
Is this bug well known or not ?Try this litte bit of codepublic static void main(String[] args){System.out.println(10.12 + 10.0);}The result should be 20.12But Java prints 20.11999999999997Used on Solaris 8 JKD 1.4.1 and Windows 1.4.1I dont know if it gives the same results in 1.3 so try it ...
492 byte By
nevillea at 2007-9-27 23:50:43
The JavaDoc FAQ includes the following question: "In Javadoc 1.2.2, when using @see ... tags to external API, any links to methods, fields and constructors are missing." The FAQ says this bug existed solely in version 1.2.2. However I am experiencing exactly the same behavior with 1.4.1_01.I ...
http://www.lanphearsupply.com/error.jpgIf Someone could please take a look at this screen capture of an error message I have recieved, I would be very appreciative.Any ideas as to what it means would be very helpfulthank youWill
Hi everybody,does anyone know why I, after compiling, get a app$1.class and a app$2.class besides the normal app.class?Youngster
Please help me...what does this error mean?
I'm working through some tutorials but I get errors even if i get the code CORRECT or I should say identical to the source code displayed on the web. For instance i get this:****E:\Java\New>javac SwingUI.java SwingUI.java:41: not a statementWindowListener 1 = new WindowAdapter() ...
I've just installed Java and I'm trying to execute a piece of code. Whenever I use the command prompt to type javac <filename>.java I get the following message:'javac' is not recognised as an internal or external command, operable program or batch fileDoes anyone know what I've done ...
2182 byte By
stoxya at 2007-9-28 0:17:28
I'm writing a small project, that so far has 5 files with 5 classes:mainApp.java (creates two PhoneGUI objects);PhoneGUI.java (Creates a GUI like a phone, and also implements an ActionListener);PhoneState.java (a class that holds the state of a phone e.g. is it off the hook);Log.java (a class ...
I've just installed Java and I'm trying to execute a piece of code. Whenever I use the command prompt to type javac <filename>.java I get the following message:'javac' is not recognised as an internal or external command, operable program or batch fileI was told to set the path but ...
I want to throw exception in Thread.run() method. How can I do that ?If I try to compile the Code given below, it does not allow me to compile :public class ThreadTest {public static void main(String[] args) {ThreadTest.DyingThread t = new DyingThread();t.start();}static class DyingThread ...
1316 byte By
fklia at 2007-9-28 0:24:31
Hi,I am using WinXP and Java SDK1.4.1. I got a program which compile in jdk1.2.1 and Win98 is well. But the following error message apprear when I compile in WinXP and SDK1.4.1 Error Message:Exception in thread "main" java.lang.NoclassDefFoundError: [File Name] <wrong name>at ...
1216 byte By
rhinsera at 2007-9-28 0:25:26
First time using the Java SDK (1.4.0_02) on a Linux systemand am having a compile problem. Simple HelloWorld app workseasily enough but I have installed Xerces to provide XMLcapabilities.Hello.java utilizing the DOMParser looks like this:import java.io.IOException;import ...
//Hi can you offer any help to my program, i keep on getting compiler error class or interface expected. Much appreciated for your help and advice. Java_chic//// ImageFlipAppletD - this is a basic applet on the way to flipping images. //// import the necessary packagesimport ...
973 byte By
mnalepa at 2007-9-28 0:29:55
When I try to run my html to execute the demos, i get a'class tictactoe not found' message. Same goes for HelloWrold and other demos.I have received a the tictactoe.class from another user, andwhen I susbstitute her .class for mine - it works !!But when I compile her source, tictactoe.java, ...
228 byte By
wookieea at 2007-9-28 0:30:46
Is there a javadoc equivalent for, or can I use the javadoc tool to generate documentation for non java files? I'm looking to autodocument a sql file of stored procedures, similar to the HTML output generated by javadoc.
170 byte By
JJJavaa at 2007-9-28 0:31:33
i use textpad to write progs in college...but i need to d/l whatever to be able to compile and run the prgs at home...what do i needs to download?thank you!
Hi,I have an application running on Linux Slackware 8.1, using SDK 1.4.0Every couple of days this error occurs, and the server dies (which is really bad for something I want to just sit there, and do stuff without needing to baby sit it).This error does not occur with any other Platform that it ...
Hi,I'm new to using ant...I installed ant into the following Windows directory:C:\devtools\antI also changed my autoexec.bat to include the following lines:set ANT_HOME=C:\devtools\antset PATH=%PATH%;%ANT_HOME%\binNow, when I reboot, then open a MS-DOS window and enter "ant" at the prompt, I ...
Hi, I wish to catch all exceptions thrown automatically by an ejb container by a client (business delegate). Exceptions such as NullPointerException and FileNotFoundException are ?wrapped up by the container as EJBExceptions and posted onto the client.How can the client determine the root cause ...
271 byte By
natraj1a at 2007-9-28 0:39:13
How do I make javadoc generate constant-values.html file for constants in interfaces? I understand that constants in interfaces are public, static and final by definition. Javadoc does not seem to do anything. I even attempted inserting a {@value} in doc comments.
Hi,I m using Jbuilder 7.0. I want to set -o compiler option for optimizing compilation. Where and how can i set this ?javac -O option Thanks,Nilesh.
Hi,Got the following question: I have a BufferedReader (wrapped around a FileReader) that reads from a normal text file. Since this is dangerous I put this reading activity inside a try block. If there occurrs an IOException it will be caught and a message will be written to the console.My ...
Hi all,This should be a relatively easy question to answer. I have written a class that extends CardLayout. When I run javadoc on the class, it understands that and includes an inheritence tree and a list of all the inherited methods and such, but it does not have hyperlinks to any of this. How ...
I am running j2sdk1.4.1_01 on Win98 and my program compiles correctly and I am able to run correctly using the Appletviewer. However, when I run in the browser (IE5.5) the Applet never loads and the JavaConole says there is a NoClassDefFoundError.Any insights greatly ...
I have j2sdk1.4.1_01 and the same for the runtime environmentUsing Win2000...class path variables are set..have complied easier programs:....The program which comes from a java2 instructional book is as follows:any help would be appreciatedFirst the errors:C:\j2sdk1.4.1_01\ThreeWay>javac ...
400 byte By
jabbaaa at 2007-9-28 0:49:21
SET JAVA_HOME=C:\JDK1.4SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.4\BINI have set the classpath in my windows ME oshowever I can successfully compile the java program but I can't run it, it gives the following error when using the command line java classnameException in thread "main" ...
1009 byte By
paulcwa at 2007-9-28 0:49:34
I've been told that you can specify only a directory, and javac will recursively compile all the code in the directory, e.g.:javac -sourcepath ./src -d ./classes without specifying the specific source files, and that javac can handle this, by compiling everything under src/.I've tried it, ...
1221 byte By
fklia at 2007-9-28 0:49:42
Hi,I am using WinXP and Java SDK1.4.1. There is problem. I have downloaded the source code from http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JVidCap.html. Firstly i unzip the code and using "java" run the source code directly and get error message. But now I discovered that i ...
330 byte By
Urmecha at 2007-9-28 0:54:11
Hi, does have the version of the javac/jdk have any impact on the generated byte-code? (e.g 1.3.1 vs 1.3.1_06 or 13.1 vs 1.4.1_01) ?I think there should be no impact (until you use newer functions, but then compiling is aborted) cause the libraries are linked at runtime.Is that right?Greetings ...
Hi,I have this interface. All the methods are not to be documented for a particular group of clients but the constants are supposed to be. Is there anyway I can do this? I am using 1.4.For instance:public final String LOGIN = "aaaa"; // this need to be documented but not the method declarations ...
Hi,I don't know what's wrong with my CLASSPATH...I have an applet with the following import statements:import org.xml.sax.XMLReader;import org.jdom.*;import org.jdom.input.*;I have 3 paths in my CLASSPATH:.;c:\devtools\jdom-b8\lib\xerces.jar;c:\devtools\build\jdom.jarSo my 2 questions:1) Why ...
704 byte By
hidyca at 2007-9-28 1:00:18
I have two public class files (Rect, RectTest with main) under a package rect;I can use the command:java -classpath C:\ rect.RectTestsuccessfully and can see the output result.However, I am unable to run by using the Jar file. I have put the two public class files into the same Jar file named ...
179 byte By
Vaastava at 2007-9-28 1:00:58
When I'm compiling my java file I get the following error package javax.servlet.http does not exist. What am I doing wrong. Where do I have look for this class or package?
hi,i have two questions:1) my question is that where does the class files of the classes in the packages(like lang,rmi,awt etc.) reside on the system that get linked to our java programes at runtime. 2) i have set the classpath for the current directory & there is main method in my programe ...
112 byte By
rjanea at 2007-9-28 1:09:36
when I chat I can't whisper to anyone...what do I need to do to fix it or what?Thanks,Reba
When I try to run a project I get this error, I have downloaded and installed the lastest version of jre and sdk. It still will not work thought...how can I fix this (I am running windows xp)
Hi,I've just tried to run javac from a command prompt where the effectiveuid is different from the real uid and javac just hangs. Even javac-help hangs.[bash-2.05a]$ uname -aLinux localhost 2.4.2-3 #5 Wed Oct 30 13:06:38 GMT 2002 i686 unknown[bash-2.05a]$ iduid=500(mike) gid=500(mike) ...
Good morning,I am new to API documentation. What type of polices and procedures for standards can our company adopt. Where do I start?I have been tasked to add tags/comments to java source files. Any beginner Tutorials around?The objective for our company will be to create an Enterpise Object ...
I keep getting a:java.lang.ClassCastException: $Proxy###at code like this:pcMilerHome = (PCMilerHome) initialContext.lookup("ejb.PCMiler");This is in a client side helper class for an SLSB EBJ service. When I try to use this helper from a Servlet, I'm getting the above error. It works fine ...
788 byte By
schapkla at 2007-9-28 1:28:17
I have a "automated"/"No GUI" program that processes XML Files into an Oracle Database.When the program encounters an exception, the exception is written to a log file using method FileWriter.write( String str ).The problem is that when the program retreives the "message" of the exception using ...
I try to compile a package of java source codes with JDK1.3.1_01~06 on Linux 8 by running a Makefile which run the command like the following to complile each single java file.javac -classpath ...
1182 byte By
dchu2a at 2007-9-28 1:29:39
I used jdk1.4.0 on NT server platform for implementing a client server application, with multiple client threads hitting this server, and got this error from time to time when the server sending data back to the client; seems to happen more with heavy loads, or with high CPU utilization. Anyone ...
515 byte By
mhugara at 2007-9-28 1:41:01
I'm developping an application tha tries to open a socket to a remote host via GPRS. I find the connection to be not very good, which makes the new Socket operation to fail very frequently. The main problem is that, in that case, the function throws an -IO exception: unable to connect to ...
Hi, I'm wondering what the following exception handlings mean and when they would occur.This example is taken from Deitel & Deitel Java How to Program and didn't explain the sections of code with // ?.Your help would be greatly appreciated.Dean// Fig. 21.3: Server.java// Set up a Server ...
I can't get rid of this problem. I've created a method in a class and I'm trying to call that from within an application and it won't allow me to essentiall construct my classes. Any help would be greatly appreciated.import java.util.*;class ArmyBattle {public class Combatants { int ...
I need to add Java doc to my Ant build file, with the following requirements:- All java files under the "WEB-INF\src" directory must be documented. They belong to many different packages and reside in many different folders. - The library JAR files should not be documented. There is just too ...
how come i cant create a server socket?....i got though creating my client....and my server wont create a socket due to some security exception(cannot access port(port i assigned))......how can i solve this?
**"IMPORT" problem?**Hi...I'm working with drivers and objects right now. My last class project was to create a Hi-Lo type of card game where a card would be drawn..then the user would have to guess if the next card would be higher or lower... We had to create an object called "PlayingCard." ...