What does light weight process mean?
Threads are light weight processes, what does it mean? ...
Threads are light weight processes, what does it mean? ...
Hi, I want to use a Flash ActiveX object in a hidden ole container window to render graphics and send the frame data to a Java App where it is displayed. So far so good. Now I want the Flash object to react on mouse events that are happening on the Java window which is displaying the frame data. I imagined to simply forward the relati...
Hi, I have been facing this date issue since a long time. Have tried a lot of things but in vain. The problem goes like this: The date entered by the user is '2009-08-12'. It gets stored properly in the db. In the GMT+530 timezone the date gets displayed correctly as well. But when I change the timezone to GMT+1 the date gets displaye...
if i have a file contains 4000 bytes, can i have 4 threads read from the file at same time? and each thread access a different section of the file. thread 1 read 0-999, thread 2 read 1000 - 2999, etc. please give an example in java. ...
Hi, I have developed a application which involves billing users. To do this i have incorporated a GSM modem (gateway) that the SMS messages are sent through. This SMS message is sent to the user when he is billed with the bill details. The GSM modem is connected to a single computer but the billing can happen in other systems. How do I s...
I need to create an interval Timer that is set to run once a week automatically. I don't want it to start based on user input, but I want it to be created when the application is deployed to the server. Every example that I have seen has another class starting the timer. I don't want to use a message driven bean to create the timer becau...
Currently i have placed the Displaytag.properties in 'src' directory, and it is working fine. Is it posssible to have this file on some different location like src/comp/bre/sub/config ? ...
right now, i need to load huge data from database into a vector, but when i loaded 38000 rows of data, the program throw out OutOfMemoryError exception. What can i do to handle this ? I think there may be some memory leak in my program, good methods to detect it ?thanks ...
I have an app that needs to do one thing, and one thing only, on a schedule and it will be able to calculate easily the time it next needs to run. It may not need to run this task for days or months from now, but will probably be active in every other respect every few milliseconds. I'm looking for a simple lightweight approach to sched...
I already put the log4jConfigLocation in web.xml, but still, i get warning log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. what did i missed out? <context-param> <param-name>contextConfigLocation</param-name> <par...
I have a few JAX-WS web services hosted on the same server. They use the same entity objects, but when the web services are consumed by a client, the reflected entity objects are always different between the web services. How do I force all the clients to identify the entity objects to be of the same data type across multiple web servic...
i have the follwoing code of proxy server. IS if the right approach? Will this be able to handel load/trafffic if deployed comerially?? package proxyserver; import com.sun.corba.se.spi.activation.Server; import java.net.* ; import java.io.* ; import java.lang.* ; import java.util.* ; /** * * @author user */ public class Main { ...
Hi all. I have recently been developing a sim game in java, as many of my questions show, and it's come a long way! Graphically, it is somewhat lacking, and at current I'm using shapes for items, people, rooms ect. I was looking at other similar projects, and noticed that one was using OpenGL. I have been reading CokeAndCode "space inva...
The code below generates an error using Guice 2.0. With Guice 1.0 everything is fine. The JDK is Java 6 update 15. public class App { public static void main(String[] args) { Guice.createInjector(new AbstractModule() { @Override protected void configure() { // just testing } }); } } The erro...
Hi I am inserting jpeg images into my UTF-8 encoded Postgres database into bytea column/s. I'm using a prepared sql statement to insert the images. In the statement I create a file object, within Java, of the jpeg image and then pass it as a FileInputStream into the setBinaryStream method. However every now and again my Java app will th...
How do I set up multiple entry points in an application client jar? I am using Glassfish application server. I can grab the client using asadmin get-client-stubs --appname APPLICATION_NAME . I currently can run the default mainclass that I have specified in the MANIFEST.MF. However, I want to be able to specify another mainclass a...
Every time I write to the text file I will lose the original data, how can I read the file and enter the data in the empty line or the next line which is empty? public void writeToFile() { try { output = new Formatter(myFile); } catch(SecurityException securityException) { System.err.println("E...
If I compile an application using Java 5 code into bytecode, are the resulting .class files going to be able to run under Java 1.4? If the latter can work and I'm trying to use a Java 5 framework in my Java 1.4 application, is there anything I should watch out for? ...
How can I find all substrings that match a regex in Java? (Similar to Regex.Matches in .Net) ...
First, I am throwing run time exceptions for all unrecoverable exceptions, this causes these exceptions to travel up to the conainter, where I currently use an error page (defined in web.xml). In this error page is a scriptlet that invokes the logger. The issue I am having with this is that the exception is no longer on the stack at thi...