Questions for java


2161

Resteasy client not closing connection

I have found one scenario where resteasy is not closing the connection. Is there a way around this? I have created my client as:
4576

Hash a password with SHA1 in java

I want to insert a password to my database using SHA1 hash
8845

Send values from jsp to Servlet

i have a jsp in which i have select tag and i want to get the
8918

How to create readable passing arguments? Java

I have a main class. I want run it at command prompt and use arguments to choose between the switch cases.
7396

Regular Expression to Locate String With Wildcard Characters in a Non-Delimited String

I've checked every single post that I can find on here, but can't figure this out.
5206

Css menu becomes transparent over javascript

I'm trying to implement a css menu in a website, and have run into a problem.
9682

swing - JFrame not displaying the real size

Im very new to java. I don't know what's wrong with my frame. I set the size to 300 and 200.
5355

JSF convertDateTime renders the previous day

A date (as the Date temporal type) is stored in my DB like this: 31.10.2012
7647

What components of a Java development stack should I know about?

I have a fairly limited knowledge of Java development. I came across the following, rather daunting, list of components/tools/frameworks of what was described as a "fairly typical Java stack". I wi...
9905

The Spring AOP Proxy that isn't

I have two Spring proxies set up:
5193

Different result returned by graph api

I use graph api to get the data of wall page in my app, most of the result is right, just like: http://www.facebook.com/CliniqueKorea?sk=wall
7261

Capturing and intercepting ACTION_SEND intents on Android

Currently I have a pretty standard ACTION_SEND intent to share information from inside my app. Code is similar to what is below:
1536

Alternatives for arbitrary-precision decimals in J2ME

We're making some modifications to a legacy project using J2ME.
3386

Anchor link to document attachment

How can I set a reference or an iText anchor to an attachment on my document using iText?
8920

Howto synchronize file access in a shared folder using Java (OR: ReadWriteLock on network level)

I have multiple applications running in one virtual machine. I have multiple virtual machines running on one server. And I have multiple servers. They all share a file using a shared folder on linu...
4729

Liferay: get PortletID and companyID from init()

Maybe trough PortletConfig in init(PortletConfig)
5214

Base64 encoder and decoder

Is there a base-64 decoder and encoder for a String in Android?
1018

Elastic search - integrate with java web application

I am developing a java web application (ERP system). I have completed basic flows. Now as per my client requirement, we need to implement few search options. (i.e. Employees, Users, Invoices, Inve...
2364

Reload class file in tomcat

I am creating a class file at run time.
1446

session handling in JSF 1.2

How do we handle session variables (add/fetch) in JSF 1.2?
6240

How can I make a swing JButton repeat its action when it is held down?

I am creating an touch screen application using Swing and have a request to change one of buttons so that it will behave like a keyboard when the button is held down.
8854

JPA Multiple Embedded fields

Is it possible for a JPA entity class to contain two embedded (@Embedded) fields? An example would be:
6654

How to Pass Array from One Servlet to Another Servlet?

I want to pass multiple values from one servlet to another one servlet. Please tell me how to pass that?
2995

Nutch problem: java.lang.NoClassDefFoundError

I'm trying to run Nutch on my Windows machine. I have Nutch, Java, Tomcat, and Cygwin installed. When I try to run the crawl command in Cygwin, I get the following error:
3431

Modifying an ArrayList in Java

I want to search through an ArrayLst and delete any entries that are the same.
424

Scaling an image in Java Swt & memory consumption

i have a java swt application. In the resize method of a container i'd like to resize the image, which is shown using the following code. However seems like - even i dispose everything (really?) the
7481

Java Double Array

I'm having trouble setting up and placing values into an array using a text file containing the floating point numbers 2.1 and 4.3 each number is separated by a space - below is the error I'm getti...
3643

JSF 1.2 Life Cycle understanding: Executing the ValueChangeListener #2

I am using JSF v1.2 for my application. This is a sort-of-similar question to this thread (answered by BalusC) which I marked as answered some days back.
389

Doubts regarding class and object

I know the functions are loaded only once in the memory. My doubt is... if we create an object of a class how it refer the function? What is the thing behind the object creation and function callin...
3085

startActivity and intercept intent extras

I'm considering to do the following for log in a user:
8408

Usage of generics in Morphia

Although I tagged this question as a Morphia issue, I think it's more general, but anyway, help is appreciated.
2593

Accessing Windows Mobile device Storage Card from Java?

I'd like to be able to access the contents of my Storage Card which is in my Windows Mobile device. Normally, I'd just remove the card and shove it in a card reader, but its encrypted (and thus, lo...
2459

Android integrating apk with an application

I am new to android. I am making an application for reading the pdf files. For this i want to integrate some existing open source apk with my application. Please suggest and give me example, how i ...
9428

How do I attach java sources to project?

I am developing a WebSphere portlet in IDEA 11. The portlet is using some methods defined on portal. I don't have the production environment compiled classes or jars on my PC but I have the source ...
3394

Can you use Java Annotations to evaluate something in a method?

I want to see if it is possible to use annotations to evaulate if a user is logged in or not.
996

Encrypting with DES and password

I'm using the code I've found here to encrypt using DES. I'm sending this value to 3rd party servce, but doesn't seem to work.
2936

Should I store the timezone separately from the timestamp for Postgres and JDBC?

It seems (and maybe I'm wrong) that if you want to preserve the timezone of when something happened with JDBC and Postgres you need to store the timezone separately from the timestamp.
3955

Push vs Pull Queues on Google App Engine

So far, no one (not even the GAE docs) has been able to give me a really clear description of what the difference is between a push queue and a pull queue.
3006
3066

Collator plus Comparator

I have a collection of beans OptionItemDTO (properties label and value) and I'm currently using something like this to sort by label:
5520

JOGL 2.0, render depth buffer to texture

I am trying to implement simple shadow mapping technique in JOGL 2.0 and I struggle with rendering depth values into texture. Maybe I am doing it completely wrong but it is weird that rendering sc...
5387

Can't correct my java program

I just started learning java and I'm working on a program. I'm getting an error here:
1253

Reinitialize fix delay in ScheduledExecutorService

As per my requirement, I have to execute some particular code after certain period of time. To do the same I have chose ScheduledExecutorService.scheduleWithFixedDelay(runnable, 0, 5, TimeUnit.SECO...
1487

Setting ErrorHandler on XML Validator causes incorrect validation

I've run into what seems like some very strange behavior while using Java's XML Validator (which I believe uses the Apache Xerces implementation).
5151

How can I access the exception raised from another class

My requirement is to send automatic mail whenever the exception arises
3006

How can I defeat RC4-like obfuscation?

I am trying to read data files generated by a program originally written in Visual Basic 6 (and later rewritten in Java) so I can process them using my own tools.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.