HI,Now-a-days i m working on the assertion facility in java...One of my friend told me that there as an API by SUN for Assertion except that assert keywords and other facilities in J2SE 1.4 & 1.5.(By default that we get in JDK)...It means like Java Com API there is some Assertion API...I ...
Is it even possible to manage uncaught errors?Example: I invoke a swing worker. A bug causes the swing worker to fail with an exception. If running as an applet, this error becomes transparent to me, except perhaps as some un-expected behavior from the application that may or may not be noticed ...
Hi, All:I need to certify java 1.5 for one of my company's products. This application lauch Applets through html files. Now after I compiled the code with 1.5.0_04 and changed the CLASSID in the html files for the new Java Plugin 1.5.0, I found one strange problem: if thehtml both use tree and ...
Techies,Other than perfomance, Is there anything special in StringBuilder.Vinay
96 byte By
hjjka at 2007-10-1 20:58:07
How to create a actionListener for individual JButton in a for loop? Can someone help me?
I have code that takes a list of ID numbers in an ArrayList The size of he ArrayList is 126. IN my code, I create an iterator on the list. For each id, I do a fetch from the database. After I get to 28 ids,the program simply stops. No error, no Exception. It just stops . I wanted to run ...
297 byte By
nil4ua at 2007-10-1 21:33:37
Hi All,I am running my application with apache-ant-1.6.5.Can anybody give suggestion to debug the my application using jdb with ant.Is there setting in ant so that when i run my program using ant i can debug with jdb.waiting for
I'm running a java application and notice the process continues to grow in size until it consumes all available system memory.At first, I thought it was a heap problem, but I ran Jprofiler for awhile and heap size appeared to be stable. I believe it's a leak with the JDBC connections, but I ...
I want to create a log file where i can append certain information along with the date/time and also put the date time stamp on the log file based on the batch process run time.......each time the file is appended to it shld be in the format..."ABC", 123456, "PXY5US", "John", 2005-07-06 ...
782 byte By
ycompa at 2007-10-1 22:03:34
Hi,I have a method and I will make certain changes to it now and again. It is a critcal method for performance/memory usage.I want to do something like this:startResourceTracking();the_method();endResourceTracking();I just want to be able to be able to track memory usage with this technique. ...
402 byte By
Toxtera at 2007-10-1 22:27:03
Well it is not really a problem, more a feature that bugs me and takes my time.Here is the what I can't resolve:When in debug perspective an doing debuging pretty often compiler goes in to (or step in to if you like) ClassLoader class. Can this be avoided somehow?I searched in Preferences but ...
1023 byte By
caidaera at 2007-10-1 22:34:26
Hi allWe're implementing a debugger extension that uses the JDI popframes method to pop the most recent method's stack frame of the stack.The popframes blurb in the JDI specification gives an ...
Hi,I am making first attempt to link image processing code with a GUI in java, so the entry point to the program is in a JFrame object. I do not know a lot about how JNI really works and would appreciate any help.An array of pixel data is accessed through JNI field access mechanism in native C ...
1435 byte By
Ben_Pha at 2007-10-1 23:07:50
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 ...
Problem:Applications run nicely and consistently for a few days (at least 2) then just seem to freeze for a reason we can't figure out. Error logs are not indicating any problems.Needed:Debugging tool that can attach itself to a running process and let us know what is going on. (I tried jdb, ...
Hi,I am launching my app on JDK 1.3.1_05 with the following JVM params:-Xdebug -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=1044,suspend=yhowever when I run a "netstat -a | grep 1044" I get nothing.Why would the JVM not open the port for listening?Can't think what I am ...
I'm using at IDE eclipse 3.1 il plug-in myeclipse 4.0 last revision.I have bea weblogic server an other server machine and i want connect to this server on the net to debug an web application.My problem depend from bug inside eclipse, is incompatible with bea or I could be able not ...
Hi all,I am trying to create a logging feature into my two simple java code and face with the foll problem.Please let me know how to get access to the Logger object that I have created in code1 to code2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Java Code 1import org.apache.log4j.Level;import ...
Pls provide me proper steps to learn the debugging feature of JBuilder6thanks in advance
Hello,I'm trying to use the connectors described in http://java.sun.com/j2se/1.5.0/docs/guide/jpda/conninv.htmlNamly I'd like to try these connectors:SA Core Attaching Connector: sun.jvm.hotspot.jdi.SACoreAttachingConnectorSA PID Attaching Connector: ...
Hello,May l know how to log only 1 level message to a log file? For example i just want to log the com.xxx package in INFO level to a log file, greater than this level not going log. Or I just want to log only ERROR level to a log file, may i know how to configure the log4j.xml to make it ...
5762 byte By
Shiggya at 2007-10-1 23:54:56
Hello,I have the following problem: I first some research on java.util.logging and log4j, put some example logging in an existing application where there was no debugging at all before etc. So I tried to configure log4j with a .properties file, no problem occured. Then I realized that it was ...
Hi,basically, I'm trying to find a way to fetch all instances of a certain class in Java, i.e. something like an allInstances() operator on java.lang.Class, but obviously that doesn't exist.I stumbled upon JVMTI, which seems to be able to access instances of a class on the heap, using this ...
public class execInput {public static void main(String Argv[]) {try {String output;String[] cmd ={"c:\\xpdf\\pdftotext.exe", "c:\\pdfFile\\dispatching.pdf"};Process pr = Runtime.getRuntime().exec(cmd);}catch (IOException e) {System.exit(0);}}Above program is run in Ms-DOS : ...
Hi,Is it possible to configure multiple instances of tomcat in eclipse. or atleast debug apps that are running in separate instances.Any pointers would be great. Is there a way to debug such a configuration?thanksM
iam working on weblogic 5.1 on windows Xp ,installed jdk1.4 ,when iam trying to run startweblogic.cmd iam getting this following error.please provide necessary solution.C:\Projects\ServicesLink>c:\j2sdk1.4.2_07;\bin\java -ms64m -mx64m -Djava.compiler=NONE -classpath ...
4027 byte By
Shiggya at 2007-10-2 0:17:44
Hello,I set up some logging in my existing application with log4j and an xml configuration file. Now I made some changes to my package structure, and some problems occured. So I thougt of setting the logging level of one of my loggers (named myapp.iointerface.DBAccess in the config file). So ...
Hi all,I want to write a logging mechanism to an distributed application using Log4j such that I need to get the logs of the whole application in a single file.Currently I have logged that application that runs in a single machine.but I want the log mechanism to work when the application gets ...
262 byte By
Sahabaa at 2007-10-2 0:36:34
Hello !!I was wondering how can I debug a servlet? I have written a servlet, and I run it, and I just don't know where it goes wrong, or what happens. Is there a way to use the System.out.println function or something like that?Thank you !!
Hello,I'm using log4j and JBoss and I'm getting a large number of debug statements in my log file. Does anyone know how to disable these debug statements? Thanks in advance,Ger
1441 byte By
juntaa at 2007-10-2 0:52:55
Ok, I am now officially confused... I read http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jpda_spis.html, and deployed my connector (for now, just to see that it works, Sun's sample one) as they specified (created a jar withMETA-INF/services/com.sun.jdi.connect.Connector file, andplaced it in ...
Basically My application is distributed across two or more tomcat servers running in multiple machines.And I get a log4j logs in the respective machines.But I want a consolidated log message in a single machine.How do i get that done?Any samples? Any clues?Any specific ...
I am new to using eclipse. We have a java program for which I need to pass a system variable that is read in the code using System.getProperty method. Example is:-Dprogram_config="C:\Temp\config.xml"
398 byte By
BKBKa at 2007-10-2 1:44:09
Need help asap on know where/why my JVM core dumped. I've the logs from the process but they dont seen to indicate any odd thing. I've tried to debug the core using dbx like : dbx /usr/bin/java ./corebut keep getting message: dbx: program is not activePls advise ASAP.Can anyone also point how ...
Hi all,Iam with a small problem.....My file contains data like:EVENTTS=2005-10-06 11:07:18.335 CATEGORY=Uncompressed Request = ID= WID=SINCCBMSDGND017 AID=TIPSSID="TECHARCH" I have to write a regular expression..I have to get time(TS) from the data...I wrote Pattern ....its ggiving error.Can ...
276 byte By
rezmana at 2007-10-2 2:08:07
I have enabled trace file debugging for my application and after the trace file has reached approx 18mb, it stops writing to the file. Im also doing logging and the log file is usually around 80mb. Is there some sort of maximum file size restriction? How do I fix this?
1711 byte By
Blazeixa at 2007-10-2 2:08:48
Hi, I am trying to make a simple timer. I want it to count up infinitely, not down, So i can't use the timer class. I am using System.currentTimeMillis() and I am trying to display the timer in a JLabel called time. Does anyone know why this isn't working?//In constructorstartTime = ...
Hello, I am trying to input a file that contains an array of object refrences. When doing so I set the array to receive the input array to a larger size than the array being input. Once the array is input however, it resizes the created array to the size of the input array. For instance, I ...
When I start my server application with-agentlib:hprof=cpu=timesit creates a file 'java.hprof.txt' and the execution is very slow. So, I guess profiling is working. But how do I get the results? I read somewhere that the results are written to the hprof file when the applicatione exits. But ...
358 byte By
d001a at 2007-10-2 3:16:20
i am unable to use junit test cases for web project. i can use it for java applications . but i have to use it for jsps in myeclipse that i developed under webroot forlder in a myeclipse project. please help me in this regard . i will be benefited if anyone can elaborate the steps to follow. ...
201 byte By
BigBa at 2007-10-2 3:28:48
I currently have a "_.class" file in use in textpad. When i compile the program in this code it works, but I don't know how to conver it back to normal and understandable code. Can anyone help?
580 byte By
warioa at 2007-10-2 3:30:31
I wish to include the source code of my applications in their jar files to facilitate server-side debugging. So far I have been unable to load source code into jdb from a jar using either the -sourcepath command-line switch (which seems buggy) or the use jdb command. I am under the impression ...
Please Give me your mail address if you are Experienced JNI, VC++ programmer. I shall be very thankful to you. All i need is to just develop and run and HelloWorld type application Using VC++ as native code.
Hey guys,So I just finished writting this programs that simulates a magig 8 ball, but it wont compile and run for me. Can anyone help me out with getting her to work properly.One error I got was that "num" hadn't been initialized, but I thought I already did?! This is my source code:import ...
1945 byte By
Snatcha at 2007-10-2 3:52:38
Ok so I've written my program that simulates a magic 8 ball. But it wont do what I'd like it to do. What I would like it to do is ask the user for a question and give them the option to either push Q or q to quit. If they enter a question without a question mark I would like it to echo the ...
661 byte By
Fungusa at 2007-10-2 4:07:21
I have a applet containing two class-files; Starter and ImgApp. Starter is supposed to call the constructor in ImgApp. ImgApp will declare a image, but I get a NullPointerException. I think it is something wrong with "getCodeBase()". Thanks for the help =)Here is the code:import ...
I would like to fix the errors as below during compiling the file:C:\5_Array\Lab4Q1.java:14: illegal start of expressionstatic void selectionSort(double[] list){^C:\5_Array\Lab4Q1.java:31: ';' expected } ^2 errorsimport javax.swing.JOptionPane;public class Lab4Q1 { public static void ...
Hi,Can some one please help me with my problem I have here?I want to send log data to two diffrent files depending on the logging level such as DEBUG and WARN.How can you configure this in log4j.properties.Please post sample code for log4j.properties to achieve this.Thanks in ...
Im dealing with log files here...i use regular expression to detect the values...how can i save these values into variable, for example 25-07-2005 into "date"?this is how my output statement look likemyOutput1.print(matcher1.group(1)); matcher1.group is the way i use to get the value using ...
I CAN LOAD ANY OTHER GAME ON POGO BUT WHEN I GO TO HIGH STAKES POOL AND GET ON A TABLE IT FREEZES, THE ROOM LOADS FINE AND SO DOES THE TABLE, BUT WHEN I TAKE THE FIRST SHOT IT LOCKS UP, I CANT TYPE AT THE TABLE BUT CAN TYPE IN THE MAIN LOBBY, JAVE CONSOL READS....Java Plug-in 1.5.0_05Using JRE ...