Hey,
I want to measure thread execution time in Java. Now I'm monitoring thread start and end times, but I think it's not so accurate because thread could be suspended during it execution.
Hi all, i am trying to call a navite method defined in c++ from java, the function which i am trying to call refers some functions defined in header files and also the other functions defined by me... is it passible to call that?.. i am getting an error "error LNK2019-unresolved external symbol"..
Is it possible to have multiple authentication methods for a java servlet? For example, have form based authentication in addition to open id based authentication so users can choose how they log in.
Hi - how do I push server alerts to tray apps in java without using xmpp or other heavy protocols?
Do you recommend a way to accomplish this?
I was planning to write an app which uses URLConnection on a server equipped with Comet but I doubt if that would work as the client requires a JS to be invoked and URLConnection is not a browser..
What is the best way to push instead of using a proprietary client-server approach?
Hi,
I found Facelift which can basically generate html headings as images (with "nice font") on the fly. Does something similar exist for Java (couldn't find one myself)?
Cheers,
stephanos
Can anyone recommend a tutorial on how to write a java servlet which connects to ms sql server and manages data?
I'm trying to write something which pulls products out of one database and inserts them into a stored procedure located on another database.
thanks in advance
Hi all,
I've been programming in Java for a few courses in the University and I have the following question:
Is it methodologically accepted that every class should implement an interface? Is it considered bad practice not to do so? Can you describe a situation where it's not a good idea to use interfaces?
Thanks.
Hi All
I want to generate image on server side. My Image is stored in server side's database in blob format and I am able to convert it into string_image;
Then How to convert that string_image into actual .jpg or .png format.
Actually I am posting attachment as image on users facebook' wall.
How to generate Image at server side in Java?
Is there any sample code to do it?
Hi,
I have to convert an incoming String field into a BigDecimal field that would represent a valid amount of money, for example:
String amount = "1000";
BigDecimal valid_amount = convert(amount);
print(valid_amount.toString())//1000.00
What is the right API to use convert a String into a valid amount of money in Java (eg: apache commons library)?
Thanks in advance,
Usually when I'm typing a Java import statement in Eclipse or otherwise referencing a class via the packages that it is in, Eclipse shows a context menu with a list of all classes within that package. There have been several times, however, that it would only shows subpackages within a package and would not show classes within that package.
Does anyone know why this is? It sounds like a setting/preference was changed, but I never knowingly changed anything related to this.
How can I check for a boolean to change state over a given period of time, and if a change is made over that time period perform a method?
Can any help please be given in Java.
Thanks.
Hi,
I want to maintain order of the elements being added in a list. So, I used a linkedlist in Java. Now I want to be able to swap two elements in the linked list. First of all, I cannot find an elementAt method for linked list. Also, there is no way to add element at a specified position.
Thank you.
Hi,
i've a Java project managed by Maven2. The scenario i'm trying to solve is the following:
in development mode i need to use some configuration files (for example, a hibernate.cfg.xml configured for the dev environment), while in production i need to exclude all the development specific files and configurations, and get instead some other ones for my production environment. How can i handle this situation?
Thanks
I need to create simple pagination of objects, but when I read manual I found out that query.setRange(5, 10); will fetch 10 objects, even when only 5 objects are needed.
Is there anyway to fetch just needed objects?
EDIT: I started bounty, so fi you can show me simple example code in Java that works, then I will accept you answer.
I am a beginner Java programmer. I am attempting to make a simple text editor. I have got the text from the text field into a variable that's a String, called "text".
My question is, how can I save the contents of the "text" variable to a text file?
Thank you!
hi,
i'm trying to put an image as a background of my interface in java , i tried to write a class that does that and using it , but is there a simpler way to do that .
thanks
What I mean is like have to user input a string with multiple variables and get the value of those variable. Like a simple quadratic formula: x^2 + 5x + 10. Or in java: (Math.pow(x,2)) + (x * 5) + 10The user would then enter that and then the program would solve for x. I will be using the BeanShell Interpreter class to interpret the string as an equation. But how would I solve for x?
I am making an installer in java swing it almost completed only one thing is left to do
that is to create desktop shortcut of our software.I do not want to copy software on desktop but I want to create instance of that software like other MS software. How it can be done
please help me.
I am already copied my software in c:/Program files by using copy directory and I want to create shortcut on desktop .
What's the fastest way to draw a Hello World on the screen as a GUI in Java,
1- by using the minimum number of classes.
2- with the least byte code executed
2- the JVM tweaks
so when I double click on the Jar file in Windows, the Hello World appears in no time (assuming the Runtime is not already loaded).