Hello, I posted I am trying to test RMI for further use in another project of mine but i am having trouble with the connection and security issues.Firstly my Client-Server test worked perfectly when they shared a package. Now ,however, i have moved them both into separate "project" files in eclipse ...
<p>Hi, I get with stream a sound file and I have to play it using an external program like VLC, reading the file continuously of a buffer. How can I do it? Would I have to controll VLC commands? I have been reading about it, but I have no idea how to do it.</p><p> Thanks.</p>
<p>Hi guys</p><p>im trying to figure out a basic how to type input to the screen and it be written to a file. The only problem is that my book is overcomplicating the matter and i cannot work out just the basic method- to expand upon later</p><p>can anyone help?</p>
<p>Hi,</p><p> I have an application (Applet) running on a OC4J instance. And also I have an application (Servlet, JSP) running another OC4J instance. These applications running on different browsers. I need communicate them. </p><p>Which method may I use? may be socket or something else?</p>
Ok i have a multicasting client that sends a request to a multicast address 224.0.1.1. Can anyone please tell me why whenever i run this, either no connection at all happens, or the packet sent back to the client is just a copy of the request message the client sends:import ...
818 byte By
oli_004a at 2007-11-27 11:18:40
HiI'm writing a small application that scansdirectories on a ftp server.However after 25 changeWorkingDirectory(directory)or listFiles(directory) the scanning thread just freezes.If I do aconnecting -> login -> changeDirectory -> listFiles() ->disconnectreconnecting -> login -> changeDirectory -> ...
Hi,After spending the last 8 hours trying to implement the "remove" method for Ternary Search Tree, I came to the sad realization that the algorithm is just way too complicated to implement (not the insertion or search methods though) -- there are just way too many scenarios to consider. Before I ...
Hi,I'd like to temporarily redirect IO fron within java code. The redirecting part is easy enough using System.setOut(printStream) but the lack of a corresponding System.getOut( ) is keeping me from restoring the old value. In other words, I want to do this:PrintStream newOut = ...PrintStream ...
<p>Hi all,</p><p>I urgently need a working code sample of a <b>client</b> which sends requests to a server that redirects the request to an RMI server via RMI servlet.</p><p>Does any of you familiar of such a code sample?</p><p>Thanks</p>
Hi all,I have been looking for a solution to this problem, and possibly a little guidance forabout a week now in regards to using an applet to communicate with a server using RMI through SSL.I am down to what (touch wood) is my last error before my test program works.This error doesn't occur when ...
I am using Java 1.6.0. When running the following code:import java.lang.reflect.Method;import java.nio.ByteBuffer;public class test{public static void main (String[] args){for (Method method : ByteBuffer.class.getMethods()) {System.out.println(method);}}}I get, amongst the output, two "array" ...
import java.util.EventObject;public class DataEvent extends EventObject {public DataEvent(){}}when i compile, it gives error like the following:Eventobject(java.lang.object) in java.util.Eventobject can not be applied to ()could anybody help me ...
3733 byte By
JTTa at 2007-11-27 11:23:29
I use OSGi and I create bundle called Server, which contains three classes and one of them is the bundle activator. I will publich the code of the three classes and then will write my problem. So the first class is calles "ServerThread" :public class ServerThread extends Thread implements Constants ...
898 byte By
Flossya at 2007-11-27 11:24:24
Hello, I am trying to parse a XML file and want to store the byte positions of start and closing tags so I can later use RandomAccessFile to get a particular xml element. But I am having some trouble with it...I haven't found any Xml parser api that would allow me to do this, so I tried to parse ...
<p>Hi</p><p>I want to create instant messanger using JAbber.But i want protocals and sourec code for JAbber.I search in JAbber site. But they give only applications source code.So where i get the source code for JABBER ? Pls Help ME</p><p>Thanks To All</p>
182 byte By
sachin@a at 2007-11-27 11:24:38
<p>how to deploy mbean in weblogic ?</p><p>what are the changes need to make in config.xml . </p><p>How to access mbean from client side.</p><p>thanks in advance.</p><p>Sachin >></p>
How to iterate over a collection of a MapI get a ClassCastException when doing the following pls help:ollection all=CDA.getC(VO);//some method returnign a collection for (Iterator it=all.iterator(); it.hasNext(); ) {HashMap element =(HashMap) it.next(); for(Iterator j=element.entrySet().iterator(); ...
I have a query which returns a collection through ORM.Now I parse that collection and do so processign based upon a particular value of key null and not nulland I have to create two separate collections out of this main collection.How do I do that?Collection will contain Maps.Collection c1=new ...
I was previously using Jdeveloper, and decided to migrate some code to Eclipse. The code below worked fine in my Jdeveloper(1.5.0_05) project, but upon migrating is an error that states. Cannot create a generic array of LinkedList<PlayerAction>. private LinkedList<PlayerAction>[] ...
317 byte By
BB81a at 2007-11-27 11:28:43
I do not understand much how to create a simple custom class loader. I found many explaination about it. I don't really get what it means.Can anyone explain to me in simple code? My custom classloader doesn't work at all. I want to load a class in another package. How can I do ...
Hello All:When I used the following codes in Applet. String urlstr = "https://www22.abc.com/csm/cgi/getdata.cgi?username=scott&function=cnet" url = new URL(urlstr); URLConnection con = url.openConnection(); con.setUseCaches(false); return con.getInputStream();// Line 257 I got this exception ...
1394 byte By
mjkhan21a at 2007-11-27 11:29:40
Hello.I'm trying to write a generic class that looks like the following pseudo-code.public interface Interface {public Interface getSibling(...);}public class Klass {...}public class MyKlass<T extends Klass, T2 extends Interface>extends T implements T2 {public T2 getSibling(...) {return ...
<p>Can anybody please clarify what does it exactly mean by fail-fast iterator. I had even gone through the entire API which says about this . but coudn't make it out</p>
614 byte By
yael800a at 2007-11-27 11:30:37
HI,I'm new in server side.I'll start a new job in these topic (I will learn @ job), but I want to start to learn myselp.Al I know is it will be with J2EE & serverside.I have programed in the client side with swing 7 months.I don't used J2EE so from wher should I need to ...
1567 byte By
T01deva at 2007-11-27 11:31:01
Hi,Ok, so multi-tjreading is the word. I implement the following:public void inits(){try {initAll(); // GUI initsdtartThreads(); // threads that need to run }}When I run this JAppjet ... nothing. Far be it from breaking down open doors (and answering my own questions) but am I right in assuming the ...
451 byte By
cheetaha at 2007-11-27 11:31:03
Hi all,I am writing an API to be thread safe. As I know if a share object is enclosed by a sychronized block, any attempt to lock the object that is already locked will be blocked. My questions are i.) is it using thread.wait() to cause those threads giving up the CPU resource? ii.) If using ...
Hi,I have a method a() in class A. I want to get the name of method and class which called method a. Is there any way of doing it ?I tried using StackIntrospector from org.apache.log.util package, and it solves my purpose. Is the same thing possible using standard java API's without using any ...
Keep getting this error when trying to execute the following,/opt/java/jdk1.5.0_08/bin>./java -Dcom.sun.management.jmxremoteError: Management agent class failed : sun/management/snmp/util/MibLoggerThis problem surface after the Unix adminstrator did an SUSE OS patch.Please advise if someone knows ...
import java.util.*;import java.util.concurrent.*;public class NavigableSetExample{public static void main(String[] args) {System.out.println("Navigable set Example!\n");NavigableSet <Integer>nSet = new ...
i am really appreciate any help from you guys..I am blind in Collections .... I would like to use collections in my project ?Initially registration form ...I get value from registration form. and form values will be stored in database ..here can i use Collections ? which one i will use ...
1117 byte By
JayRoya at 2007-11-27 11:32:56
Hi all,I am investigating a problem and have narrowed down to a section of code where the Vector.get() method returns an empty string instead of null when the key queried doesnt exist. I know I can alter the code to check for null or empty string but I wanted to find out why?I am not sure if ...
Hi, We have a design where in a module can be executed remotely as well as locally. The remote implementation of the module uses RMI.The Issue that we are facing is as follows. We want the client code to remain unchanged even if the implementation is switched. Hence, the base interface which ...
hi iam trying to do read textfile information sending by client and reading from server.in the server side after completeing eof it wont terminate.before sending file client copy the text file data and overidethe text file with same data and then send.i need solution for this one any one help ...
2906 byte By
gconfa at 2007-11-27 11:35:43
I am using a ScheduledExecutorService to run a handful of scheduled tasks in a j2ee app and so far the experience hasn't been pleasant. One of the problems I am currently seeing is that the scheduler seems to randomly time drift for no expected reason and start running my tasks at a different ...
I have a class which extends java.util.Hashtable. The Key is String and value is a HttpClient object, but in future I can have Values as objects other than HttpClient. I was thinking to use a wildcard for storing the value, but the syntax isn't right. What is the right way to do it? Thanks.public ...
<p>I use a boolean flag that say modify allowed or not for a particular variable. I have a feeling that there is a more efficiant way to do it. My goal is that in-between submit->confirm->submit, no one would modify this variable</p>
Hi there,I am new to these forums and I am having an error with compiling my code.This is the code:Map words = new HashMap();String word;words.put(word, new Count(word, 1)); // this is the line that is not compilingIf anyone can offer me any help, that would be ...
Hi all, I need a help. I am using URL class to connect Google try{ URL url = new URL(" http://www.google.com"); URLConnection myConn = (HttpURLConnection)url.openConnection(); myConn.setRequestProperty("User-agent",""); buffer = new BufferedReader(new InputStreamReader(myConn.getInputStream())); ...
Hi,This is not what you may think -- it is not about getter and setters, allow me to elaborate. I have a data structure that requires a few modifications to the underlying data and many accesses (M threads add/remove, N threads access).To achieve concurrency, I am adding two minimalistic locks to ...
Hello all,Im making a simple app that will fill out a login form to login to Yahoo! on their https://login.yahoo.com server. Then, I am trying to get it to redirect me to one of their game room servers. However, I keep getting a page that says, "your browser doesnt support redirects..." something ...
Hi,I am new to RMI and I have a problem with my first program. I use Eclipse 3.3, Java 6, EMF and Cajo. This is my server:package server;import gnu.cajo.invoke.Remote;import gnu.cajo.utils.ItemServer;import java.io.File;import org.eclipse.emf.common.util.URI;import ...
hi ,i am trying to read a byte packet sent as a response by some web server , the problem i am facing is that i am not able to figure out how to end the loop reading bytes as received from server , i m putting the code below please reply sooni know there is something wrong with the approach but i ...
client modifying the "text file" and send to server.In the server side i try to read.i read all data but cant get end of File......so that it execute infinite.i tried to used all I/O.So that i created text file manually.Server read that file and terminate.brief summary:--client::--1.The given file ...
client modifying the "text file" and send to server.In the server side i try to read.i read all data but cant get end of File......so that it execute infinite.i tried to used all I/O.So that i created text file manually.Server read that file and terminate.brief summary:--client::--1.The given file ...
978 byte By
Tiblea at 2007-11-27 11:40:46
HII have an application which runs a simulation model (of some scientific parameters over a period of time) and produces some nice output graphs (from an array of processed output data) However if the model was to be run again, the same (but new Objects) are created and thus each simulation adds ...
can u please see the question sir.that is the problem.CLient:in the client side am processing Index.txt file. i.e: copy the content from index.txt and then do some process such as removing some line and then update remaining datails in the index.txt.afterwards i send to server.Server:in the server ...
Suppose you have a link:String location =" http://www.website.com/my spaced dir/ccnt.html";According to the URL specification some of these characters need encoding.Does that mean the URL should be created like so:URI uri = new URI(location);String str = uri.toASCIIString();URL url = new URL(str);Is ...
I have a Client/Server connection over sockets.The server returns different types of Objects. I run the readObject method then, how can I instantiate the received class object ?Seems to work fine when the Object is a String class but I receive the following error for java.io.file ...
518 byte By
N00dlesa at 2007-11-27 11:42:07
In my application I have a piece of code that creates directories with mkdirs(). So far, so good. But after that, I want to copy a file to one of the (sub)directories. However, the directories are all read-only, so I get a runtime error:java.io.FileNotFoundException: (Permission denied)Because the ...
Hi Experts,I am have one HasMap, which contain ID as key and name as value.In that Map i need to find out name which starts with 's' character.Example: 00001, Satya Sunil00002, Munna Prasad. This is input in HashMap. Just i gave 2 rows for example. If i need to search starts with 's' in Map, ...