java

Cheap/free query tool for multi-database Java/hibernate developer

I'm very interesting in inexpensive (better free) SQL query tool for working with multiple databases. Generally speaking it should works with all databases which Hibernate supports, but it must work with Microsoft SQL Server (2000/2005/2008), Oracle (9i/10g/11g), Postgres 8.x, Sybase, Firebird, MySQL and HSQLDB. Must have features: ...

How do I copy local Google App Engine Python datastore to local Google App Engine Java datastore?

I have around 4000 entities that I need to insert into a Java App Engine datastore. As I understand it, only the Python version of App Engine currently has tools to upload data from a CSV file to a datastore. So, what I have done thus far is follow the instructions at http://code.google.com/appengine/docs/python/tools/uploadingdata.htm...

netbeans 6.5.1 reverse engine Oracle entity

i reverse engined entity class but the primary key is not anottaed with GeneratedValue . my table is created on oracle. do i need to add contraint on the table primary key for auto increment? rightn ow i manually edit the entity and add generatedValue . looking for better solution . i think when reverse engine, it suppose to generate...

JasperReports html and pdf output

I'd like to create a dynamic reporting webpage using JSP. Basically it should contain the following parts: Filter: The user can specify the filter conditions and press a filter button. HTML-output: The result of the filter can be seen here. It's one large html page (or several if one page would be too large). It may contain links to ot...

only mouse clicked event of jlabel update jlabel text property properly

i am using a java thread to update jlabel text value in my application but after it updated text on jlabel jlabel showing all past updated values and new value periodically in order via refreshing itself but when i use same update function within the mouseclick event of jlabel it is updating itself as i expected and showing last value o...

How fast is Python?

I'm a Java programmer and if theres one thing I dislike about it, it would be speed. Java seems really slow, but a lot of the Python scriptsprograms I have written so far seem really fast. So I was just wondering if Python is faster then Java, or C# and how that compares to C/C++ (which I figure it'll be slower than)? ...

How do I set file.encoding for a junit test in ant?

I'm not quite done with file.encoding and ant. How do I set the file.encoding for junit tests in ant? The junit ant task doesn't support the encoding attribute like the javac task does. I've tried running «ant -Dfile.encoding=UTF-8» and «ANT_OPTS="-Dfile.encoding=UTF-8" ant» without success. System.getProperty("file.encoding") wit...

convert HTML ( having Javascript ) to PDF using java / javascript

Hi, i want to convert HTML (having javascript ) to PDF.. how i can do that ?? i just want to show what is being shown in web page ... like my scenerio is . i am displaying a gantt chart that is generated by javascript library .. now i want to save that HTML web page in PDF ... how to do that ???? ...

copy a 2d array in java

Hi guys - i have a 2d array called matrix of type int that i want to copy to a local variable in a method so i can edit it whats the best way to copy the array, i am having some troubles for example int [][] myInt; for(int i = 0; i< matrix.length; i++){ for (int j = 0; j < matrix[i].length; j++){ myInt[i][...

byte array to string

Hello guys! have small problem, and would very much appreciate help :) I should convert byte array to string and get this output string: “[0, 0, 0, 0]” After that another method should take the string as input and retrieve the byte array from the first one. Im getting error that i have number.format exception, so i guess i should ma...

Client side time zone support in GWT

I'm working on a GWT app where I need to support the following scenario: The server is located in time zone A The client's browser is set to time zone B The GWT app is configured to display date/time in time zone C Since GWT does not support Calendar and the native support for time zones in javascript is non-existent I can't think of a ...

Java Web Services: sending files using DataHandler class

Hi I'm new to Java Web Services, so I might be doing things wrong. I'm trying to transfer a file using the DataHandler - this is what I've got: Web Service: import java.net.MalformedURLException; import java.net.URL; import javax.activation.DataHandler; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebServic...

Java Multiple Input Dialog

I have a Java application and I want to open a new dialog from the main interface where the user can enter his name, surname and country and then click ok. How can I open a dialog which has a number of different input fields and then save that information in a variable? ...

Quartz job tunning

hello there is something i've realized with quartz when working.Say a cron is set to wake up every 2min with the expression 0 0/2 * * * ? . When you run the project at say 13:10:30, the first action happens at 13:12:00 and the second 13:14:00 and every 2min 0 second for the rest. Obviously between the startup of the project and the firs...

Querying record by date (01 may 1916) on Oracle using Java/EJB 2.x

I have an EJB 2.1 entity bean that queries a "date of birth" column in an Oracle table. The column in the database is of type DATE. The query works without problems except for one specific date: 01 may 1916. This has something to do with daylight savings. Oracle stores the date as: 5/1/1916 1:00:00 AM, while the time of all other dates...

Operator overloading in Java

Please can you tell me if it is possible to overload operators in Java? If it is used anywhere in Java could you please tell me about it. ...

logging using Log4j

We are using Log4j in our project for logging. I want to log some statements for some of the classes without showing any extra information except from the content, e.g.: Currently it is like this, if log level is INFO: 05/11/2009 16:54:13 INFO TemplateManagerImpl - Templates in cache:1 I want only the information below, irrespe...

What are some interesting, free, open-source Dynamic Analysis tools for Java?

I am looking for some interesting dynamic analysers to use and report on for a university assignment. The tools should be: Open-source (so I can learn from them) Free (both as in speech and beer, because I want to be able to share the results, and I'm tight-fisted, respectively) Intended for Java (source or bytecode) This includes, b...

Why use stateful session beans?

I'm learning ejb3 and I'm just curious when it's convenient to use SFSB? I can't find any nice example when SFSB realy solve easily some complex problem. Actually I see that SLSB can be used as web-services and this is convinient. But I don't know when to use SFSB. I see only problems with it because we should learn something about it, ...

Java BufferedReader for zero-terminated strings

I need to read zero-terminated strings from InputStream in Java. Is there similar to BufferedReader.readLine() method for reading zero-termianted strings? ...