My Java Tools
[Most Recent Entries]
[Calendar View]
[Friends]
Below are the 15 most recent journal entries recorded in
My Java Tools' LiveJournal:
| Monday, December 3rd, 2007 | 3:49 pm [weyus] |
Issues running MyJavaTools on Windows XP
Environment: C:\myjavatools\com\myjavatools\lib>java -version java version "1.3.1_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_09-b03) Java HotSpot(TM) Client VM (build 1.3.1_09-b03, mixed mode) If I execute "List filesToRepost = Files.find(START_DIR, fileName);" where START_DIR is a directory name and fileName is a valid file name that lives underneath START_DIR, I do not get anything back in the list. START_DIR is of the form "/a/b/c/d". I've tried pre-pending the directory path with "C:". I've tried pre-escaping the slashes so that they won't be interpreted as part of the regexp, etc. Are there any known issues with using MyJavaTools on Windows? Thanks, Wes Gamble | | Sunday, December 10th, 2006 | 9:40 pm [ivan_ghandhi]
 |
| | Sunday, September 24th, 2006 | 7:40 pm [ivan_ghandhi]
 |
Version 1.2. of Run From Web
>Version 1.2 of "Run From Web" program - added '-newer' flag that lets download executable only if it is newer than the local file. The command looks like this: run [-overwrite|-newer] <url> <parameters> ('-overwrite' means that if the file already exists in cache, it is overwritten from the web) ('-newer' means that if the file already exists in cache, and it is older than the one on the server, it is overwritten) Url can point to a file on a disk drive as well. The archive contains the source code,, together with Windows, Mac, Solaris and Linux executables. If your platform does not support these, you can always run java -jar runajar.jar | | Saturday, September 23rd, 2006 | 4:00 pm [evanpmeth] |
Sending multipart/form data
I recently stumbled upon the Sending multipart/form data ClientHttpRequest.java and was very interested. I am very new to java and still dont understand some basic concepts. I just need some clarifacation. By chance do you have example code of how to use ClientHttpRequest. I dont understand how to use: InputStream serverInput = post(URL url, Map parameters); I keep on getting an error that says cannot be referenced from a static context. what do i have to do in order to have this file in a package, reference it then call the post method. sorry if this is really simple. I just need to visually see something in cation to fully understand how it works. Also is it possible to submit a form receive a cookie from that request and re-send the cookie with a normal http request. It is for a site that uses cookies to verify a person is logged in, so in order to use what is behind the password protected area i would have re send the cookie with every request made to the server. Thanks for your time. -evan | | Thursday, July 14th, 2005 | 2:20 pm [ivan_ghandhi]
 |
| | Friday, March 18th, 2005 | 9:16 pm [ivan_ghandhi]
 |
two new methods for Files class
Got a letter: "I was trying your files utility on http://myjavatools.com/ & found the methods very useful. Was wondering why following were not considered as another install method ? public static boolean install(String archiveName, File location) throws IOException { URL url = new URL(archiveName); ZipInputStream is = new ZipInputStream(url.openStream()); return unzip(is,location); } public static boolean install(String archiveName, String location) throws IOException { URL url = new URL(archiveName); ZipInputStream is = new ZipInputStream(url.openStream()); return unzip(is,new File(location)); } Where archiveName could be something like : file:/C:/downloads/examples.jar (or a zip file), as this eliminates the creation of the 'Class' object required for the existing install methods. Looking forward to hearing from you... Regards, Rajeev Chugh" It's a great idea; and I've just added these two methods. | | Wednesday, March 9th, 2005 | 2:40 pm [ivan_ghandhi]
 |
| | Sunday, March 6th, 2005 | 11:06 pm [ivan_ghandhi]
 |
| | Wednesday, February 23rd, 2005 | 1:24 pm [marc123] |
rss with french charachters??
Hi, I recently used the com.myjavatools.xml.Rss com.myjavatools.xml.Rss.Item libraries to parse rss, however it seems that special charachters such as à é are bieng converted to unicode charachter /ufffd so when i print out the string finally you get stuff like: La lumiére se met au service de la sécurité which is printed out as La lumi?re se met au service de la s?curit? i used the following rss channel as a test: http://www.zdnet.fr/feeds/rss/techupdate/but other french rss channels exhibit the same issue... Is this an issue in the library, or am i setting my encoding wrong somewhere?? Thanks, Marc (marc orbiscommunications.com) | | Monday, February 7th, 2005 | 9:02 pm [ivan_ghandhi]
 |
update: foundation classes for Java 5
Version 5.0 of myjavatools library is being posted to the site. A new package, foundations, was added. Strings class tends to be usable with collections and varargs; chars is a convenient method to scan through characters:
CharSequence cs = "abcd".subsequence(2,4);
for (char c : chars(cs)) {
System.out.println(c);
}
Files has similar new methods:
for (char c : chars(new File("mytext.txt"))) {
System.out.println(c);
}
for (byte b : bytes(new File("notepad.exe"))) {
System.out.println(b);
}
for (String s : lines(new File("mytext.txt"))) {
System.out.println(s);
}
Did I mention that Files.copy() method was rewritten to use memory-mapped files from nio library? | | Friday, December 17th, 2004 | 12:28 pm [mtracey] |
posting a form
I have just started trying to use this tool. It looks good, but I can't quite achieve sucess. I am trying to automatically validate an xml document against its schema using this site: http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspxI can get the basic form downloaded successfully. I have deciphered the form and entered what I think are the correct parameters, _VIEWSTATE, the SchemaFile, the XmlFile, NamespaceUri as "" and "Validate","Submit". However, after setting those parameters, post() returns an InputStream that only has the basic form, without the vaidating results I achieve when I actually use the form manually. Any thoughts how I can proceed to resolve this? I wasn't sure what to do about the form information : name="PageForm" id="PageForm" I tried omitting it and including it. No apparent difference. Thanks. | | Sunday, August 29th, 2004 | 1:11 pm [ivan_ghandhi]
 |
xml/rss library updated
XML preserves xmlns attributes in cleanAttributes() call; RSS is now compatible with slashdot.com version or RSS version 1.0. | | Friday, August 20th, 2004 | 10:01 pm [ivan_ghandhi]
 |
ServerHttpRequest: bug fixed
A dramatic bug was just fixed. WHen one POST request parameter ends with carriage return (as a part of its value), the next request parameter is ignored. That was the wrong behavior that was just fixed. | | Wednesday, August 4th, 2004 | 9:06 pm [ivan_ghandhi]
 |
projects/web... ServerHttpRequest update
This class that is indispensable in parsing multipart requests in a servlet or JSP, underwent a real-life test, and, hence, a robustness upgrade. The problem was with weird (okay, buggy) Tomcat 5 reader in its connector. This new implementation does not use reader; instead it uses the original requests, byte-based ServletInputStream, and, to improve performance, uses its own adaptive size buffer. It still did not always work with the build of Tomcat 5 that is provided withing JBoss 3.2 distribution (at times it does, at times it does not) - but the one in JBoss 4 is perfectly okay, and you can just update your JBoss 3.2. Let me know if you encounter problems with this. See http://www.myjavatools.com/projects/v.1.4.2/web/mjweb.zip | | Sunday, August 1st, 2004 | 3:39 pm [ivan_ghandhi]
 |
just opened
Hi, This community is the place for discussing the tools, the ideas and the bugs originating from http://myjavatools.comI just discovered that I read livejournal way more often than my email, and that here problems and ideas may be discussed much more efficiently. |
|