Difference between JDK, JRE and JVM


Another aspect worth mentioning :

jdk (java development kit)

you will need it for development purposes like the name suggest ,,

example : a software company will have jdk install in their computer because they will need to devlop new software which include compile and run their java programs as well.

so we can say that jdk = jre+ jvm .


jre (java run-time environment)

It;s needed to run java programs ,, you can't compile java programs with it .

Example : a regular computer user who wants to is run some online games then will need jre in his system to run java programs.

jvm (java virtual machine)

As you might know it run the bytecodes . It make java platform independent because it executes the .class file which you get after you compile the java program no matter if you compile it on windows,mac or linux.

open jdk

well like i said above .... now jdk is made by different company ,,, one of them which happens to be an open source and free for public use is openjdk... while some others are Oracle Corporation's JRockit JDK or ibm jdk...

However they all might appear same to general user..

Conclusion

If you are a java program you will need jdk in your system and this package will include jre and jvm as well but if you are normal user who like to play online games then you will only need jre and this package will not have jdk in it.
In other words jdk is grandfather jre is father and jvm is their son.

0 comments:

Dev C in Windows 8


With the latest release of windows 8 a new GNU has also been created and due to which many compilers might not work properly with the new GNU.

Due to change in the GNU of windows 8 new versions of compilers are coded for C and C++ program to successfully run. Most of the users might get following error while using the older version of dev-cpp in windows 8 which will generate the following error  -:



Compiler: Default compilerExecuting  gcc.exe...gcc.exe "C:\Users\James\Documents\Homework\TA_CPRE_185\counter.c" -o "C:\Users\James\Documents\Homework\TA_CPRE_185\counter.exe"    -I"C:\Dev-Cpp\include"   -L"C:\Dev-Cpp\lib"
gcc.exe: Internal error: Aborted (program collect2)Please submit a full bug report.See <URL:http://www.mingw.org/bugs.shtml> for instructions. Execution terminatedCompilation successful

 

This error is generated due to the use of Older version of MinGW(Minimalist GNU for windows) and TDM-GCC in Windows 8

You can download newer version of windows 8 from the following links -:

Link to Download new Dev-Cpp 5.3.0.3 TDM-GCC x64 4.6.1 for windows 8 is here

Download :

  •  The setup which includes MinGW32 4.7.0 can be downloaded here.
  •  The setup which includes TDM-GCC x64 4.6.1 can be downloaded here.
  • The portable version which includes MinGW32 4.7.0 can be downloaded here.
  • The portable version which includes TDM-GCC x64 4.6.1 can be downloaded here.
  • The setup which does not include a compiler can be downloaded here.


All Dev-C++ editions can be updated using the No Compiler setups/zips.

Important notices 


  • When you get errors on startup after upgrading, especially when Dev-C++ mentions 'TCppParser.Load', read this before commenting/reporting.
  • This version has GCC built-in instead of being an aditional package. It also contains, among others, D3D9/10/11, GDI, Win32 and OpenGL headers and libraries in that flavor.
  • For ultimate portable programming, please launch devcppPortable.exe located in the installation folder of the portable version. This launcher will tell Dev-C++ to save its configuration files in the same folder as the executable.
  • If you're getting 'Unsupported compression method' errors when extracting the portable version, please update your archiving program. The archive uses LMZA2 compression, which was added to WinRAR 3.91 and 7zip 9.04 somwhere in 2009. The latter is just as free as Dev-C++, so nothing is holding you back to extract it.


Choosing between 32bit and 64bit

·         The 64bit compiler will also run op 32bit computers. Not problem at all.

·         The 64bit compiler can do everything the 32bit compiler can, including creating standard 32bit executables.

·         The 64bit compiler can do stuff the 32bit compiler can't, like creating 64bit executables. It also comes with a lot more headers and libraries.

·         There is no single reason to download the 32bit version except for maybe file size, marginally longer compiling time, or in case you have to use that specific compiler for any reason (regression problems for example).

Compiling for 32bit using TDM-GCC x64

·         To force 32bit on all new projects and non-project compiles, go to Tools >> Compiler Options and select the 'TDM-GCC 32bit' profile. This profile will pass -m32 and use lib32 by default.

·         To force 32bit on already created projects, go to Project >> Project Options >> Compiler and select the 'TDM-GCC 32bit' compiler profile.


 



2 comments:

Example of C progamming language

Try this in turbo C:-

#include<stdio.h>
#include<conio.h>
void main()
{
    float a=0.7;
    if(0.7>a)
      printf("aa");
    else
      printf("bb");
   getch();
}

Output : aa

The if statement goes for true part but why...??
Answer for this that 0.7 is stored in the memory as 0.699999988079071.
Therefore if statement goes for true part.

Check another example by typing this small code :


#include<stdio.h>
#include<conio.h>
void main()
{
    float a=0.3;
    printf("%.20f",a);
    getch();
}

You will get output as :  0.29999999999999998890
Here 0.3 is stored as 0.29999999999999998890 in the memory

0 comments:

Template by Clairvo Yance
Copyright © 2012 Enigma of IT and Blogger Themes.