java

Spring 3 JSON with MVC

Is there a way to build Spring Web calls that consume and produce application/json formatted requests and responses respectively? Maybe this isn't Spring MVC, I'm not sure. I'm looking for Spring libraries that behave in a similar fashion to Jersey/JSON. The best case would be if there was an annotation that I could add to the Contro...

Calling the HealthVault GetThings method in Java

I'm trying to use the Java HealthVault API to make a call to the GetThings method in "offline" mode (meaning, the user doesn't have to login) to retrieve all "File" type items. From what I understand, all you need to make an offline request is the Persion ID and Record ID of the user's account. However, even though I'm adding these to ...

IOException - Access Denied Using FileOutputStream

I get the following IOException : java.io.IOException: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:850) at zipUnzipper.main(zipUnzipper.java:41) When trying to run the following piece of code : public class zipUnzipper { public zipUnzipper() { } ...

cannot find symbol in net beans

i am having code which is using javax.comm lib file,i am getting error saying cannot find symbol.i want to know where exactly my jar file should be?i using windows xp and net beans ide ...

Consecutive threads in Java

Greetings, I'm trying to solve the following task: Given N threads, make them run consecutively. For example each of them should output it's number in the following order: Thread 1 Thread 2 ... Thread N How do I do this, using only wait/notify and synchronized methods (without flags, etc)? P.S. Sorry for my poor english :) ...

ini4j - How to get all the key names in a setting?

I've decided to use ini file to store simple key-value pair configuration for my Java application. I googled and searched stackoverflow and found that ini4j is highly recommended for parsing and interpreting ini files in Java. I spent some time reading the tutorial on ini4j site; however, I was not sure how to get all the key values fo...

how to overcome this exception

i am using a third part SDK with my java application.The providers of sdk provided me exe file that i installed and one java project.I installed the exefile. Now when i run the code i get a dialog box showing error Excepting a absulut path for library AKSSDK.dll No AKSSDK in java.library.path could not load load library AKSSDK how do ...

Java, Spring - Logging Bean Properties

Say I have the following bean definition: <bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <property name="driverClassName" v...

Using Jython with M2Eclipse

I currntly use M2Eclipse for the majority of my Java development and Pydev for Python/Jython development within Eclipse. I would like to use Jython to prototype and test classes within my Java projects. The M2Eclipse plugin manages all the dependencies defined in the Maven pom.xml file automatically. Is there anyway for Pydev to utilis...

Can inetAddress be used with inet6/IPv6?

Can inetAddress be used with inet6/IPv6? ...

Single click in a drag and drop JTable

Hi Everyone, Sorry if this was asked before, I googled everywhere with no luck. Here's my problem: I'd like to drag and drop rows within a JTable. I cannot get it to work without first selecting the row, which is annoying, I'd like to get a similar behavior the Windows explorer has : if I single click on an item and start moving the mou...

How to configure Eclipse to autocomplete using java.util.List and not java.awt.List?

It's a minor thing, but it drives me nuts that when I type List in Eclipse, it always asks me if I mean java.util.List or java.awt.List when I never ever use java.awt.List. There are other similar cases with name collisions in my own project and more esoteric standard libraries. Is there a way to configure Eclipse to assume that I mean j...

Data conversion java

char c='c'; int i=10; double d =50; long l=30; String s="Goodbye"; Are these statement valid? s+=i; i+=s; c+=s; c=c+i; Can someone explain the logic of converting data types ...

spring: set property of one bean by reading the property of another bean?

Is it possible to set the property of one bean by reading the property of another bean? For instance, suppose I had: class A { void setList(List list); } class B { List getList(); } I would like Spring to instantiate both classes, and call A's setList method, passing in the result of calling B's getList method. The Spring confi...

what is java.net.IDN class in 1.6

what is java.net.IDN class in 1.6 ...

What are the functional differences between AspectJ and PostSharp?

Does anyone know what AOP features are different between AspectJ and PostSharp (yes I know they are for different languages and platforms)? I'm trying to understand what kind of things AspectJ would allow that PostSharp would not, and vice versa. ...

BlazeDS support on Z-Linux

I am working on a proposal where we intent to use Flash remoting in Flex and conntext it Java Web application using AMF. We are looking at using BlazeDS or LCDS. The final applicaiton is to be deployed on Z-Linux Server. I came across a thread on Adobe Forums that says this will not work. Link to the Adobe Forum: http://forums.adobe.com...

java: is there a framework that allows dynamically loading and unloading of jars (but not osgi)?

I want a mechanism that will allow to dynamically load and unload jars as well as calling an activator class in the jar. I don't want to use OSGi because of the cumbersome import/export mechanism. ...

Is there an equivalent of super for redirecting method calls to inner fields in wrapper classes

Let us say that I want to create a class MyString which is a wrapper for java.lang.String. I have added a new method called reverse. public class MyString { private String text=null; public MyString(String foo){ text=foo; } public String reverse(){ // implementation omitted return reversedString; } } Now Str...

Jboss Auto start

Hello Everyone, I have Jboss 5 installed/configured. I would like the ability to have Jboss auto start when my VM boots up. I see in my Jboss bin directory I have a startup script jboss_init_redhat.sh I am assuming I have to get that script into my /etc/rc.d/init.d/jboss file Then I am stuck, what is my next step? Thank you for ...