I'm working on an intranet-only web application (J2EE) that requires some basic security features. There will be relatively few authorized users for the site, but I still need to implement some sort of secure session.
The basic flow I'm looking at is visit site => log in => use site => log out when done (or automatically log out when th...
I can't perform any Subversion operations on my Eclipse project as Subclipse can't rename a file. The error is:
Caused by: org.tigris.subversion.javahl.ClientException: svn: Cannot rename file '/Users/damianharvey/Sites/Odyssey3.5/OdysseyEDIJAXB/src/com/locuslive/edi/edifact/d95b/coreor/.svn/tmp/entries' to '/Users/damianharvey/Sites/Od...
Is there a simple way to make sure that a local port is not already open. Some TCP socket servers (eg Grizzly) don't seem to do this check by default. When this check is missing, the server appears to start and respond, but the client code is just connecting to an old server that wasn't shutdown. This can be very bad!
Is there a simp...
Since GAE has severe restrictions like - "A Java application cannot use any classes used to write to the filesystem"...
Is there a good Java PDF library that can write the PDF to memory for streaming to the cloud?
...
Hi I have created a swing application using java 1.5 and i created a distributable jar of that file. I can run the jar in windows OS and linux OS but when i run in Mac it gives me error. I checked I am using java 1.5 version.
I think the program asks for java 1.6 version.
How to resolve the problem.
Thanks
Sunil Kumar sahoo
...
My problem is how to count but not count the same character twice. Like comparing 'aba' to 'are' should give 1 as result since it has only one char in common.
This is where I got so far:
public int sameChars (Vector<String> otherStrs){
int result = 0;
String original = "aba";
for (int h= 0; h< otherStrs.size(); h++) {
...
Okay, so I've been working for a while on this, and have been searching, but so far I have not found any answers that actually answer what I want to know. I'm a little bit at the end of my rope with this one, but I'm hoping I can figure this out sometime soon.
So I have Apache 2 installed and serving up standard webpages, but I also ha...
After doing logging for many years I have now reached a point where I need to be able to postprocess the log files with the long term goal of using the log files as a "transport medium" allowing me to persist objects et. al. so I can replay the backend requests. In order to do so I need to persist objects into a loggable form.
The reco...
I'd like an efficient algorithm (or library) that I can use in Java to search for substrings in a string.
What I would like to do is:
Given an input string - INSTR:
"BCDEFGH"
And a set of candidate strings - CAND:
"AB", "CDE", "FG", "H", "IJ"
Find any CAND strings that match as substrings within INSTR
In this example I wo...
I had system: ubuntu-9.04-amd64. I installed IDE NetBeans 6.5 from official default repositories. Everything worked correctly.
But now, I decided to use ubuntu-9.10-desktop-amd64.
I formated parts of my hard with: (/ and /usr). /home remains as before. I've correctly installed ubuntu-9.10, correctly (probably) installed IDE NetBeans ...
I am having a tough time getting jython to work properly when run from an Eclipse plugin. I have a simple object factory that loads a python module conforming to a Java Interface. All of this works fine in standalone mode. However, when I package this as an eclipse plugin, I get a different error based on a few variables:
Given that ...
I'm using SeekBar as a slider because I can't find anything else, but I have to do so much hacky work because it doesn't allow me to set a minimum value or go in between ints. So, any time I need a slider to start at a value other than 0 or return a floating point number, I have to set a max value that doesn't describe the true max valu...
In general I come across this a lot. Some of my co-workers prefer very simple, easy to read classes even if that means that there is some code duplication, whereas I do everything in my power to avoid code duplication, even if it means making more a complicated architecture. What is the best practice? I work exclusively in Java.
...
i need to write a program in java that will connect to a mysql database and execute some sql queries and display the result. suggest me a link with similar implementation / discussion of such concepts for guidance.
...
I haven't done much Java development in about six years or so. I may have the need soon to port a C# application to Java so as to make it run on both Windows and the company standard flavor of Linux (for reasons I can't discuss). The thing I want to know is, what is the best reading material to brush up on changes to Java since then, so ...
I have a Java webapp that's using PicoContainer for dependency injection. When I shut down the app, I sometimes get the following stack trace repeated a few times in my error log:
2009-11-18 17:32:29,352 ERROR [/] - Session event listener threw exception
java.lang.IllegalStateException: Cannot stop. Current container state was: STARTE...
I am working an application with JXL API and when i tried compiling using eclipse IDE, it's working fine and the same is not compiling when i am trying to compile in Command prompt and showing the below exception..
Extract.java:6: cannot access jxl.read.biff.BiffException bad class file: C:\Program Files\Java\jdk1.5.0_01\jre\lib\ext\jxl...
Perhaps most of you know the Send + More = Money. Well, I'm currently learning java and one of the exercises is I have to solve HES + THE = BEST.
Now, so far I can/should use if-for-while-do loops, nothing else. Although I'm sure there are different methods to solve it, that's not the point of the exercise I'm going through. I have to b...
Im sending mails from a web application running on a glassfish server, which was quite easy with the java mail API.
I'm starting now to attach files (mainly pdf and odt) to the mail, which works to, but the mime type of the attachment is not correctly set (application/octet-stream).
I tried to attach the file with:
MimeBodyPart mimeBod...
Hi
I am trying to use Criteria API in following scenario:
I have two tables, Schedule and Route (with their classes and mappings).
Route has many-to-one relationship with Schedule.
Route has an integer property sequence.
Now I need to fetch all those Schedule objects whose associated Route objects fulfill the following condition:
r...