Mo Ibrahim

Greenhorn
+ Follow
since Jul 10, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mo Ibrahim

It is safe to call _non_existent() on the remote object before you proceed to make calls on the objRef. You can rebind to the remote object if the test fails.
22 years ago
I guess you would not have set your class path referring to vbjorb.jar, vbjtools.jar and vbjapp.jar files.
22 years ago
Ajit,
To completely understand threads, take a look at this http://www.javaranch.com/ubb/Forum27/HTML/000131.html . A good amount of information is available for you.
Add a thread with keylistener which modifies a boolean flag value to false when a key is pressed, say Q, and let your StartManager loop on this flag.
Here you go Kay

i have put the sleep in the main() just to let you see what's going on.
After the program has run, you can see the sequence of events happening, how the first two threads are waiting while the third one has completes and lets the other threads run.
design a cheap fault tolerance.
Create a self learning robot program.
Design and develop an efficient code optimizer/compiler for java.
22 years ago
You might want to take a look at Array class.
22 years ago
Is your path setting the same when you run manually and from the java program?
22 years ago
1. jar your class files.
2. create a batch file that will set the class path to this jar file and call your class that will run the application.
Your batch file might look like this:
set class=c:\myapp\jar\myapp.jar
set path=c:\myapp\jre\bin;c:\myapp\jre\lib
java -classpath %class% com.myapp.MainClass <parameters>
3. Provide your clients jar file, jre files and your batch file.
This should get them going.
22 years ago
Make your ProductID such that it can hold dynamic data. The data might come from a database that you use or from a file generated at product install time. When the ProductID class is invoked, that class will read the ID from the file or from database.
Hope this solves your problem.
22 years ago
The batch file would not have worked properly because of the reason that 'd:\'. It should be actually 'd:'. Then, the directory change will happen and rest will follow.
22 years ago
Okay, I had similar problem. I cinfigured my client machine to hardcoded ip address and other settings for default gateway, network mask and dns settings.
After I made the changes, I do not get the Network adapter error anymore.
Getting the user name is easy. You can get the logged-in user name by executing "cmd echo %username%" in a process and read the stream using an InputBufferStreamReader.
But, you will not be able to get the password from windows because of encoding. I heard someone say that you can set a registry key and get the password out. I do not know how. I am also looking for a way to figure out a solution to this problem. If you find out, please post it.
22 years ago
Tou can do it very nicely with the Observer pattern.
The Request object can be polymorphic and implement an interface that the ActionListener can call on the Request object back.
The interrupt() call is not guaranteed to work. If only t1 is on a wait() call, t2 can call interrupt() to do what you want to do.
I think there is a better alternative to achieve this. Use a common resource that both threads check. t2 can set the proper condition on which t1 can return and t2 can also check the same value and return.