Forum: Java Sep 23rd, 2009 |
| Replies: 2 Views: 242 Hi all,
I am trying to execute a windows command from within my java program, but I can't get it to execute the DOS command. Here's my code:
try {
Process p =... |
Forum: Java May 5th, 2009 |
| Replies: 1 Views: 164 Hi all,
I have a frame, which has several tabs. I would like to perform some actions, when user clicks on a tab. Can someone please tell me what's the event that I should look into?
Thanks in... |
Forum: Java Nov 11th, 2008 |
| Replies: 3 Views: 420 That's what I thaught. But, no matter which number I try, I get the same size. I tried with setSize(200, 300); still the same size. So, I am thinking, I may be doing something wrong.
Please... |
Forum: Java Nov 11th, 2008 |
| Replies: 3 Views: 420 Hi all,
I have a simple JFrame windows with two JLabel, two JTextField and two JButton. I use SpringLayout to display controls in on the frame. But when I run the application, the windows is... |
Forum: Java Nov 7th, 2008 |
| Replies: 3 Views: 3,194 s_damry,
The problem was that the classes on the server was different than the classes on the client side.
You need to make sure to reference the same class (from the same built) in your... |
Forum: Java Oct 31st, 2008 |
| Replies: 2 Views: 349 Hi all,
I have a threaded program, which migrates contetn from one repository to another. The program works fine, when I test for small number of documents, say arround 10 or 20. But when I... |
Forum: Java Oct 23rd, 2008 |
| Replies: 5 Views: 634 Thanks Ezzaral. I used a counter to determine whether each thread is finished. And it's working now. |
Forum: Java Oct 22nd, 2008 |
| Replies: 5 Views: 634 Thanks for the info.
So, lets consider the following code. Please correct me if I am wrong.
public class MainClass {
int final MAX = 10;
int counter = MAX;
public static void main... |
Forum: Java Oct 21st, 2008 |
| Replies: 5 Views: 634 Hi all,
I have a multi-threaded program. This program, lets say spawns 10 threads. I would like to update a variable when each thread finishes its job.
The reason why I am asking this, is... |
Forum: Java Oct 21st, 2008 |
| Replies: 15 Views: 1,503 |
Forum: Java Oct 13th, 2008 |
| Replies: 15 Views: 1,503 I agree with what you said.
Can you take a look at the following and see if its better now?
public class MigrationUtility {
private HashMap map = new HashMap ();
public static... |
Forum: Java Oct 13th, 2008 |
| Replies: 10 Views: 1,222 Here's what you can do:
HashMap map = new HashMap();
map.put(new Integer(1), new String("ONE"));
map.put(new Integer(2), new String("TWO"));
map.put(new Integer(3), new String("THREE"));
int... |
Forum: Java Oct 13th, 2008 |
| Replies: 15 Views: 1,503 Ezzaral,
The program is actually IO intensive. I am trying to write a migration program, which will read each content/metadata from a source repository and create its corresponding object... |
Forum: Java Oct 13th, 2008 |
| Replies: 15 Views: 1,503 Ezzaral,
Thanks alot for the reference. I will deffinitly go over this tutorial.
Appreciate your help. I will do some reading and will update the thread accordingly,
Thanks |
Forum: Java Oct 10th, 2008 |
| Replies: 15 Views: 1,503 Actually, no. There's no particular reason. This was my initial thaughts. To elaborate alittle more, here I give alittle more specific details.
I am operating on a very huge amount of data... |
Forum: Java Oct 10th, 2008 |
| Replies: 15 Views: 1,503 Thanks for prompt reply,
I have ran a sample test and HashMap.put(..) does what I was looking for.
Basically, this is what my senario is:
I have a threaded application which spawns multiple... |
Forum: Java Oct 10th, 2008 |
| Replies: 15 Views: 1,503 In second thaught, now I think, you are right. I would like to update the value and NOT the KEY
so the value of my HashMap would look like:
1/"Processed"
2/"Processed"
3/"Processed"
and so... |
Forum: Java Oct 10th, 2008 |
| Replies: 15 Views: 1,503 Hi all,
I have an HashMap with key/value pair. The program processes each element of the hashMap, and should mark the HashMap element as "processed". i.e. I have the follwoing key/value pair.
... |
Forum: Java Aug 1st, 2008 |
| Replies: 2 Views: 4,077 |
Forum: Java Jul 31st, 2008 |
| Replies: 2 Views: 4,077 Hi all,
I am getting the content of an object which is returned as ByteArrayInputStream, and then I am assigning to another object, which accepts input as ByteArrayOutputStream. Can someone please... |
Forum: Java Jun 27th, 2008 |
| Replies: 6 Views: 611 Thanks yilmazhuseyin,
It did the trick.
I only need to add abit to it so, if a file changes, it will update it.
boolean sameFile = trgt.equals(target);
if (!trgt.exists() || !sameFile)
... |
Forum: Java Jun 27th, 2008 |
| Replies: 6 Views: 611 i tried the following, but still same result
Src = listFile[i].getCanonicalPath() + listFile[i].getName();
Trg = target.getCanonicalPath();
These two line is supposed to assign the next... |
Forum: Java Jun 27th, 2008 |
| Replies: 6 Views: 611 Hi all,
I have to write a synchronization utility which synchronizes a target folder with a source folder:
i.e. I have the following source directory structure and would like to synchronize it.... |
Forum: Java Jun 26th, 2008 |
| Replies: 4 Views: 6,400 Thanks, that did the trick.
Appreciate your help. |
Forum: Java Jun 25th, 2008 |
| Replies: 4 Views: 6,400 I am opening the file with Windows Notepad. However, I haven't tried it with other editors.
When I use this. It works fine. It writes to to next line
PrintStream.println("First line\nThis... |
Forum: Java Jun 25th, 2008 |
| Replies: 4 Views: 6,400 Hi all,
In my program I need to create 2 log files, success and error. But I need to create either one of them, depending on the out come of the program execution. In other words, if program fails... |
Forum: Java Jun 23rd, 2008 |
| Replies: 5 Views: 2,667 I totally agree. And I will do that. You are right, something like PROCESS_FAIL definitly makes sense than 2. :-)
Thanks once again, appreciate your inputs |
Forum: Java Jun 23rd, 2008 |
| Replies: 5 Views: 2,667 Thansk for prompt reply. I agree with you totally, and that's what I am doing. the only reason, I wanted to confirm this, is that the shell script is a driver wrapper script arround a group of other... |
Forum: Java Jun 23rd, 2008 |
| Replies: 5 Views: 2,667 Hi all,
I have a program, which is invoked from a shell script. I need to return back to the shell script a status, whether the program succeeded or failed, so the shell script determines whether... |
Forum: Java Jun 23rd, 2008 |
| Replies: 0 Views: 1,108 Can someone tell me what jar file do I need inorder to use the above class? |
Forum: Java Jun 20th, 2008 |
| Replies: 12 Views: 1,046 Have you created a data source for your Database on the SQL Server? |
Forum: Java Jun 20th, 2008 |
| Replies: 5 Views: 811 Thanks, Ezzaral. You are always a big help.
It worked. :-) |
Forum: Java Jun 20th, 2008 |
| Replies: 5 Views: 811 I am not sure, if that will work. |
Forum: Java Jun 20th, 2008 |
| Replies: 5 Views: 811 Hi all,
I have an object, say its called MySuperType, which has a sub type, say it is called MySubType.
MySuperType has the following attributes:
int a;
int b;
int c; |
Forum: Java Jun 19th, 2008 |
| Replies: 6 Views: 530 Thanks, Alex. Let me give it a shot, and will update this thread accordingly, afterward. |
Forum: Java Jun 19th, 2008 |
| Replies: 6 Views: 530 Alex,
Thanks for the information:
>>My first bet would be to keep a list of references to your table (divided into different array, equal to the amount of threads you want to use) then have... |
Forum: Java Jun 19th, 2008 |
| Replies: 6 Views: 530 Here's how the skeleton of my program looks.
public class ClassThreaded extends Thread {
public static void main(String[] args) {
for(int i = 0; i < 2; i++) {
new... |
Forum: Java Jun 19th, 2008 |
| Replies: 6 Views: 530 Hi all,
I have to write a program which utilizes threads. In my program I have to connect to a Database and execute a massive number of UPDATES on a table--arround 2000 to 5000 records needs to be... |
Forum: Java May 16th, 2008 |
| Replies: 9 Views: 6,153 When I compile the program with -Xlint option, then I get the following warnings:
C:\Project>javac -Xlint custom\RemoteClient\TestClient.java
warning: [path] bad path element "C:\Program... |
Forum: Java May 16th, 2008 |
| Replies: 9 Views: 6,153 Thanks Addict,
I will try that, and will update this thread accordingly.
Thanks. |