Is There Any Assert Api for Java

498 byte By Najam-Nazara at 2007-10-1 20:27:01
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 ...

Any way to manage Uncaught errors?

974 byte By torrenala at 2007-10-1 20:37:12
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 ...

migrate to 1.5

825 byte By still_learniga at 2007-10-1 20:43:20
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 ...

StringBuilder Vs StringBuffer

100 byte By cybervink2000a at 2007-10-1 20:46:18
Techies,Other than perfomance, Is there anything special in StringBuilder.Vinay

How to create a actionListener for individual JButton in a for loop?

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?

Diagnosing a "hang" in an Iterator

1140 byte By kdlitwaka at 2007-10-1 21:26:44
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 ...

how debug with Ant

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

Recommended profiler for finding non-heap (native) memory leaks w/ JDBC

717 byte By weathermapsa at 2007-10-1 21:37:35
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 ...

How to create a log file....append data to it and put time date stamp

374 byte By fridayfreaka at 2007-10-1 21:56:56
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 ...

Tracking memory usage of JVM in my java code?

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. ...

Eclpse debugging (little) problem

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 ...

JDI popframes method

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 ...

JNI Error from HotSpot Virtual Machine

6663 byte By moodamultania at 2007-10-1 22:59:02
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 ...

Unexpected NaN from arithmetic operation with double

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 ...

Apps freeze after 2 days

1416 byte By Carrot_Topa at 2007-10-1 23:08:52
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, ...

JPDA - Port not listening when running app on Unix box

394 byte By benwimporya at 2007-10-1 23:19:18
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 ...

failed connect to remote VM - Eclipse Bea weblogic 8.1

386 byte By acsploria at 2007-10-1 23:19:56
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 ...

Log4J Problem

2448 byte By sudarsona at 2007-10-1 23:41:06
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 ...

Jbuilder

102 byte By acetoleveragea at 2007-10-1 23:43:18
Pls provide me proper steps to learn the debugging feature of JBuilder6thanks in advance

JPDA 1.5 Sun Connectors

616 byte By hw_va_99a at 2007-10-1 23:49:17
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: ...

Log one priority level using log4j

331 byte By sharpe_leea at 2007-10-1 23:52:08
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 ...

log4j xml configuration file problem

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 ...

using JVMTI to get a collection with all instances of a class?

1160 byte By saintissa at 2007-10-2 0:01:43
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 ...

Runtime problem , please help,

859 byte By kane0086a at 2007-10-2 0:03:47
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 : ...

debugging Multiple instances of Tomcat in Eclipse

249 byte By mhdevid9a at 2007-10-2 0:05:19
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

Weblogic Error

1202 byte By rajnarayan_da at 2007-10-2 0:05:23
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 ...

Log4j: XML configuration file problem

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 ...

how to log a distributed application using Log4j in Tomcat?

376 byte By sudarsona at 2007-10-2 0:33:42
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 ...

Any way to Debug a servlet?

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 !!

Debug messages in log4j

206 byte By clojinteda at 2007-10-2 0:39:06
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

Getting JDB to work with my own JPDA connector

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 ...

how to Write log messages in a text file located in another machine

317 byte By sudarsona at 2007-10-2 0:55:41
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 ...

Passing system variables in eclipse

213 byte By virginia_codera at 2007-10-2 1:38:15
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"

JVM core dumps on Solaris

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 ...

How to write regularExpression in Java

547 byte By isawu64@yahoo.coma at 2007-10-2 1:55:51
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 ...

trace files being truncated after 18mb

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?

Making timers

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 = ...

Object array input

620 byte By mwsmith15a at 2007-10-2 2:11:30
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 ...

Profiling (-agentlib:hprof) of "endless" applications?

528 byte By MartinHilperta at 2007-10-2 2:19:08
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 ...

unable to use junit with jsp and web project in MyEclipse

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. ...

Null Characters Code, Converting

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?

Loading source code from a jar into jdb

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 ...

Java native interface?I want to speak with some Experience Programmer

214 byte By master@javaa at 2007-10-2 3:43:10
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.

Debugging basic program

1639 byte By TheycallhimBa at 2007-10-2 3:50:21
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 ...

Magic 8 Ball

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 ...

Problem with images

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 ...

Bubble sort algorithm

2589 byte By BillRolandlexa at 2007-10-2 4:23:11
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 ...

Sending log data to two different files using log4j

343 byte By rsreddycha at 2007-10-2 4:38:03
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 ...

Regular expression result into variable?

337 byte By scootz3345a at 2007-10-2 4:39:32
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 ...

POGO FREEZING... POSSIBLY JAVA ERROR

12817 byte By ohyeaitsmeulost2a at 2007-10-2 5:04:53
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 ...