dav mrazek

Ranch Hand
+ Follow
since Aug 11, 2007
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by dav mrazek

Originally posted by Rob Prime:
String urlPath = "jar:file://" + path + "!/";

That will create a URL of the root INSIDE the JAR. You need to add just the JAR. Therefore, remove the "jar:" and "!/".

You can also do this a bit more robust, against possibly troublesome paths, by using File:

Hello, i came to this problem, and i printed the url to see how it looks like and i have something like this :
url : file:/D:/path/where/the/project/is/ file:/C:/commons-dbcp-1.2.2.jar
so no wonder why it doesn't find anything.
why is my url like this ?
Thank you.
15 years ago
Hello and thank you for your response.
I read the editorial review of the book and it seems to be only a chat server without multiple room implementation, and i dont want to have the code all ready for me and just copy it.
Maybe if you read the book you could explain how a multiple room chat system work. Then i can start search more information and start developping something. I already have my chat server broadcasting messages to every client.
Thank you for any advice.
15 years ago
Hello i would like some advice on how chat system are working.
From now i have a client swing interface and a very simple ChatServer objet that runs in his own thread. The communication is made via socket. I would like to go a bit further and start implementing the notion of room, but havent got any idea on how this works. Is a room simply another ChatServer object ? Or is it working differently ?
Thank you for your advice.
15 years ago
Hello thank you for replying.
Sorry but it doesnt help much, to use a BorderLayout, the JTextField doesnt want to spread.

15 years ago
I think that with the GridBagLayout it must be possible so here is what i tried, but all component are in the center and my JTextField is small and doesnt spread like i want.

The TextFieldDemo in sun tutorial does what i want but they are using the SpringLayout and GroupLayout in their exemples and they are too complicated to use without an IDE.
How to use TextField
15 years ago
Hello, i would like to have my JTextField to fill my panel whatever size the panel is. Whenever i maximise or minimize the JFrame my JTextField should adapt to it.
Thank you for help.
15 years ago
Hello all,

I would like some advice for implementing some kind of timer on a user process or action (or use case) in my application based on Struts.
The timer should control that the user has validated the process after some time (30 minutes for exemple).
I guess that javascript has some kind of timer object that i could use, but i think it would be better to do it on the server side.
I have no idea on how to implement it.
Thank you for any help.
15 years ago
I still have the problem on windows 2000, but i payed attention to the exception and it seems that it is a native method problem. Here is the complete exception :

java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at TestClassLoader.main(TestClassLoader.java:27)

I m using netbeans 6 ide and in URLClassLoader i have some forbidden import statements. What does it mean ? thanks for any hints.
16 years ago
Hello, the first element of the arrayList which is a String.
16 years ago
Hello i want to ask how to sort an ArrayList containing other ArrayList in java 1.4.2 ?
My first idea is to create a class that implements Comparator. I just would like to know if there would be a better approach ?
Thank you.
16 years ago
Thanks greatly for this, it will help me a lot. Pity i m not using java 5 but still 1.4.2, but i didnt think about working with map which seems to be very convenient in this case, thanks, ill try work through your exemple and adapt it to my case.
16 years ago
I dont know if my algorithm is good but i manage to have an array of array containing the doubled data :

Now i would like some help for adding column together then merge the array with my original ArrayList of ArrayList.

Thank you for any help
16 years ago
Hello i would like some help for my problem. Here is an exemple of the arraylist of arraylist i have got :

My problem is that, from this arrayList, i have to compare the string element of each list to see if they are equals. Then if they are equals, i have to add the integer of each column with equal string between them and finally remove one of the duplicate array, so for the exemple the result would be :
16 years ago
I found this, but isn't it to heavy treatment ?
16 years ago
Hello and thank you for answers,
Now i would like to have my array of array converted back to an arraylist of arraylist.
What is the right way of doing it ?

Thank you.
[ April 21, 2008: Message edited by: dav mrazek ]
16 years ago