java

What versions/flavors of WinZip can be opened by the gnu.java.util.zip.dll v.6.0.140.8?

Evaluating a third party data processing tool, I have bumped into a case where some WinZip files cause an exception: Caused by: gnu.java.util.zip.ZipException: Unknown compression method 98 at gnu.java.util.zip.ZipFile.getInputStream(ZipFile.java:470) I have seen this with files created with WinZip 11.2 and newer. What's the lat...

How to integrate a website with a Java back end?

Is JSF the only option? The HTML front end uses JQuery as a front-end scripting framework. ...

Help with sort method. Java Homework

I stayed up till 3 last night reading till my eyes bled. This is homework, but I need a "nudge". I can't find how to sort by name. My Questions: (Please keep answers beginner friendly) Does what have look right so far? How to sort? Does anyone have recommendations for optimizing/cleaning this? Here is the assignment: The Inve...

Weird String.getByte(Encoding) problem

Hello, I am trying this: byte[] b = String.getByte("ASCII") and get an UnsupportedEncodingException Exception String fName = new String(b,"ASCII"); - got the same when used byte[] b = String.getByte("ISO8859_1"); String fName = new String(b,"ISO8859_1"); Appreciate any help. ...

Which way to go Web Side ,Mobile Development, Stand alone applications ?

I am currently intern at telecominication company which is major one and also undergraduate student.I have lots of options sitting front.By know i know c,c++,c#,java languages on stand alone application side,on mobile side i trying to get into android world and also know php,mysql,asp.net and also java ee,spring on web side.But i really ...

Java: Problem With Greek File Names (non-latin file names)

Hello, Using Java: I am reading a directory containing files with Greek Names. But when i output a String containing a file name i get this '???????.something'. Is it because i am running the java app. through the console? Is there a way to get non-latin file names read correctly? Thanks, ...

Audio analyzer for finding songs pitch

Hi, Is there anyway to analyze the audio pitches programmatically. For example, i know most of the players show a graph or bar & if the songs pitch is high @ time t, the bar goes up at time t .. something like this. Is there any utility/tool/API to determine songs pitch so that we interpolate that to a bar which goes up & down. Thanks...

Which pattern does Hibernate follow?

In his book "Patterns of Enterprise Application Architecture", Martin Fowler talks about persistence patterns which are commonly found in software development and particularly in relation to ORMs. Is there a pattern that Hibernate adheres to most closely? ...

String split question using "*"

Let's say have a string... String myString = "my*big*string*needs*parsing"; All I want is to get an split the string into "my" , "big" , "string", etc. So I try myString.split("*"); returns java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 * is a special character in regex so I try escaping.... my...

How to fetch Android Market data when there is no API ?

As far as I can tell, there is no API (official or unofficial) to access information about Apps on the Android Market (info such as Title, Icon, Description, Downloads, Comments, etc..) However, there are a few websites that have managed to compile this information anyway. My question is: How is this being done? A couple of guesses. ...

Are there any Ajax windowing frameworks out there?

I have a project with a lot of pop-up layering going on and while i will have one layer open, that layer will effectively serve as another window. I'm currently managing this with _json specific return pages that just return json objects and the layer acts on that. Each call from the layer is from a jquery .ajax call which processes ...

Can I modify a Java Swing JTextArea so that it looks like a JPasswordField?

Can I modify a Java Swing JTextArea so that is doesn't display charaters typed? Can I make it display only '*' chars in the same way that a JPasswordField class does? ...

Running a JavaSE number cruncher in a cloud

I've spent a long time building stochastic simulations in Java. They work great, but the company hardware is unreliable, getting old and unlikely to be replaced soon. The simulations and number crunching are entirely written in J2SE. Some of them need a little GUI interaction, or to display a window in order to render images which are ...

Use a Criteria on top of another Criteria

I have a question on criteria: How can i use a Criteria (or similar) that filters and/or do whatever with another criteria? Something like: select clients.* from (select * from clients) as clients The real problem is something else, but achieving this behaviour would be terrific... (btw, both java and .net are welcome to help) ...

How do I get a list of packages and/or classes on the classpath?

In Java, I can use a ClassLoader to get a list of classes that are already loaded, and the packages of those classes. But how do I get a list of classes that could be loaded, i.e. are on the classpath? Same with packages. This is for a compiler; when parsing foo.bar.Baz, I want to know whether foo is a package to distinguish it from a...

In Restlet, how can I get the Router instance from a ServerResource?

How can I get access to the Application's Router instance from my ServerResource class? Is it even possible? Thanks in advance. ...

JAXB Jersey annotated classes in a separate jar file on the classpath

I have domain model classes with jaxb annotations in a core jar package. Then I have another service web project that has a dependency on the other core jar, and uses jersey. When I move the domain model classes directly in the services project jaxb correctly finds the annotated classes. When I move them back in the jar, its unable t...

Java Compile error: Parameter x is exceeding the limit of 255 words...

I have a constructor (for an auto generated class) that has 265 paremeters. Using ant on linux with javac 1.6.0_02. The class compiles fine and everything is good. However when I try to compile the same class from within eclipse on windows xp with jdk 1.6, I get the following error Too many parameters, parameter BLAH is exceeding the l...

What's a good heuristic to see if a set of bytes are encoded as UTF-8 in Java?

I have a byte stream that may be UTF-8 data or it may be a binary image. I should be able to make an educated guess about which one it is by inspecting the first 100 bytes or so. However, I haven't figured out exactly how to do this in Java. I've tried doing things like the following: new String( bytes, "UTF-8").substring(0,100).matc...

Automatic 'loading' indicator when calling an async function

Hello there, I am looking for a way to automate showing and hiding a 'loading' message when calling an async service, so instead of doing this: showLoadingWidget(); service.getShapes(dbName, new AsyncCallback() { public void onSuccess(Shape[] result) { hideLoadingWidget(); // more here... } public void onFailure(Throwab...