java

hibernate - session monitor tool

please tell me is there anytool to monitor hibernate sessions in case of session leakage Thank you. ...

Breaking up a String in Java

I have multiple strings that are in the following format: 12/18/2009 02:08:26 Admitted Doe, John (Card #111) at South Lobby [In] From these string I need to get out the date, time, first and last name of the person, and the card number. The word admitted can be omitted and anything following the final digit of the card number can be ign...

defining a shape xml elemnt in drawable?

I dropped the following into the drawable directory in my Android 1.5 project: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gradient"> <gradient android:startColor="#FFFF00" android:endColor="#FFFFFF" android:angle="270"/> <corners android:radius="0dp" ...

Distance formula in java printing NaN -- How do I fix this?

Okay, so I'm using the distance formula to print out the distance between two player objects from inside one of the player objects (With "other" being another Player object). How can I get it to just print the number without getting a "NaN"? System.out.println("D = " + Math.sqrt(Math.pow(x - other.x, 2) - Math.pow(-(y - other.y), 2)));...

how to search and update JsonObject in JsonArray in an efficient approach?

JsonArray-Example: [ {"name":"table","type":"table","reportId":7,"componentId":12,"width":0,"height":0,"dataType":"DEFAULT"}, {"name":"chart","type":"chart","reportId":7,"componentId":13,"width":0,"height":0,"dataType":"DEFAULT"} ] I have to search JsonObject with Key(name,type),if jsonObject exist with the key want to ...

Is learning Java and related technologies worth it today?

My career has always been C and C++ programming. I have some basic Java experience. I have a lot of personal Ruby/Rails experience and lately I've been doing some Grails stuff at work as well. I'm just curious if it's worth it to pick up Java and related technologies such as Spring, Hibernate, etc... Grails seems like it removes the n...

Need help with ap comp java question

I really need help with part a of this question on this site http://www.edupages.com/phs/APCSAB/Curriculum/Lab3%28Concentration%29/APABLab1%20-%20Concentration.htm This is what I have so far. Any help is appreciated. private void fillBoard() { int myindex = 0; int midsize = size/2; for(i = 0; i+1<size; i+...

Page Refresh problem

I have a jsp in which there are certain buttons when i am clicking on one of those, the page is refreshing but the problem is that I want to show that section of jsp where the button is on which the user has done the on click event...but the section which is coming is the top of the page but I don't want that. Please provide me with ...

JAVA_HOME points to the wrong place

I seem to have an incorrectly specified JAVA_HOME variable. I can get around it for many things but now I am seem to be stuck. I am trying to use the Google App Engine and upload an application. When I do so I get the error that the error: cannot find javac executable based on java.home, tried "C:\Program Files\Java\jre6\bin\javac.e...

what is the name of chat window in gmail?

I want to write a window like gmail's chat window which when i click on minimize, it goes to right corner of the page and by scrolling does not change the position. I'm using wicket framework in java. does anyone know what is the name of this window so that i can search in Google? and can anyone help me how can I do this? ...

abstract-class in java

Is possible to create objects of an abstract class in Java ...

how to impliment servlets in iis

how can i run or impliment servlet programs in microsoft iis server ...

java - selecting all objects in a frame

i have this: jLabel1.setBorder(null); jLabel2.setBorder(null); jLabel3.setBorder(null); jLabel4.setBorder(null); jLabel5.setBorder(null); jLabel6.setBorder(null); i want to make it simpler and less noob... any ideas? ...

Tcp connection another android device, based on phone # instead of IP?

For the current Android application I'm working on, I'm looking to create a tcp connection between the user device, and another Android device based on the phone number instead of the IP address. IE the user would open your contacts list, and be able to create a tcp connection to a contact using the same application as you. I seem to re...

Install .AIR File Using java code

Hello friends, I want to install .air file using my java code.I am currently using following code to run the air installation: Runtime rt=Runtime.getRuntime(); rt.exec("cmd /c start call secureId.air"); rt.exit(0); Is there any way to install .air as a back ground without cmd prompt? or Is there any other way to install this air appl...

problem in Spring session scope bean with AOP

Hello, I want to inject currentUser instance in HomeController class. so for every request, HomeController will have currentUser object. My configuration: <bean id="homeController" class="com.xxxxx.actions.HomeController"> <property name="serviceExecutor" ref="serviceExecutorApi"/> <property name="currentUser" ref="currentUser"...

How can I use Jacob to create a graph in a MS Word document

How can I use Jacob to create a graph in a MS Word document? ...

-Xms : Initial heap size or minimum heap size?

-Xms is to specify initial heap size or minimum heap size? I see lot of places with lot of different answers. Some like second answer here, say that it is for initial heap and some like here say that its minimum heap size. Or is it that the minimum size itself is the initial size? ...

Problem during JBoss Launch

Hi folks, I've a problem with JBoss 3.2.6. When I try to launch it, I get this error. 09:19:22,449 ERROR [StatefulSessionContainer] Starting failed jboss.j2ee:jndiName=TypicalBean,service=EJB java.rmi.ServerException: Could not bind home; nested exception is: javax.naming.CommunicationException: Network is unreachable [Root excep...

Easiest way to manage my CLASSPATH?

I'm beginning to play with Clojure a bit and my Java experience is pretty limited. I'm coming from the dynamic world of Ruby and OO, so the functional side of things is very interesting! Anyway, as I discover libraries and various tools for use (and the tutorial files for the Pragmatic Clojure Book), everything typically calls for plac...