java

Does Java have a limit on the class name length?

This question came up in Spring class, which has some rather long class names. Is there a limit in the language for class name lengths? ...

JSF class diagramming tools

I have been asked to formalize the architecture of our front-end JSF code and beans. My first thoughts were that this would be just like any other class architecture. Fire up visio, make my UML diagrams, and that's that. However, there is no way that I can think of to express things such as bean scope, page navigation, the way differe...

Find where Java loads files from?

Hey Folks, I was just wondering if there is a way to find out where a java program will be searching for files. I am trying to load a settings file with FileInputStream fstream = new FileInputStream("ldaplookup.ini"); but it is throwing a File not found error. The ini file is in the same folder as the class file but i am assuming it is...

Are static methods in Java always resolved at compile time?

Are static methods in Java always resolved at compile time? ...

Tips for maintaining an internal Maven Repository?

I'm interested in maintaining a Maven 2 repository for my organization. What are the some of the pointers and pitfalls that would help. What are guidelines for users to follow when setting up standards for downloading from or publishing their own artifacts to the repository when releasing their code? What kinds of governance/rules do ...

Soap under Java 1.3 with Axis

I am writing a Java web service for legacy SCO machines (which only have Java 1.3 available). I have been able to get more recently-added XML parsing functions integrated by including the Xerces jar on my classpath. However Java is screaming about not being able to find javax.xml.soap, even though I've got Axis 1.3 and explicitly added a...

What are FTL files

Hi Guys, I am new to a project and have to learn it inside out. I see allot of files with the extension .ftl in them. Not sure what they are. I know they can be modified an the user sees changes in the front end ...

AD via LDAP - How can I return all ancestor groups from a query?

I am querying Active Directory via LDAP (from Java and PHP) to build a list of all groups that a user is a member of. This list must contain all least all groups (organizational-units optional) that contain groups the user is directly a member of. For example: User1 is a member of GroupA, GroupB, and GroupC. GroupA is a member of Group...

Why is code that returns a genericized Map generating a compiler warning when assigned to a generic Map?

I have a method with this signature: protected final Map<String, Object> buildOutputMappings( AbstractDataObject ado, MDBase md) And called with this method (in a subclass): Map<String, Object> params = buildOutputMappings(ra, md); I get this compiler warning: Warning:Warning:line (136)...

Displaying entity-attribute-value data in JTable?

How can I use a JTable to display & edit attribute properties for entities retrieved from an entity,attribute,value (EAV) store (a relational DBMS)? I know this is a question with a lot of possible answers, so PLEASE look at the requirements I have below before answering. I promise to vote up answers that show you've read & understa...

Artifactory: Auto-generate archetype catalog?

Is there a way to have Artifactory automatically generate the archetype-catalog.xml file for a repository? At the moment, I maintain it by hand and publish it via HTTP PUT. While this is doable for our small internal repository, it would be nice to do this automatically, and I was rather surprised it doesn't seem to happen out of the box...

Workload Distribution / Parallel Execution in JAVA

Dear All, I have a situation here where I need to distribute work over to multiple JAVA processes running in different JVMs, probably different machines. Lets say I have a table with records 1 to 1000. I am looking for work to be collected and distributed is sets of 10. Lets say records 1-10 to workerOne. Then records 11-20 to workerT...

Whats a good API for generating reports for a java web application?

I have a J2EE application that has a lot of reports, the situation now is the following: Report filters' values are sent to the application over DWR mainly, the data are retrieved from Oracle DB throw DB procedures and returned back to the client. However, some customization is required every now and then (new data filters, columns, or...

Javac: Treat warnings as errors

I have an Ant file that compiles my program. I want the javac task to fail if any warning was reported by the compiler. Any clue on how to do that? ...

Java - Installation problem

I am having the following message while installing JDK 1.5.0_06, 1.5.0_09, etc. "Microsoft Visual C++ Runtime Library" Assertion Failed! Program: C;\Program Files\Java\jre1.5.0_06\bin\javaw.exe File:../../../src/share/native/sun/font/t2k/t2kstrm.c Line:132 Expression: pos<=t->maxPos For information on how your program can cause an as...

Need help with making a settings file.

I am trying to make an application launcher that has a settings file that will save 'names' for programs and the path to that program, and when you type the name in an input box it will run the program that name is assigned to. Also if it the name entered is not known by the application (in the settings file) it will ask the user to add...

Detect type of object in ArrayList

I'm attempting to make a class that will convert ArrayLists of objects into ArrayLists of other objects. i.e. ArrayList<Foo> convert(ArrayList<Bar> input){ //conversion logic } ArrayList<Bar> convert(ArrayList<Foo> input){ //conversion logic } Unfortunately Java doesn't want to have two functions with the same name and what...

ct-props-correct error when parsing schema

Hi, I'm using the JAXB xjc tool to generate some Java interface files from xsds. I'm running into a problem where I'm getting a tonne of errors of the form: org.xml.sax.SAXParseException: ct-props-correct.4: Error for type 'COCT_MT110200CA.PayeeRole'. Duplicate attribute uses with the same name and target namespace are specified. N...

Java GUI creation framework

Do you know any decent framework for creating Swing screens? I need to extend my application for implementors that will have to add their own screens. Possible options: Netbeans platform with Matisse editor Bean builder (very old and unsupported) Eclipse VEP (beta) Any other option? Update: I am not looking for design time tool t...

Repeat Unix Command in Java

Is there a way to periodically run a Unix command (ps in my case) in Java? The loop I wrote: while( this.check ) { try { ProcessBuilder pb = new ProcessBuilder("ps"); Process proc; System.out.println(" * * Running `ps` * * "); byte[] buffer; String input; ...