Vinod’s Blog

May 20, 2007

Started Learning Java

Filed under: Uncategorized — vinodtiru @ 9:52 am

Java

I am a developer writing code in .Net..:) . Now i wanted to learn Java. This is want i learnt about Java. It is not something very difficult to learn. Its pretty simple. This is what people have told me. Below i have explained what i have learnt about Java.


Java was initially called oak(by SUN Micro system). This was initially designed to be used only with in SUN. But it was named later as JAVA and was used by everyone. This Java is perfect for Internet, not just because it is an object-oriented programming language, but also because when Java code is compiled, it is made into byte-code. When you compile other code, in other languages, you usually make an .exe file. In this file is all the machine-level code is needed to run the program. Java doesn’t do this, instead Java uses the Java Virtual Machine (JVM), which contains all the machine-level code. The JVM first needs to be installed on your computer and then you can run your Java programs. So this means that your compiled Java program don’t need the machine-level code, reducing the file greatly. This makes Java programs very small, and also very easy to download from the Internet. Great idea isn’t it.

Today i am starting to learn JAVA from the tutorials of SUN (The great ones of JAVA). I will try to summarise what ever i learn. I think not everyone will find time to go through the tutorials given by SUN. So Let me help u. But if you find time and want learn it in depth please use this link Java Tutorials.

Tech Learnings

Filed under: Uncategorized — vinodtiru @ 8:12 am

General Tech Learning’s

Difference between a Thread and Process

Answer
A process is an OS-level task or service. A thread runs “inside” a process and may be virtual or simulated. Generally speaking, threads share resources like memory, where processes each have their own separate memory area, and need to take more elaborate steps to share resources.

Another name for thread is “lightweight process” to distinguish it from the “heavyweight” system processes.

A Process has its own memory space, run-time environment and process ID.
A Thread run inside a Process and shares its resources with other threads.



What is a Windows Service and how does its life-cycle differ from a standard EXE?

Answer

A service opens before you even get to the login screen, whereas a standard exe cannot open until after you have logged on.

Windows Service applications are long-running applications that are ideal for use in server environments. The applications do not have a user interface or produce any visual output. Any user messages are typically written to the Windows Event Log. Services can be automatically started when the computer is booted. They do not require a logged in user in order to execute and can run under the context of any user including the system. Windows Services are controlled through the Service Control Manager where they can be stopped, paused, and started as needed.



Batch Files

1) Make sure you name the batch files with less than 8 char. If not you might face problems in older versions of DOS etc.

2) Make sure you have saved the text as a ASCII text.

3) Make sure you do not name the batch file with the same name as of any other file in the directory. This is because any program executable with the same name as the batch file will initiate first, instead of your batch if it is found first in the Dir search.

4) In DOS “@echo off” is to switch off the successful echo’s and “@” is to switch off everything.

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.