<p>I'm currently developing a chat client/server application in java for my computer science seminar at college. I would like to run the server part of the application on my pc at home but I'm behind a wireless router and a cable modem. I was wondering if this would be possible.</p>
Hi People, i am kind of new here and relatively new to JAVA,Im connecting to a telemetric device. To send/receive data im using a string of hex instructions (see code)Protocol:- send "startsession" code->receive serialnr + some other data- send "instruction" code- >receive general data of digital ...
1492 byte By
_thijsa at 2007-11-27 11:57:58
Hi all,I have an applet which consists of two jar files. One unsigned with the main class and one which is signed and includes some optional classes which require extra privileges out of the sandbox.When I boot the applet it loads in sandbox mode without throwing a security warning. When at runtime ...
hi ,i want to ask a question , i have a gray scale image contains a white circular spots, an i want my program to sense the location of each spot i.e. get the center of gravity of each spot?could jai make this or i have to make this manually?thanks in ...
hi, i am facing an acute problem regarding the socket stream .My program connects to a socketserver and sends request to the socketserver and based on the response string i do some database updation. this is quite simple task and previously it took about 1 second to process 10-15 records. But now ...
209 byte By
mammaa at 2007-11-27 11:56:04
<p>I want to load classes from a different project directory. Suppose I have to load the classes from "/home/bin/classes" folder along with the current classes that jvm loaded initially</p><p>Can you help?</p>
546 byte By
cluma at 2007-11-27 11:55:46
Hello,Is it possible to access the contents of zip files in a random access manner? ZipFile.getInputStream(ZipEntry) only gives a sequential stream. What can I do to access the middle of entries in a zip file? I need to access the middle of multiple entries in the zip file multiple times, so having ...
I need to perform a bind to Active Directory in order that i can get the object GUID of the current user who is logged in to Windows. I have to counter for Anonymous bind being switched off.Is there anyway that i can bind to active directory with just the username so that i can get this information ...
669 byte By
kmthiena at 2007-11-27 11:53:55
Hi guys,I have assigned a task to upload chunk of files simultaneously in different folder. So I guess java executor concurrency is the best choice. ... correct me if this is wrong. For instance, the first thread start, it scan thru the directies and get all the files info. then it start locking ...
1354 byte By
SurekhaTa at 2007-11-27 11:53:10
/* Hi there is some problem in read and write file i am not getting how to resolve it 7 errors after compilationD:\surekha\java\day3>javac ReadWrite1.javaReadWrite1.java:18: ')' expectedouts.write(ch); ^ReadWrite1.java:17: not a statement(^ReadWrite1.java:11: 'try' without 'catch' or ...
I am seeing weird behaviour:1. fin = new FileInputStream(f);if (null == (in = new InputStreamReader(fin))) {return;}if (null != in) {bData = null;sData = null;System.out.println(schname + " Currently Working on "+ f.getAbsoluteFile());if (null != in) {br = new BufferedReader(in);StringBuilder ...
192 byte By
cratnama at 2007-11-27 11:51:46
<p>Hello,</p><p>Can anyone give me a sample code for how to write data to a socket ?</p><p>What should I use a socket or a server socket ?</p><p>Please give me a sample code.</p><p>Thanks!</p>
3746 byte By
marlokea at 2007-11-27 11:51:01
I have a rather complex system that is having intermittent issues with a timer stalling. This stalling pauses at random, and seems to last for about 3-5 minutes. After several days of testing (using logs and garbage collector output) it appears to me that during these stalls a significant portion ...
231 byte By
snguyena at 2007-11-27 11:50:52
<p>I'm trying to allow a user to change his/her password using JNDI, however, I've gone through 5-6 pages of this forum and it seems that everyone is using JNDI with AD. Any help or guidance would be much appreciated. Thanks.</p>
<p>I have a amd turion dual core. I want to both handle to processors assigning to him to each one tasks you specify. There is something in java that handles that</p>
459 byte By
Emyra at 2007-11-27 11:49:32
Hi folks,I'm currently writing a system that needs to import a CSV file at start up. I've managed to load the file and parse it using the split() method in the String class, but all I'm getting is a list of memory addresses. I'm using the standard toString() to display the text.Is there a way ...
I have a simple question. When should I consider to use TreeMap basides HashMap in general?More specifically. I have a list of phone number. I have another list of phone numbers, that is taken from another source. They both are unsorted. The second list is bounded to maximum 100 000 numbers, but ...
<p>Hi guys</p><p>i have 10 files like</p><p> File f1=new File("path of file 1");</p><p> File f2=new File("path of file 2");</p><p> .</p><p> .</p><p> .</p><p> .</p><p> File f10=new File("path of file 10");</p><p> can i add all these files into an array?</p><p>thanks®ards</p><p>srihari</p>
255 byte By
elmoftya at 2007-11-27 11:46:54
<p>hi everybody</p><p>i want to define variables in specific class but in run time where its names can be changed</p><p>ex:</p><p>double <any variable> = 10;</p><p>where <any variable> can be changed like x or y and soon</p><p>thanks for ur care</p>
<p>Hi All,</p><p>i have a code which connects with a ftp location to read a file.</p><p>But recently I am recieving this error :</p><p>org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421 received. Server closed connection.</p><p>can anyone please help.</p><p>regards</p>
Hey everyone... I have a small server program that I wrote in Java. Its module based where each thread that is created runs through a list of modules and returns the output. It works just fine and I am doing a little stress test using Siege. I set it up running 50 concurrent users with no delay and ...
Hi everyone ..I'm stuck in this, and i've tried many possible solutions ..but here is my actual question :i've got a class "Model" which holds : names (String), address (String), sizes (int, int ,int) .... and has the following methods: getName(), getSizes(), getAdress()then i created a class ...
<p>I want to write a chat program that connects to the other computer using sockets. I plan to transmit strings, so how would I go about the networking?</p><p>Winner takes all.</p><p>1st to solve my dilemma gets 10 duke stars!!!</p>
403 byte By
cratnama at 2007-11-27 11:45:04
I have an input file that I need to first write to a port and read this data from the port.Briefly,I have to write one line to the port and then read it from there and process.Next read the 2nd line and read it from port and process..and so on till the end of the file.....I'm new to socket ...
277 byte By
azillya at 2007-11-27 11:43:37
<p>Hi,</p><p>is it possible to use DirObjectFactory/DirStateFactory to implement object bindings with an Active Directory Server? I havent found any code example using this approach. Or is it impossible because of Microsofts implementation of LDAP?</p><p>Thanks in advance.</p>
983 byte By
pbeshaia at 2007-11-27 11:43:07
Is it possible to have a class implementation overrun at runtime?For instance, if I have a method:public void myMethod() {Person p = new Person("foo");System.out.println(p.toString());}and the Person class at compile time's toString() method returns "I'm a person", but the one provided at runtime ...
I have the GUI and Phone class(OOP).if keyed in something will it be saved.EnterBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {Phone p=new Phone();p.setIcNum(tf1.getText()); // get textp.setBrand(tf2.getText()); ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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,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 ...
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 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 ...
<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>
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...