java

Java library for converting Word documents to PDFs or images

Hey there What I need to do is convert Microsoft Word .doc files to PDFs or images. This has to occur in Java. I have done a fair bit of investigation already. I've tried Davisor Publishor but it doesn't give me the accuracy that I need - for instance text overlapping in the output document. Adobe has something called LiveCycle. Anyon...

android internals and memory/processor constraints?

I'm considering creating a screen reader for Android. My questions are as follows. One how much of the internals of Android are exposed through the Java API? I'm looking for things such as system wide notification when text is displayed, notification of a new application being launched, etc. I'd rather not have to modify the kernel sourc...

Java synchronized methods: lock on object or class

The Java Tutorials say: "it is not possible for two invocations of synchronized methods on the same object to interleave." What does this mean for a static method? Since a static method has no associated object, will the synchronized keyword lock on the class, instead of the object? ...

Are selectOne and selectMany choices bounded by SelectItems?

Do the JSF selectOne and selectMany controls only allow submission of values defined in the given selectItems? I'm concerned about parameter spoofing, and if this was built-in, I wouldn't require a validator to ensure the selected value was one of the valid choices. ...

How do I stop stacktraces truncating in logs

Lots of times in Java logs I'll get something like: Caused by: java.sql.BatchUpdateException: failed batch at org.hsqldb.jdbc.jdbcStatement.executeBatch(jdbcStatement.java:1102) at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(jdbcPreparedStatement.java:514) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingB...

Can you require multiple types at once?

Basically I want to do this: public interface A { void a(); } public interface B { void b(); } public class SomeClass { public SomeClass(<A&B> e) { // Note the type here e.a(); e.b(); } } What I did on the commented line is obviously illegal. I know I can just require the passed object to implement inte...

Multiprocessor Programming Course Feedback

I am planning to attend a one week course on this subject. I am primarily involved in Java projects and have decent knowledge of C and C++ too. And, I am interested in learning more on concurrent programming and would like to get feedback on this course. Has someone read the book or found these concepts relevant in contemporary programmi...

Response Writer in jsf

ResponseWriter writer=context.getResponseWriter(); I want to know about startElement, endElement, and writeAttribute methods on ResponseWriter. ...

Rails testing with out-of-process database access?

I'm building a Rails application that requires some models to interact with some necessary Java libraries. To do this, I want to use Rails on on MRI - not JRuby or RBJ. The Java code only needs read access to the database tables managed by the Rails app. One way to do this is to set up a Servlet that reads the Rails app's database table...

Hibernate question hbm2ddl.auto possible values and what they do

I really want to know more about the update, export and the values that could be given to hbm2ddl.auto. I need to know when to use the update and when not? And what is the alternative? These are changes that could happen over DB: New tables new columns in old tables columns deleted data type of a column changed a type of a column chan...

How are sockets implemented in JVM?

Hi folks! I want to know, how sockets are implemented in the Java Virtual Machine. Is there a native library included? And if, is it a C library? Where can I find information about this topic? The offical Java tutorial on networking does not help me there. Some interesting links would help. Update: Are there any official informati...

how to force Java print graphics in 300dpi

as I googled for problem, somehow java printing API is crippled with limitation that all pictures sent to printer must be printed in 72dpi resolution. We are using jasper report to print documents and no matter how big barcode we draw, barcode reader won't scan it.. any similar experiences? How to solve this issue? ...

Swing On-Screen Keyboard

Hi, I am working on a KIOSK System in Java on Windows XP. And need to do a on screen key board. I have no idea about it that how to do. So can you guys please help me out to do this. Any one have some idea about it. Thanks ...

How to schedule a Callable to run on a specific time?

I need to run a callable at a specific time of day. One way to do it is to calculate the timediff between now and the desired time , and to use the executor.scheduleAtFixedRate . Have a better idea? executor.scheduleAtFixedRate(command, TIMEDIFF(now,run_time), period, TimeUnit.SECONDS)) ...

What is the best(least impacting?) method to read a file that is being written by another process?

I'm looking for the least impacting method to read a few different log files. By "least impacting" I mean the read wont affect log rotation, wont cause undue I/O activity, etc. I'm looking to accomplish this with Java... Google afforded me the following little snippit of code: FileStream fs = new FileStream("C:\foo.txt", FileMode.Ope...

Can a Java Applet use the printer?

Can a Java Applet able to print out text/html easily to standard printer driver(s) (with all common platforms Win/Mac/Linux)? Does it need to be signed? ...

Best batch photo upload applet

Hi all. I'm looking to handle image uploads on a site I'm building. All the behind the scenes stuff is fine, but creating an intuitive front-end is causing me head pains. The problem with handling photos in a world where most people have asynchronous internet connections is the photos' size. I want each user to upload (at least) 10-20 i...

CANopen PDO

Hi, I am trying to understand the CANopen protocol. For now, I do not have any CAN hardware nor the CANopen stack to experiment with. I would like to know how to write a Java program to simply interpret CANopen messages that are received at the RS232 port. Questions Are there CAN interfaces that are installed as a serial port? Will I...

JOptionPane won't show its dialog on top of other windows

I have problem currently for my swing reminder application, which able to minimize to tray on close. My problem here is, I need JOptionPane dialog to pop up on time according to what I set, but problem here is, when I minimize it, the dialog will pop up, but not in the top of windows when other application like explorer, firefox is runni...

Changing the date format

Hi! In Calc I set a cell value to "2006/10/03 13:33:55.448" and Calc says it is Standard format. I'm doing this with Java and I want to set the format to "DD.MM.YY HH:MM:SS AM/PM": XNumberFormatTypes xFormatTypes = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats); int myDateFormat = xNumberFormat...