java

Eclipse BIRT: Problem with number of rows in a dataset

Hello!:-) My new Problem is the following: An sql-query to a database (DB2) returns 1500 rows but BIRT shows me only 500 in the dataset-editior. To count them i used a computed column (Integer) with the following logic: Total.count(row["VPK"]) I'm using the RCP-Designer (BIRT 2.1.3). How can i get the other rows as well? Patrick ...

Is There any Javax.comm third party solution for Vista and for Freebsd?

I need to access the Serial Ports with Java in Windows Vista and FreebSD is there any third party Solution to do that? I understand Sun doesn't have a solution for that ...

Do you know of a Java library to access the native windows api?

Either with COM or JNI. ...

In Java, how should message producers identify themselves?

I have a queue of uniform message objects with multiple producers and a single consumer. The consumer is publishing the information and needs to be able to grant access based on the data's origin, so I want the producer send a suitable identifier along with the message. The producers themselves can't be responsible for the far side acces...

XML Validation: Am I Doing It Right?

Hi all, I was just wondering if someone could give my XML validation code a once over to see if I'm doing it right. Here's the portion of code that is giving me the trouble... SAXParserFactory factory = SAXParserFactory.newInstance(); SchemaFactory schemaFactory = SchemaFactory .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); /...

creating instances of classes

I am currently working on some code with which I am having some trouble. I have two buttons on a GUI. If one button is pressed it assigns a value to a string a value to reflect this. The other button is the same except that a different value is assigned to the string. This String is created at the beginning before the constructor in...

Swapping in and out logic on a running system

I want to design this system which has two major components: Base/core stuff. Never changes. Stuff running on the core. Changes rather frequently. This is going to be developed in Java, but the problem applies to any classical OO language. How can I replace 2 above in a running system without recompiling 1, and without even stopping ...

Semaphore problems in Java with the Dining Philosophers

Hello, I'm trying to learn the basic jist of a Semaphore in the Dining Philosopher problem. Right now, I have an array of class Chopstick, and each Chopstick has a semaphore with 1 available permit: public class Chopstick { Thread holder = null; private Semaphore lock = new Semaphore(1); public synchronized void take() thro...

What is JAXB and why would I use it?

There is guy here swearing up and down that JAXB is the greatest thing since sliced bread. I am curious to see what stackoverflow users think the use case is for JAXB and what makes it a good or a bad solution for that case. ...

Where is user settings file in Netbeans 6.5 on Vista ?

I can't seem to find my settings file, where I can find my IDE Editir color settings file and save it ... So if I need to install NB on another machine I can just copy my settings from this machine to the new one. Or if my PC crashes and need to restore to factory setting, everything will be erased, but if I have this settings file, it w...

Java equivalent to JavaScript's encodeURIComponent that produces identical output?

I've been experimenting with various bits of Java code trying to come up with something that will encode a string containing quotes, spaces and "exotic" Unicode characters and produce output that's identical to JavaScript's encodeURIComponent function. My torture test string is: "A" B ± " If I enter the following JavaScript statement i...

Deploying java applications to Tomcat using CruiseControl.net

I have CruiseControl.net setup on a machine which is currenly being used for Microsoft Projects. I needed to add a java project to the same build server. The java war files generated need to be copied to another server under Tomcat. However, I face a lot of problems when it tries to copy to that network location, due to file access den...

How do I get the type object of a genericized Enum? eg: EnumSet.noneOf(<huh?>)

I have a generic type that is parameterized on some Enum, declared like this: public class FlagsField<T extends Enum<T>> { private EnumSet<T> _flagSet; public FlagsField() { _flagSet = EnumSet.<T>noneOf( /* what goes here? */ ); } ... } I want to initialize _flagsField in the constructor as above, but can't ...

Ant filter fileset which is referenced by refid

I have a fileset (which is returned from the maven ant task), and it contains all jars I need to repack. This fileset is referenced by a refid. I only want to include our own jars, so I would like to filter that. But ant doesn't support any further attributes or nested tags if a refid is used. Example: fileset is: org.foo.1.jar, org.f...

Problem compiling in Clojure

I've been trying to compile a very simple test.clj in Clojure without any success. I have a thread on the Clojure Google Group with several responses, but nothing has helped. To quickly summarize, here is my clojure file: (ns test.test (:gen-class)) (defn -main [gre] (println (str "Hello " gre))) Basically it's the exam...

An equivalent of javax.nio.Buffer.flip() in c#

I am porting some of the java code and need to be able to flip (javax.nio.Buffer.flip()). I am using byte[] to store data, and I want to flip these byte array, much like Buffer does it, as I believe underneath Buffer class uses byte[] as well. Thanks ...

data source or rss feed to get up to date currency conversion rates from us authority

Hi I need to develop a tool which suppose to fetch daily currency rate. I am looking for some feed or services from authorized usa government agency. Response will be appreciated. thanks Kamal ...

Do you find java.util.logging sufficient?

Per the title, do you find the default Java logging framework sufficient for your needs? Do you use alternative logging services such as log4j or others? If so, why? I'd like to hear any advice you have regarding logging requirements in different types of projects, and when integrating frameworks is actually necessary and/or useful. ...

Getting data from a subclass without instantiation

I have an abstract superclass and various subclasses. Each sublcass contains a value that I would like to use statically but it is not possible to create an abstract static method. I want to get a value from them dynamically without having to create instances. What do I do? Another question would be: How would I loop through subclasses?...

Installing Java 6 on Mac OS

Is it possible to install the latest JDK on Mac OS 10.5? What are the best options, considering that the Apple-supplied version is 1.5? Update: I am trying to install JDeveloper 11, which requires JDK 6. ...