java

Java: GUI component for displaying diffs?

Hello, I'm writing a programm in which I need to generate a diff and display the result. Is there any GUI component out there, with which I can easily accomplish this task, or do I need to hack something for myself? I'd prefer using a Swing component, but any other technology will be fine, too. ...

Portlet temporaily unavailable message for Alfresco portlet in Liferay

Hello, I followed the steps on http://www.liferay.com/web/jonas.yuan/blog/-/blogs/integrating-alfresco-web-client-as-a-set-of-portlets-with-liferay to integrate alfresco as a portlet in Liferay 5.2.3. I am able to add the Alfresco portlet to my Liferay page, but it shows the message "Portlet is temporarily unavailable" Any way to fix th...

Java's equivalent to php.net?

Where can I find useful resources to Java. all Java functions and syntax explaining (like php.net) mac widgets with all functions gathered (like php function reference) Would be great if you had links to very good resources/tutorials to share. ...

How can I use user's certificate?

I can't understand general scheme using certificates. For example: I have account on the some website. I have name and password. What should I do to login to this site? - I should open _https://website:443/login and fill out fields, and if all is ok, I'll obtain admittance. Now, I would like to perform these steps programmatically usin ...

Java - Get font file as a File object or get its path

Hello , I have a Font object in Java for a font file ... I need to convert that object to a File object or get the font file path ... So i can pass it to another method. Is there a way to do this ? Thanks ... ---------------------------------------------------------- Edit: More explanation : What i'm doing here is calling a method...

Accessing external library (jmf) within jar file

We used an external library, specifically jmf.jar (Java Media Framework), for our java application which relies on images captured from the webcam. However, when we tried to package the application into a jar file, the application runs but once we try to access/open the webcam nothing happens. We are using Eclipse and we used its export...

Side effects of throwing an exception inside a synchronized clause?

Are there any unclear side effects to throwing an exception from within a synchronized clause? What happens to the lock? private void doSomething() throws Exception {...} synchronized (lock) { doSomething(); } ...

What is the difference between Wrapper and Reflection

I was very confused about the reflection and wrapper, I know that reflection can reflect the object into another object type, wrapper can convert the primitive type into object. Is this correct? ...

Eclipse: Have multiple Dynamic web projects contribute to a single war file?

I am in a situation where I basically want to be able to have a web project in Eclipse where the WebContents folder is merged from multiple projects instead of only a single dynamic web project. If I have "a.jsp" in project A, and "b.jsp" in project B, I would like to end up with a single web application in the web container where "a.js...

How to convert array of floats to array of doubles in Java?

Hi, I have an array of floats and I would like to convert it to an array of doubles in Java. I am aware of the obvious way of iterating over the array and creating a new one. I expected Java to digest a float[] smoothly where it wishes to work with double[]... but it can not work with this. What is the elegant, effective way of d...

Scalable Servlet Hosting

Possible Duplicate: What alternatives are there to Google App Engine? I would like to know if there is any alternative to Google App Engine. I have tried to use it with JPA, but it seems quite limited with the relationships and everything. Any kind of DBMS would do, as long as it's not too limited I found this post so I'm goin...

Swing: Setting a function key (F2) as an accelerator

I have a menu item, "rename", for which F2 is set as an accelerator. Indeed when the menu is displayed there a little "F2" indication next to "rename". Sadly, this does not work. This accelerator triggers no response. When I change the accelerator to CTRL+F2 - it works. It seems that I should use an InpoutMpa/ActionMap. The problem wi...

Jodatime - Custom Chronology

Hello, I would like to calculate a duration whereas 1 day will consist of 8 hours. Is creating a new Chronology is the right approach ? I did try to create a custom Chronology and override the assemble method with something like: int millisPerDay = 1000 * 60 * 60 * 8; fields.days = new PreciseDurationField(DurationFieldType.days(), m...

Problem using org.apache.commons.net.telnet.* with android

Hello all. Im having a problem using the org.apache.commons.net.telnet.* library in my android application and i was hoping someone could help me! I have implemented an app which uses telnet to communicate with a remote server and all works fine, the problem i have is when i call TelnetClient.disconnect() the method does not return. Wh...

Multiple Class in JDO Query

Hello, I'm currently developing in GAE and I have to query like this using JDO: SELECT table1.column1, table2.column2 FROM table1, table2 WHERE table1.column1 = table2.column1; I tried this one but it won't work: String query = "select from "+Assessment.class.getName()+ "a, "+ Project.class.getNa...

JSF chars get double UTF-8 encoded

Hi there, last week I asked a question but JSF and charset encoding relevant SO question Now I included this JSF in my JBoss Portal env. with the common jboss portlet bridge. When I submit my form something weird happens: The portal is UTF-8 so my form inputs are UTF-8 too but after the submit the chars are encoded as UTF-8 again whi...

python vs java on web service development?

i am currently using php as backend language in webdevelopment. but im wondering what you need to install to get running with python and java. with php i need apache and mysql. can i use those for java and python too? i cant find good guides equivalent to LAMP/MAMP/WAMP so i understand the parts when using either java or python. would...

An alternative of software like VisualVM to programmatically find running java applications' values etc. by searching heap dumps?

I'm not experienced with java applications but I found out that finding static pointers etc. to these applications' memory addresses is often (nearly) impossible, apparently because of the java engine that handles the code (correct me if this way of naming it is wrong please). Now, I've used VisualVM (https://visualvm.dev.java.net/) and...

Java about 100 parallel threads, memory management

Hey folks, I am writing an optimazation algorithm which creates about 100 threads. Currently, I start them all at one time (for-loop) and after that I tell every thread that it should join(). My problem is now that each thread uses to much memory so the heap space exception won't take long. I want some kind of scheduling but don't know...

Which web containers install themselves well as a Windows service?

We have had a web application product for several years, and used Tomcat to deploy it under Windows as it registers itself as a Windows service so it starts and stops automatically. We may now happen to need more JEE facilitites than is provided by Tomcat (we are very tempted by the JEE 6 things in the container) so the question is whic...