Home » Java Technology

Java Core APIs

Inheritance - So you know Java eh? Try this.Thu, 20 Sep 2007 20:15:00 GMT

Want some fun? Check out this code, and see if it makes any sense to you.At the end, fingure out why it does what it does:The problem is this. A child class inherit a parent class. It also override the methods. Declare an instance of child and assign it to a parent handle. Call a function using ...

Comments (19) | Promote | Bookmark

Executing my first servlet programWed, 16 Jul 2008 20:18:00 GMT

Hello ranchers,I am trying to learn j2ee, servlets and Ejb. i am having a nightmare in running my first servlet program. Here is how my TestingServler looks like. here is the directory where i stored my .java fileC:\jakarta-tomcat-5.0.14\webapps\myApp\WEB-INF\classescode:import javax.servlet.*;i...

Comments (11) | Promote | Bookmark

Question concerning LinkedList of int arraysSun, 23 Sep 2007 19:43:00 GMT

This is probably a stupid question, but...The following section of code is intended to examine the vertices of a graph, set the value of nMatrix[j][k] to 0 whenever there is no edge connecting vertices j and k, and place an int array {j,k} into a LinkedList setN whenever an edge does connect ...

Comments (10) | Promote | Bookmark

Page Expired but Session is activeWed, 16 Jul 2008 20:14:00 GMT

hi, i have a problem,In my application when i click, a process starts and it keeps running for long, but after exactly 60 minutes the web page displays "The page cannot be displayed" , but the process is still running in the server.Only the page expires, the session is still alive and active. i...

Comments (8) | Promote | Bookmark

Local Variable annotationMon, 24 Sep 2007 00:00:00 GMT

hiI've written some lines of code:import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Retention(RetentionPolicy.RUNTIME)@Target(ElementType.LOCAL_VARIABLE)public @interface Testable ...

Comments (6) | Promote | Bookmark

rmi deployment (RMIC.EXE)Mon, 24 Sep 2007 01:02:00 GMT

I've been using RMI to build a messaging app, where a manager would be able to send pop-up messages to a user's desktop. I know pop-ups are a taboo, but hey I'm only following the requirements (side note: I wonder if there is a way for a awt/swing frame to pop-up but not steal window focus). ...

Comments (6) | Promote | Bookmark

JSP, ServletsWed, 16 Jul 2008 21:14:00 GMT

What r the advantages of servlet over jsp?...

Comments (5) | Promote | Bookmark

generate a text file in another server ?Thu, 17 Jul 2008 19:45:00 GMT

Hi, dear allHere is my problem:I need a web page, to output some list,if the user feel OK after reading, he/she click on a button in the web page, then my servlet should save this list into a text file and transfer to another NT server's directory. I'm using Websphere in Unix, I feel it...

Comments (5) | Promote | Bookmark

Send response before process is done.Wed, 16 Jul 2008 20:42:00 GMT

Hi,Sorry if this as been already answered but I could not find the information.I have 3 part in my project.A j2me deviceA servletA Asp control that send fax.So I call my servlet with my j2me device, my device wait on the getResponseCode(), my Servlet do the process in the end it call the asp con...

Comments (5) | Promote | Bookmark

Calling one another's context Servlet from other oneWed, 16 Jul 2008 20:28:00 GMT

All,We are having two diferrent web application(Servlet/JSP based) on one application server.We want to integrate both application.User will login through first application(say A).He will be provided with one menu option for calling another web application(say B).We want to know that how can we...

Comments (4) | Promote | Bookmark

RMI Activation FrameworkThu, 20 Sep 2007 14:31:00 GMT

Hi folks,Just wondering about the required result when inactive(ActivationID id) is called. Should this kill the jvm associated with this Activatable process? If not does anyone know how to kill the jvm but still make it available for reactivation? unregister removes it totally so that is not ...

Comments (4) | Promote | Bookmark

Where to put the servlet.jarWed, 16 Jul 2008 20:16:00 GMT

Hi, I just found a servlet.jar in tomcat's lib directory. I put it in C:\jdk1.2.1\lib, the compiler can not find javax.servlet.*. Then I put it in C:\jdk1.2.1\jre\lib, the compiler still can't find javax.servlet.*. Can someone tell me where exactly to place the servlet.jar?Thanks.BTW, I...

Comments (3) | Promote | Bookmark

Using exec & socketsFri, 21 Sep 2007 18:22:00 GMT

I use Runtime.exec to start a new java program. The new java program should create a socket connection to another program.The socket will connect if created and used from the static main method. It will also work if placed in a static method called from main. It will not work if I create an ...

Comments (3) | Promote | Bookmark

Hashmap Integer KeySun, 23 Sep 2007 05:14:00 GMT

Ok, I have what seems to me as a simple problem in my java code.I am pulling a hashmap out of the session and then getting an item from that hashmap.. but nothing is being pulled out of the hashmap. Here is a small sample of the code.formObjCls = form.getClass();try {mthd ...

Comments (3) | Promote | Bookmark

How to use a different port in RMITue, 25 Sep 2007 11:18:00 GMT

Hi ,We cannot use default port 1099 in RMI due to some restrictions. I want to user port: 8000 instead.Can some one please help how to use a different port?ThanksArun...

Comments (3) | Promote | Bookmark

Calling Dos Commands From JavaFri, 21 Sep 2007 15:49:00 GMT

Hi Friends,I am working on a app which would allow me to call DOS commandsfrom Java.Can anyone give me an example of how to call the command(say,del or dir),get its output,input etc from a java program....

Comments (2) | Promote | Bookmark

repaint problemFri, 21 Sep 2007 08:06:00 GMT

hello therethis is my first time here, therefore please forgive me if the level of my problem is far too below yours.i am stuck in situation where i have to paint a jpanel 25 time and each time i have to place a 32*32 grid of jpanel on the main panel.my code is doin it only once and stop ...

Comments (2) | Promote | Bookmark

Arrays.sort() synchronizationTue, 18 Sep 2007 08:11:00 GMT

Can someone, please, let me know if Arrays.sort() method is synchronized in java or not? ...

Comments (2) | Promote | Bookmark

Unable to get members of some groups in AD using JNDISat, 22 Sep 2007 06:21:00 GMT

I am trying to get members of a group in an Active Directoryusing JNDI.I am able to list all groups, but I am not able to get membersof certain groups (the ones created by the system - like WINS users).However I am able to list members of groups which I created.However, if I use AD browser, I ...

Comments (2) | Promote | Bookmark

Prepending data to a fileSun, 13 Jul 2008 21:21:00 GMT

Hi, I want to know if there is any way in Java where I can prepend data to a file.Currently yhis is what I have been doing-ex) Let the file to be written to be Log_file 1.I rename the file to Log_file_temp. 2.Write the data I have in a buffer to the file Log_file. 3.Once this is over, I append t...

Comments (2) | Promote | Bookmark

How to update particular area in appletWed, 19 Sep 2007 11:54:00 GMT

I have an applet and some images in that I am using jdk1.1.8.How to update particular area within applet frequest whileremaining area should not be updated.Sharmila....

Comments (1) | Promote | Bookmark

How to capture screen & audioMon, 14 Jul 2008 16:53:00 GMT

Hi,I am a java developer and have been assigned with a task to build a tool which can do a screen capture video with an audio voice-over.Please suggest me how to go by. Is there a java API which can be used to build the tool?Thanks,Sreeni[ August 06, 2007: Message edited by: sreeni san ]...

Comments (1) | Promote | Bookmark

Regular Expression in StringSun, 13 Jul 2008 21:23:00 GMT

How regular expression string should look like to find the match in the string of word "amp". I want to use method String.matches(String regex).Thank you in advance....

Comments (1) | Promote | Bookmark

Jasper report Problem!Mon, 14 Jul 2008 16:54:00 GMT

hi,I am Sabari working on Jasper reportsI have generated such reports earlier.now suddenly i am getting a problem which I am not able to debug.the problem is there are no errors. but i get a blank page on the screenI have got the desired output in the java page. but not able to get the same outp...

Comments (1) | Promote | Bookmark

Uploading & Downloading filesWed, 19 Sep 2007 17:40:00 GMT

Hi,Can anyone let me know were can I find an example of uploading/downloading file from the server to the client and vice versa.I am trying to upload/download an Excel file.I am using a web GUI.Thank you very muchLior...

Comments (1) | Promote | Bookmark

Parse DoubleWed, 16 Jul 2008 20:50:00 GMT

If i try to convert string to double in JSP i am getting following error. D:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_abc.java:77: Method parseDouble(java.lang.String) not found in class java.lang.Double. db1 = Double.parseDouble(st1); ^Examples welcomeThanksVenky...

Comments (1) | Promote | Bookmark

JDBC driver for SQL Server 2000 with windows authenticationWed, 19 Sep 2007 17:24:00 GMT

Does anyone know of a JDBC driver for SQL Server 2000 that supports Windows Authentication, that is that a username and password does not need to be supplied when connecting to the database. ...

Comments (1) | Promote | Bookmark

Multi threadingTue, 25 Sep 2007 06:50:00 GMT

can u please give me the code for the following problem.problem: In a class I am having an array of strings. one thread will insert the data into the array of strings and one thread will sort the strings. how i can implement this using synchronization. ( if i specify sorting & inserting in ...

Comments (1) | Promote | Bookmark

Design Patterns in Servlet & JSPWed, 16 Jul 2008 20:33:00 GMT

The authors seem to have done a very great job in this book. Actually this is one of the very few JSP and Servlet books I have seen with a separate chapter on Design Patterns. How much of design patterns were actually covered in this book?...

Comments (0) | Promote | Bookmark

limitation or bug in javaidl on tablehash bigger then 10 elements?Tue, 25 Sep 2007 04:38:00 GMT

Hello alli have strange behaviour when i try to invoke remote method that takes hashtable with more then 10 elements that contains vireos key value pair is it bug in javaIDL or something im doing wrong?...

Comments (0) | Promote | Bookmark