This is returning an object and is looking for a type int; this.memberId = this.context.getPrimaryKey();how do i convert an object to an int?
i would like to know, how to call a overidding method in the super class which is an abstract class. Since we cannot create instance for an abstract class, how to call a method in the super class without calling its implementation in subclass.can anyone help me?thanx in ...
Hi,I want convert julian Date to calendar Date (mm/dd/yyyy or mm/dd/yy format) in java.Can any one help me how to convert julian date to calendar Date.Thanks,Krishore.
Hey GuysHow would you go about constantly and effeciently monitoring a url?Currently, I am doing it in the most logical and simple way that came to me.I have a timer that wakes up every second, makes a connection to a url using the URL and URLConnection class, checks the lastModified time for ...
Hello,I would like to know if it is possible, using specific tools, to monitor the amount of memory allocated by my web application(weblogic) and to display the origin classes of these allocations, which may be by data types. I know there exists Borland Optimizeit, but i'm looking for a ...
first of all, I have a class called appointment that have get variable(such as Time, Date and STring)method in it, and I have a second class called ListArrayBased. Inside, I have a method that can return an Object.so Appointment abc = new Appointment(Time, Date, String)is ok...then ...
To solve the OutOfMemoryError in my Server Application. i have increased the maximum available heap size to 256 MB. And also i am logging the total and free memories periodically. When the total memory (Runtime.getRuntime().totalMemory()) reaches 100 MB. i am getting the OutOfMemoryError. It ...
231 byte By
Ladiea at 2007-9-29 23:38:25
I'm using a java swing code to view and print a report generated by crystal report. Can i directly access the java api through pure java code? or i need to make a .dll or use jni to access it. Please help me. Thanks so much
425 byte By
gorkteoa at 2007-9-29 23:30:35
I am currently developing a file sharing application for a LAN. I can't decide if I am going to use TCP to tranfer the data between the computers or UDP. Another issue is that do I need create a method that is going to split large files into smaller? I know that UDP packets are only capable of ...
How do I copy two buffered images, side by side, into one blank buffered image?I have two jigsaw pieces shaped as rectangles. I want to connect those pieces together. So for example I need to connect "piece A" to the top, left, right or bottom side of "piece B". How do I implement that?Hope you ...
Hello;I read a file via a FileInputStream and I write byte[] in a DataOutputStream over the network (via HTTPURLconnection and not a Java socket). I implements a JProgressBar to know the size is send, but it seems that the progressbar read the size is read and not the size is send. My question ...
first of all, I have this methodpublic Date createDate(String StringDate){int month = Integer.parseInt(StringDate.substring(0,2))-1;int day = Integer.parseInt(StringDate.substring(3,5));int year = Integer.parseInt(StringDate.substring(6,10));aCalendar.set(year, month, day);Date makeDate = ...
Hiya all, I'm slightly confused over Hashtables. At the moment I have a program that reads a row of data from a hash table then sends it over a socket to another (hopefully) networkable component. However, if I wanted to thread the send program (that sends a line of data then removes it from ...
1451 byte By
bardabaa at 2007-9-29 22:50:37
Hi,I'm trying to read the Property file in path and then set them in System properties so that it will be accessible from my applicaiton.Here is the code for same:try{ Properties props = new Properties(); File f = new File( absoluteFilePath); System.out.println(" f " + f.exists()); ...
Hello,I was writing programs to get an understanding of the java certificate exam. I am not sure this is related but can anyone explain me why the follwing is happening?It is late and my brain is pickled inside my head.--first one--jdk1.3.1 (Jbuilder 7)public class test { public test() { } ...
694 byte By
zoletaa at 2007-9-29 22:46:30
I would like to write a program for a supermarket loyalty card system. The program should have 2 customers and 2 gifts on offer. The customer details and the gift details can be hard coded.When the program starts the user should be shown a menu which will have options to view all customer ...
Hello people,I have an exam in about 4 hours from now. I want you guys to wish me the best of luck. I have learnt more from you people in here than I have learnt from my professor in the uni.Most of you have answered the questions I posted very well and I now feel like a programmer than I was ...
Hi ,I would like to send the MimeMessage object via socket connection. To do do that i have written the following code fragmentSocket s = new Socket("localhost",3200);OutputStream os = s.getOutputStream();MimeMessage mimemessage////some code to create ...
1021 byte By
vinawsa at 2007-9-29 22:39:40
Hello !!I'm implementing the DatabaseMetaData interface and I need to know if somebody already used it ...Here's my question: there's a method called getIndexInfo(parameters) ...DriverManager.registerDriver( new com.progress.sql.jdbc.JdbcProgressDriver() );Connection con = ...
Hi to all!!!can u please help me do that....i mean the always on top property and please without going native. if there really is no way to do that without going native then please do help me do it...plaese send you replies to bleue_franz@yahoo.comi'll be waiting for you....thanks to ...
338 byte By
Jeryana at 2007-9-29 22:34:06
I am reading in a hex representation of Unicode characters as a string.(for example: 004100200042) I want to convert the string from hex to unicode, and write the corresponding characters to a file. The output should look like follow:A B(0041 = Capital A,0020 = space, 0042 = Capital B)Could you ...
52 byte By
g_kundua at 2007-9-29 22:31:09
how to count strings in any file by io stream
Hello people,I have a question that is not clear to me. Could someone tell me why we use interfaces in java? Please if you know it, could you explain to me. Maybe others will learn from here too.Cheers
Hi All,I am working with javax.swing.JFileChooser.Its fine, But I want to disable the "File Name" field in the FileChooser that I am go to view. That means I must be able to choose a file only, should not be allowed to type. Can some give the clue.Thak ...
133 byte By
aKull82a at 2007-9-29 22:24:46
Hello,i headed that the gc is not able to delete String which are constructed via String str = "Hello". Is that right ?
Hi All ! I want to be able to read any character from the command line console as soon as the user types/presses a key. I want to do this without using GUI. What API to use? Pointers to direction in solving this would be helpful. Appreciate your ...
Hi,Iam trying to invoke a private method of an object of some class thru reflection. Despite setting method.setAccessible( true), Iam not able to invoke the private method. Is invoking private methods via reflection not allowed at all?thanks,
Hi,i am trying to simulate a shell using Runtime.exec()First problem: I cannot browse my filesystem, because the Runtime.exec Command creates a new process every time it is called. How can I solve this problem best? Does my program have to remain the current dir every time the command "cd" was ...
To get a system's end-of-line character, I use the following call:System.getProperty ("line.separator");Is there a similar method for obtaining the system's tab character?thanks,Andrew
hi all, i,m beggining to learn java programing at school, my teacher ask the solution for execute and stand-alone application from a website, if some one can help me tnx
102 byte By
jujumena at 2007-9-29 21:58:32
Any one know how to connect to a dbf ? Im doing something wrong! any literature on this topic?
if i write private static void main(String s[]) then it also behave as normal as public static void main(String s[]) How it is possible while i m declaring main method as private and now how JVM interpreter can access this method from the class while it is private now..?
hi all,i have to create a calculation program and i'd like how to make a jtextfield accept only numbers (0 -> 9)?i mean : we cann't enter a string, only numbers are allowedthanks,
1204 byte By
vinawsa at 2007-9-29 21:45:57
hi !i've been trying to use the interface java.sql.DatabaseMetaData, with the purpose of read a database schema and see the tables, fields, indexes, etc.i'm trying this:-DriverManager.registerDriver ( new oracle.jdbc.driver.OracleDriver() );Connection con = DriverManager.getConnection ( ...
If I have SOME card7 Q J 7 5 3 K unsorted in an arry, what kind a methodshould I use to sort it in A K Q J 9 8 7 6 5 4 3 2 format? put a id numberfor each of the card?
I have a problem of calling another class from one class.How can i call another class from one my class1 format is, both are frame class, Second class has the same formatclass cl extends JFrame implements ActionListener { public cl() { // initialization} public void action ...
603 byte By
Brannora at 2007-9-29 21:33:58
Hi all,I'm trying to write a generic method (for the community - in particular Hibernate) and I'm stuck on one "little" issue.I want to pass 1 or more objects to my method, as well as the (all the same type) class type I want to create them as - public static void check (Object object1, ...
Hi Friends,I wanted to start workin with J2ME. Can some one guide me, where to start & whats the approach. Suggest me some good number of online stuff available. I acquaire the basic concepts of Java. So can some one help me, please....Thank You, Madan
158 byte By
vinawsa at 2007-9-29 21:30:41
Someboy already implemented something using the interface java.sql.DatabaseMetaData ?What kind of applications can I build using this resource ?
346 byte By
joey-ta at 2007-9-29 21:29:51
HI , i was wondering if anybody could help me. I want to compare a image of a face from a webcam to another image of a face. They only have to be still images. The images only have to match at about 70% of each other. I know that i will use the pixelGrabber method. How do i go about ...
http://developer.java.sun.com/developer/bugParade/bugs/4891531.htmlAre they ever gonna fix that? It's been almost a year since the bug was reported but nothing has happened!?It's about the internalization of java applications! I don't know how big a procent of java developers are from ...
A float is 32-bits but not all are used for storing the number, does anybody know weather they have a set structure or/and in which order the bits are set out?I am wondering weather it is possible to bitshift, or use other bit-wise operations for that matter.Thanks in advance. ...
284 byte By
Dr_Dukea at 2007-9-29 21:16:24
hi,I want to read some unique ID for the PC I'm running my code onI mean I could always do it in a native way (read the serial of the HDD or something like that)but I 'd love to do it in javais there is a way to do it in 100% pure java?duke
I'm going to develop an appointment remindig system,which is a web based application.One of its important functions is to pop up a window at some certain time to remind the user for an coming appointment .So I think there's 2 options to implement this requirement:1.Refresh page automatically ...
Hi All,How do u compare two Images. It need not be 100% comparison. Up to 80% it is talarable.Can some one give me Idea about this...Thank You Madan
2737 byte By
aKull82a at 2007-9-29 20:48:29
Hello,I want to create a listener, which inform me when a object was delete by the gc. so I wrote the code you see below.New I have the problem: in the run method of the thread i use a while block, and this block will never ending, but if a add a system.out in the block everything works fine. ...
467 byte By
gnpa at 2007-9-29 20:45:52
I have a simple doubt about the use of throws exception in java.Even if i am not throws any exception in method the method will throw the exception right.for eg:public void aMethod()throws SQLException will throw sql exception when any sql exception happends in the program.public void aMethod() ...
Hi All,I have a Client Socket Connected to Server. My Server is some Different Application (Not a Java Application). If the Server is Closed, I want my Client Application to be Closed.Can some help me out in doing so... Thank U Very much.Madan
213 byte By
avier5a at 2007-9-29 20:33:47
Hi all,I started a project of implemmenting the UML in Java, a GUI to creat a UML charts.I need your help in finding classes that will help me in my work and reserch. Thanks,A.B
141 byte By
ohadasa at 2007-9-29 20:27:52
Hello , I have a EJB 2.0 , J2EE ,JAVA and websphere job interview , can you please send me questions and answers?THANKS