I had a doubt ..
Why do we need interface in Java ?
Instead of interface can't we write the methods in the class itself ?
Why do we need seperate interface?
I had problem with my client program when I run my client in eclipse or netbeans, I get a runtime error java.lang.RuntimeException: Spurious serialisation error. But when i use command prompt I have no errors.
Here is my client code
http://pastebin.com/jUkw7F7k
How can I parse a pubDate from a RSS feed to a Date object in java.
The format in the RSS feed:
Sat, 24 Apr 2010 14:01:00 GMT
What I have at the moment:
DateFormat dateFormat = DateFormat.getInstance();
Date pubDate = dateFormat.parse(item.getPubDate().getText());
But this code throws an ParseException with the message Unparseable date
Hi All,
Is there any tool to know how many native memory has been used from my java application ?
I've experienced outofmemory from my application :
Current setting is :
-Xmx900m
Computer, Windows 2003 Server 32bit, RAM 4GB.
Also is changing boot.ini to /3GB on windows, will make any difference?
If is set Xmx900m, how much max native memory can be allocated for this process ? is it 1100m ?
Hi, I'm aware of the function BigInteger.probablePrime(int bitLength, Random rnd) that outputs probably prime number of any bit length. I want a REAL prime number in Java. Is there any FOSS library to do so with acceptable performance? Thanks in advance!
Can you try/catch a stack overflow exception in java? It seems to be throwing itself either way. When my procedures overflows, I'd like to "penalize" that value.
I plan to create 3 editions of a piece of software in java from existing code base. what's the best practice? should I create 3 different projects one for each edition? Also any tools for managing editions?
In C++, I can use find_if with a predicate to find an element in a container. Is there something like that in Java? The contains method on collections uses equals and can not be parameterized.
I i have developed a java web application using spring mvc and used jetty server,
its a intranet application where i want to distribute it to the end user in a form of binary format where user can install the application using installers(please suggest the which one will be suitable ) for windows platform,
my other requirement is i dont want the end user to see the jsp code.
Somewhat related to this question, but in the absence of any answer about QuickBooks specifically, does anyone knows of an address parser for Java. Something that can take unstructured address information and parse out the address line 1, 2 and city state postal code and country?
Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me. Is there a way to do this?
Hi everyone,
Is it possible to write a GUI in Java that would display Japanese fonts correctly regardless of the language settings of the OS it's being run on?
I'd like to write a program which is able to do this but I'm not sure how to start going about this. Any advice would be a huge help!
I'm developing a frameword for handle Actions from Java Swing components;
I would like to know if there is a way of checking if a given method name (that will be accessed by reflections) exists in compile time, and show a compiler error if not?
In Java how to test if a Collection of objects contains an object depending on one of its properties.
For example I would like to test if Collection<myObjects> contains an instance of myObjects which has myObjects.name = "myName".
I'm working on an open-source Java Web Start application, and I'd like to give it a consistent theme across platforms. Metal is totally ugly, and I'm not particularly happy with Substance (esp. performance). What are the best Swing Look&Feel options out there today?
Hello,
Currently, I am running Mint Linux (Release 9). I need to downgrade Java from version 1.6 to 1.5, and have been trying to figure out how to go about this. So far, I've had no luck. The package manager doesn't seem to have it.
Does anyone have any suggestions?
Thanks,
- Chris
hi,
I'm learning the IEEE paper "Monitoring the Application Layer for DDoS Attacks " .
I need to implement HSMM(Hidden Semi Markov Model) Algorithm in Java.
Please help me to do this
Say I have a MyClass class in Java, is there a way to check in JNI that a jobject is a MyClass[][]?
My initial idea was to use env->IsInstanceOf(myobj, myArrayClass), but calling env->FindClass("[MyClass") throws a NoClassDefFoundError.
I have a Ubuntu Server.
From the terminal, how should I install JDK?
In this guide it says to use this command:
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
But on Suns website, it says JDK includes the JRE, so why the JRE in the line above?
Anybody know how to actually install Java?
Every guide and every forum shows different ways of doing it.
BTW: It is a VPS (virtual private server)
Thanks
I want to create my own device to be compatible with the Java ME SDK, in fact it is a CDC PBP1.0 device.
Does anyone have any experience to share on this or can point me to the correct place within Sun's jumbled website.
Is there a good lightweight framework for java that provides the publish/subscribe pattern?
Some ideal features
Support for generics
Registration of multiple subscribers to a publisher
API primarily interfaces and some useful implementations
purely in-memory, persistence and transaction guarantees not required.
I know about JMS but that is overkill for my need. The publish/subscribed data are the result of scans of a file system, with scan results being fed to another component for processing, which are then processed before being fed to another and so on.
hello every one ,
how can i make java program working with multiple languages
(frensh, english , arabic .. etc) ,
i mean i wanna make a comboBox ,when i choose one language, all the labels in the GUI interfaces change to the selected language and even the stdin also change to that language.
thanx in advance
Alaa