Hi, I have a scenario, in which I have to run a Thread at every 15 minutes, If the first Thread is not Finished in 15 min then new Thread has to start. Currently I implemeted with java 1.5 schedulers, but the problem is if my first Thread is taking more than 15 min, then no new Thread is ...
Hello,to my environment:- java 1.5- tomcat 5.5i am trying to access remote mbeans from my web-app instances running on different machines for some clustering purpose. in general i am trying to access the oher remote mbeans from within a mbean itself using a rmi stub wrapped in some kind of a ...
I have written two classes in separate packages of the same project. One is beinng used as the server and the other is used as the client. I make the Registry entry in the Server Class as: PowerServiceServer svr = new PowerServiceServer(); // ... and bind it with the RMI Registry Naming.bind ...
3419 byte By
Mjacobsa at 2007-11-27 9:02:54
I am trying to call a method on the server from the client. I called a new instance of the class and wrote the new instance as an object to the ObjectOutputStream. I wrote an interface on the client side. Am I able to do this?(or allowed to) Oh yeah the server is on a different machine. The ...
94 byte By
kpba at 2007-11-27 9:03:12
Hi,could you advise me free javalibs for working with ftpthank you
585 byte By
MePacoa at 2007-11-27 9:03:14
Right now I have some code that creates and starts threads to perform certain tasks. Some of the threads I care about so I wait for them to finish (join() with a reasonable timeout value). The problem is that there are some threads that I don't care whether they execute successfully or not so ...
hello,i'm planning to implement file transfering b/w two computers on network or internet using java...how do i get started with?wat all i need to know?pls reply..thanx
Hi,I have a HashMap storing objects of type Employee. This map is keyed by employee id. I have a data feed sending me employee updates at a rate of up to 200 to 300 employee updates persecond. What I need to do is get the employee id from the data feed and check if it is in my Employee HashMap. ...
523 byte By
Jubaera at 2007-11-27 9:04:41
Hi thereI am using JDK 1.4 and thus I wrote my code for tracerout like thisCmd = "tracert host X";Runtime r = Runtime.getRuntime();Process p = r.exec(Cmd);This works perfectly and gives me results between host X and my machine.Now I would like to run my code from my PC but it should give me the ...
Hi How do i find out which objects are taking memory in JVM.
Hey, I am not quiet sure if this is the correct forum to place this question in, but i went with it because of the stamp networking.I am building a program that grabs sites of the web and decodes the HTML and then displays a web page. I would like to know how I would make the links from the ...
How come only partial page is refreshed in web- browser. ?
3609 byte By
rcauvina at 2007-11-27 9:05:40
I am having trouble with an HTTP POST returning different results froman equivalent HTTP GET. If you go to the following URL in a browser: http://transit.511.org/tripplanner/itinresults.asp&fs=714+Montgomery+Styou will see that it displays a web page containing the following text:"We found ...
121 byte By
mammaa at 2007-11-27 9:06:18
Where can I find a good tutorial on generics that will consist examples and settings of ide to use itThanks
Greets,I'm developping a huge application and got a latency/block problem using the write(ByteBuffer) method on a Socket from a socketchannel connection.Running java 1.5 (diablo) on Freebsd 6 servers, 4Gb ram (2.2 allocated to jvm), with dual xeon dual-core (total 4 cores)Here is the ...
How to set this from within a program. I know how to add it to the command line with -D but how do I do it from with an application ?
how to extract values from one hash map and put it in to another hash map
3166 byte By
maxpga at 2007-11-27 9:07:00
I have some kind of synchronization problem. somehow I get an IllegalMonitorStateException when calling notify on an object, but this object is within a synchronized block! The code looks like this:private volatile Set<K> set = new HashSet<K>();private Map<K, ...
I have created a simple agent (using version 5 JDK) to handle an MBean. Within this agent I have created two adapters; an HTML and SNMP adapter. The HTML adapter is working fine via the browser (i can execute the operations on the MBean). Question is; Can I use JConsole to connect to the SNMP ...
I'm trying to run an interactive Linux process from Java. That is, a program which prompts the user for input as it runs. I want to catch the output and feed in appropriate responses. See the sample code below.When I try to run this, it hangs. The process sits there without terminating or ...
How to find out whether a RMI calling client is on the same physical machine as the server.Taken into account the machine may have multiple NIC and hence multiple possible IPs.Regards
I get a broken pipe error while uploading feeds to an ftp server,,,,any resolutions?2007-06-26 06:04:49,430 INFO [STDOUT] java.net.SocketException: Broken pipe2007-06-26 06:04:49,430 INFO [STDOUT] at java.net.SocketOutputStream.socketWrite0(Native Method)2007-06-26 06:04:49,430 INFO [STDOUT] at ...
Hello,We have 17 schools in our company which we serve. Every school has a shortcut name like EKS or ASR. Every school has 1 IT teacher which can log into a jndi desktop application where he can set passwords for teachers/pupils if they forgot theirs...When the IT teacher press the button to ...
108 byte By
nthalia at 2007-11-27 9:11:01
Is there a way to programmatically find out if the rmiregistry is running?Thanks,Nilesh
HiI am getting confused with all this sockets/streams and socketchannels...Which is the better way of doing network programming?
hi all,i'm working on a issue in which when my http client recieves chunked response, it fails while writing the data in the internal process, i want to simulate it and for this i need to run a server which should respond with a chunked response so that i can see what's going wrong in my ...
hi,my telecom client puts a binary file which is asn.1 encoded with BER.how to handle binary data in java.how to convert binary to hexa to ascii formathow to convert binary to octet to ascii formatplease help me in this.regards,s.mohamed
2362 byte By
kulkuria at 2007-11-27 9:13:22
I have a swing problem, which needs some threading code, but I barely understand it.My text field components change the underlying data when the focus is lost. When I click on a different tab in the JTabbedPane while editing a field, at the time the ChangeListener runs, the focus is not lost, ...
1193 byte By
hos123a at 2007-11-27 9:13:37
Hi thereI am trying to set up a practical for a computer science module and need to check the feasibility of creating software that acts like a DHCP and NAT server in java. I'm pretty sure the DHCP is possible using datagrams, but I'm not sure that a NAT server is possible. So far what I ...
Hi I have registered an RMI object in the JNDI tree of the Weblogic server. This RMI object is supposed to be accessed by multiple Session Beans. I lookup the RMI object and get the instance. But when I try to narrow it , it throws the ClassCastException. Following is my code : Object obj = ...
Hi there!!In fact my java app creates a config file on the client's machine and I want that after the file's creation the client or any user can't edit the file,,,is it possible some way?Thanks...
Hi,I have an issue when using the XMLDecoder class in conjunction with System.in.What I want to achieve is basically to be able to send the contents of an XML file to stdin of the Java application. However, when doing so, the readObject call to the decoder does not return anything until either ...
667 byte By
Samantha at 2007-11-27 9:14:55
Hi, I was trying to use Jmagick and I have a MagickImage object. I wanted to convert it into byte[]. But I have this exception. The following is the code that I have used.<code>ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ...
i am using a java application to communicate with a server written in C# the server side looks at a double reading the Most significant byte first to the least. my doubles are being entered into the byte array which i am sending least significant to most significant. why is this, is there an ...
We have more processing to do than can be accomplished with a single computer. To solve the problem I've implemented a distributed computing solution using RMI. (The first time I saw RMI was about 2 weeks ago, so please bear with me!) The implementation is a proof of concept not a fully ...
i need to move all content in some folder and move to another we can ? import java.io.*;public class TestOut{public static void main(String args[]){try{File file=new File("c:\\from");InputStream fis=new FileInputStream(file);File file2=new File("c:\\to");OutputStream fos=new ...
Dear all,Greets for the Day.I am here by sending a java program to receive a mails from my inbox but if i run it i am getting the following error.Please help me to rectify the problem and get the result.Thanks for your help.Regards,Rajesh.Program is import java.util.Properties;import ...
Hi,I encountered the following exception during the retrieval of Object[][] from the service.org.springframework.remoting.RemoteAccessException : Cannot access HTTP invoker remote service at [https://test.org.net/context/remotin...vokerService]; nested exception is ...
hello all,are there any static deadlock detection tools out there for java?i have read something about lock_lint provided by sun, is lock_lint compatible to java 1.3?any other tools out there worth mentioning?thanks for your replyrob
hi! i am planning to develop an application which finds the live hosts on a local area network and then lists the shared folders on each machine. basically i want to search for files and folders on lanplzzz.... help
Okay, here is my question. I have been trying to research on the memory hit an application is going to incur if it uses a HashMap instead of an ArrayList and I have not been able to find a satisfactory answer. Suppose I have say 10,000 objects and the way I access them is such that 50% of time ...
4445 byte By
tigerxxa at 2007-11-27 9:20:43
Hi Guys, I was trying to create a connection to our proxy server and tried to fwd the requests coming to my ip to proxy server.I have tried using Proxy class. But the issue is that I am getting invalid proxy exception please help me with this. The code I have used is pasted belowimport ...
It is very difficult to find examples of RMI-IIOP over SSL.Can anyone give me a simple example about it? Thanks in advance.
882 byte By
mahiva at 2007-11-27 9:22:49
If I write a program that will generate OutOfMemoryError, and catch it using Throwable then the line after catch does not execute, but if I use Error instead of Throwable then it gets executed. Why so?import java.util.*;class TestExcep {public static void main(String[] args) {Vector v1 = new ...
1019 byte By
JesseKoa at 2007-11-27 9:23:41
Hi!I use fscontext-1_2-beta3 to be my file system service provider. It worked fine on windows system, but failed after migrate to AIX. The following error message is what I got:javax.naming.NoPermissionException; remaining name '"/usr/...../jndi/jdbc"'[java]at ...
1034 byte By
4tha at 2007-11-27 9:23:53
Hello folks,I am using W2K server for accessing Active Directory with JNDI but i need some Controls/Extensions which - so i have read it in a java/ldap book - i should find this stuff under the link: ...
When i am trying to execute the code of CORBA "BAD_PARAM/201. vmcid: SUN minor code: 201 " exception comes. The flow of code and function calls are as follows.//-Change of Static IP code startsMOData[] mo;mo=new MOData[1];mo[0]=new MOData();mo[0].identity=idn;mo[0].attributes=new ...
I would like to if there are any API's for resolving IPAddress to Country?Thanks.
What I am trying to do is load a class using Class.forNameClass<?> clazz=Class.forName(......);and pass that loaded class to a methodaddTestSuite having the following signatureaddTestSuite(Class<? extends junit.framework.TestCase>?Now Class.forName(.....) returns Class<?> ...
Hi,I have three methods for manipulating data: addData, delData, modData.All the changes in the data are done through handles which are stored in a map.In each method I want to:1. lock the map2. get the data handle3. lock the data handle4. unlock the map5. manipulate data6. unlock the data ...