• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Java Basics

 
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As we say , after compilation of java code, bytecode is generated.

In this context, what is JVM and bytecode?
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java bytecode is a special language that the Java Virtual Machine (JVM) understands. The JVM is basically a program that knows how to read bytecode and talk to a specific operating system/platform. So, there is a JVM for windows XP, a JVM for linux, a JVM for Mac OS.10, etc.

You can give the exact same .class file (which is bytecode) to any JVM, and it will interpret it for the machine where it runs.

this is vastly different from something like C. You'd need to compile your C code for each platform, and make sure you sent the correct (set of) file(s) for that OS. That often lead to maintenance nightmares.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we say java is a secure language. Is this bytecode concept related to java security?
 
fred rosenberger
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, what makes java a secure language?
 
author
Posts: 23958
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kunal Lakhani wrote:So, what makes java a secure language?



No easy answer. Java is secure due to many components; from the byte code verifier, the class loaders, the security manager, and how many of the classes are designed and behave (immutability, etc.).

Henry
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kunal Lakhani wrote:As we say , after compilation of java code, bytecode is generated.

In this context, what is JVM and bytecode?


The following page in Oracle's Java Tutorials explains these basic principles: About the Java Technology.
reply
    Bookmark Topic Watch Topic
  • New Topic