Owner: New To Programming URL:http://newtoprogramming.blogspot.com/ Join Date: Fri, 18 Apr 2008 13:51:01 -0500 Rating:0 Site Description: My experience with programming and computers in general. I mostly write about my experience with the Java programming language. Site statistics:Click here
Is JVM platform independent or not? 2008-04-17 11:38:00 Though java is platform independent
why is that I need to download a different JDK based on my Operating System was the question I was asking myself, for some time. The major difference in these different JDK seems to be the JVM. JVM interprets the bytecode into actions or Operating System calls that performs the required functions. It was said to me that these Operating System calls are specific to those Operating Systems and hence the JVM is not platform independent. I searched my web on this, just to get confusing answers.These are some posts from the SDN forums:MLRon writes:JVM is not platform independent. The code you write to run on a JVM should be (unless you interface to native methods). If Microsoft comes up with an operating system that isn't compatible with Windows, then they (o
System.arraycopy vs. Iterative loops for copying arrays 2008-04-16 07:18:00 Well, I must say I am totally bewildered. Reading into “Java 2: The Complete Reference” by Herbert Schildt, I stumbled upon a method called “arraycopy()”, defined by the class System
. This method is supposed to copy one array into another. This what the book says about the method:The arraycopy( ) method can be used to copy quickly an array of any type from one place to another. This is much faster than the equivalent loop written out longhand in Java....A quick search in the web about the method conformed this, a website recommending the use of arraycopy() over iterative method says:….Besides accomplishing the same result with less code, this approach has the added advantage of being faster, since arraycopy is implemented as a native method, and will generally execute faster than
How to rename file extension 2008-04-15 05:53:00 You may occasionally want to rename the extension of your files. For instance, once I downloaded a “.chm” file – HTML help file, which didn’t have an extension. So, I had to add the extension my self. I made an error by renaming it to a “.pdf” file. Now I wanted to correct it, but the extension is not visible when you try to change it. If something like this has happened to you it is because the windows, is configured to hide the extensions of known file types.Now lets consider the file “SSHClientHelp” for example. It doesn’t have an extension visible, for the file to work properly it must be a HTML help file, but now it is a PDF file.To enable the extension, go to tools –--> folder options, click the view tab and uncheck “Hide the extensions of known file types”Now
Adding Digg button to blog posts 2008-04-14 09:27:00 Finally, added the Diggbutton
to the blog. But I still didn’t manage to change the template.Tips-for-new-bloggers, has tutorial on how to add the dig button to the template. It asks to find the following line of code in the template:<p><data:post.body/></p>And then asks to add the following code on top of that line or below it depending on whether you need your dig at the top or bottom of your post.<div style='float:right; margin-left:10px;'><script type='text/javascript'>digg_url="<data:post.url/>";</script><script src='' type='text/javascript'/></script></div>When I do this, blogger takes me to a error page.I searched the web for some other way, but almost all of them have got the same way of adding the Digg button. Failing i Read more:posts
Why not outlook? 2008-04-14 00:03:00 This is my first post, and let me get to the issue straight away.I was going through “Java 2: The Complete Reference” by Herbert Schildt, there is this chapter on java.lang, in which there is a discussion of the methods of a class called Runtime.A method called exec() is introduced which can call other programs. It seems similar to what happens in when you type notepad in Start ----> Run. In here, if you pass notepad as an argument to the method it would invoke the program. Here is the example program that the book gives:public class ExecDemo {/*** @param args the command line arguments*/public static void main(String[] args) { // TODO code application logic here Runtime r = Runtime.getRuntime(); Process p = null; try { p = r.exec("outlook"); p.waitFor(); } catch (Except
Archiving mail, whats that? 2008-04-19 06:15:00 …If that’s your answer to whether you archive your mail? (like me) or even if you did know what it is, but never cared to do so. Gmail blog, has come up with 9 reasons as to why you should archive your mail. Cut the crap out! What’s archiving? It just means moving mail out of your inbox and storing it for safekeeping. (Thanks to gmail blog for that short and simple definition!). So why should you do that? Here is why:9. Phone numbers and addressesYou never know when you'll need a phone number someone emailed you or an address that was in a signature.8. Procrastination Sometimes you want to get a message out of your inbox, but you don't want to deal with organization, and you don't want to trash it.7. PosterityJust because you’re not famous now doesn’t mean that in forty years (or
Automating Archiving 2008-04-20 09:08:00 The gmail blog published some 9 reasons as to why users should start archiving. People started to wonder why they should even bother, part of the concern due to them feeling the job repetitive. But it need not be. You can automate the process of archiving emails using filters!After you enter into your mail account, find the “create filter” option near the search box, and click it.The rest of the process is very simple that even a layman can figure it out, anyways, I will go through it. Now, you should have a yellow display asking you to “create a filter”. Here you define the criteria for the filter. I am going to enter “reports at sitemeter dot com” in the text box opposite to from, since I want to archive any mail sent from this mail address to me. Here I don’t want the repo Read more:Automating
No source files with Java EE 2008-04-21 11:03:00 I had installed JDK 6 that comes with Java EE, I wanted to have a look at the library source files
(found as src.zip) in the JDK. But I couldn’t find it. I again downloaded JDK 6, and found the src.zip! So, sun doesn’t include the src.zip with the JDK that comes with Java EE. But why?
Netbeans IDE 6.1 from tomorrow 2008-04-22 13:17:00 Netbeans IDE 6.1 should be available for download at their site on April 23rd, 2008 as per their roadmap.According to the site, NetBeans IDE 6.1 release provides several new features and enhancements, such as rich JavaScript editing features, support for using the Spring web framework, tighter MySQL integration, and an improved way of sharing libraries among dependent projects. The acclaimed support for Ruby/JRuby has been enhanced with new editor quick fixes, a Ruby platform manager, fast debug support for JRuby, and many other new features and fixes. It also promises performance enhancement which includes 40% faster start up time!Since, the Netbeans community has given a green signal to the release candidates, let’s hope Netbeans 6.1 is out on April 23rd, 2008. Read more:tomorrow
NetBeans IDE 6.1 Released 2008-04-28 07:52:00 NetBeans IDE 6.1 has been released. I had posted that it was to be released on April 23rd, 2008, but it didn’t happen. The NetBeans site latter on updated its release road map for an April 28th release. Why wasn’t it released on April 23, 2008? The NetBeans release guidelines states that there must be at least one week between the last release candidate and the final release. NetBeans IDE 6.1 RC 2 was released on Arpil 21rd, 2008, so exactly a week after it they have released the final version. Read more:NetBeans