Skip to content
Advertisement

Preferred Java way to ping an HTTP URL for availability

I need a monitor class that regularly checks whether a given HTTP URL is available. I can take care of the “regularly” part using the Spring TaskExecutor abstraction, so that’s not the topic here. The question is: What is the preferred way to ping a URL in java? Here is my current code as a starting point: Is this any

How do I get the file extension of a file in Java?

Just to be clear, I’m not looking for the MIME type. Let’s say I have the following input: /path/to/file/foo.txt I’d like a way to break this input up, specifically into .txt for the extension. Is there any built in way to do this in Java? I would like to avoid writing my own parser. Answer In this case, use FilenameUtils.getExtension

Wicket vs Vaadin

I am torn between Wicket and Vaadin. I am starting a micro-isv and need to make a choice of web framework. I have narrowed down my choices to Wicket and Vaadin. I have used both frameworks and I love them both. however I need to make a choice. If If I choose Vaadin: I wont have to worry much about

Automatically update jar files

I am currently working on desktop software based on java.It’s quite a big code base (more than 40 jar files). I wish to provide an automatic update functionality. The desktop software constantly checks one back end system to see if there are new versions of the jar files available. The problem now is: How to replace the updated jar files?

TableModelListener and multiple column validation

This is the first time for me to post here, so sorry if I made some mistake. I am working on a JTable which column data have to verify some parameters, for example: Column 3 values > 30 Column 4 values > 10 Column 5 values > 4 Also the first 2 columns are filled “automatically”, putting 0s in the

What type of data structure should I use to hold table rows?

I’m new to Java and just getting into querying databases. So far I have my results in a ResultSetMetaData. I’m think that for each row in the dataset I should add it to some form of collection? Can anyone tell me the best practice for this? Thanks, Jonesy Answer Usually we have a class with fields that correspond to a

Advertisement