Ja King

Greenhorn
+ Follow
since May 15, 2009
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 Ja King

Thanks for the reply.

Above link is working fine in my browser.
9 years ago
Hi,
I am using maven 3.0.4 version .Whenever i am trying to download the archetype in my PC its showing the below error.If i try it in a different pc its downloading properly.I used the same network and same maven version for downloading.
Could you please tell me whats the problem?

9 years ago
I am using decorators in my application . I am facing a problem in setting the pattern location in decorators.xml file.

I placed the index.jsp in the commons folder.(WEB-INF/commons/index.jsp) and placed the other .jsp files in the pages folder.(WEB-INF/pages).My problem is how we can set the file pattern in the decorators.xml.

Below one is working because it is common to all pages,



But this one is not working


please tell how to set the pattern for this problem.
Hi

My swing application has two panels panel1 and panel2 . If we click panel1 button(Go to panel 2) it will got to panel2 screen ,if we click the panel2 button(Go to panel1) it will go to the panel1 screen,like these if we click continuously both the buttons memory will get increasing.Is there any solution to stop that?

Please suggest any idea...this is sample application but our original application is very big and it has lot of controls so it got hang..
11 years ago
Hi,

I have to print the chart(Dynamically generated and in chart object) in the report .I don't know how to embedded the chart,i have placed the code below...

Commented code contains chart object which display the chart.Can you please help me...

Hi,

Can you please suggest some top free reporting tools that could be very easy to use.....
11 years ago
Hi,

I am using JFreeChart to develop the chart based on our requirements .Please clarify the following doubts in jfreechart,(See attachement)

1)I want to display the week in the bottom of the x -axis and corresponding month in the top .(1 to 53 weeks in the bottom and in the top jan to dec with year)

2)Left side y axis should be constant(ie from 0 to 9).how to set the constant value and right side is dynamic

I have tried that using stackedBarchartDemo4 in the JFreeChart,but i can't able to find the solution.Please give some idea about that.....
Hi,

I want to run the swing application as java service.I tried with JSW,Yet another JSW and Apache daemons, the application is running in background but the GUI is not displaying .Please tell the idea to make the swing application(to display GUI) as service.
11 years ago
Hi,

I want to create two java projects ,

Assume A & B
A has to send the messages to B &
B has to receive the message whenever A sends and it should display.

Please guide me how to use without socket programming.I don't know how to use it without client/server model.Is there any way to communicate between two java projects.

11 years ago
Ex:

import java.util.Random;


class RandomGenerator implements Runnable{

public void run(){
random();
}

public void random(){
Random random = new Random();
int randomNum = 0;
do{
randomNum = random.nextInt(100);
}while(!(randomNum == 5));
System.out.println(Thread.currentThread() + " identified the random number : " + randomNum);
}
}

public class TestThread1 {
public static void main(String args[]){
RandomGenerator rg = new RandomGenerator();
Thread th1 = new Thread(rg,"Thread1");
th1.start();
Thread th2 = new Thread(rg,"Thread2");
th2.start();
Thread th3 = new Thread(rg,"Thread3");
th3.start();
}

}


Actual output :
Thread[Thread2,5,main] identified the random number : 5
Thread[Thread1,5,main] identified the random number : 5
Thread[Thread3,5,main] identified the random number : 5

Expected output:
Thread[Thread2,5,main] identified the random number : 5
Thread1 killed
Thread2 Killed

Note: Don't use boolean variable to check continuously.
11 years ago
I am running multiple threads (Assume Thread1,Thread2,Thread3) for doing single operation.If any one of the threads done that operation(Thread2) then the remaining threads(Thread1,Thread3) will stop suddenly.

please guide me how to kill that remaining threads suddenly.I don't know how to stop it suddenly.(Marked in red color).

Ex:

import java.util.Random;


class RandomGenerator implements Runnable{

public void run(){
random();
}

public void random(){
Random random = new Random();
int randomNum = 0;
do{
randomNum = random.nextInt(100);
}while(!(randomNum == 5));
System.out.println(Thread.currentThread() + " identified the random number : " + randomNum);
}
}

public class TestThread1 {
public static void main(String args[]){
RandomGenerator rg = new RandomGenerator();
Thread th1 = new Thread(rg,"Thread1");
th1.start();
Thread th2 = new Thread(rg,"Thread2");
th2.start();
Thread th3 = new Thread(rg,"Thread3");
th3.start();
}

}


Actual output :
Thread[Thread2,5,main] identified the random number : 5
Thread[Thread1,5,main] identified the random number : 5
Thread[Thread3,5,main] identified the random number : 5

Expected output:
Thread[Thread2,5,main] identified the random number : 5
Thread1 killed
Thread2 Killed

Note: Don't use boolean variable to check continuously.
I am running multiple threads (Assume Thread1,Thread2,Thread3) for doing single operation.If any one of the threads done that operation(Thread2) then the remaining threads(Thread1,Thread3) will stop suddenly.

please guide me how to kill that remaining threads suddenly.I don't know how to stop it suddenly.(Marked in red color).

Ex:

Thread1 running....

Thread2 running....

Thread3 running....

Thread2 started to processing....

Thread1 killed.....

Thread3 Killed.....

Thread2 processing...

Thread2 processing...

Thread2 completed.
11 years ago
I want to covert a number from 100.0 to 100 .If it is 100.05 then it will display as 100.05 .please tell the solution.I used decimal format but i didn't get the solution.

1)100.0 to 100
2)100.05 to 100.05
3)100.50 to 100.5
4)100.55 to 100.55
11 years ago
Thanks...

But i need the date,month,year and hour , min ,sec in the same order.
Hi,

I am sending a command to a device to retrieve data from that device.After writing a command to the device i will wait for some time(Response time ---> Thread.sleep(100)) to get the response form the device.But some times i will get the data from the device for that particular response time , but most of the times i won't get the data.

If i set the response time Thread.sleep(1000) i will get the data , but it 's not a good programming .

I need good solution to solve the problem.Please help.
12 years ago