Free Essay

Important Things in File

In: Computers and Technology

Submitted By akira0995
Words 573
Pages 3
Important points about class file in Java
1. class file in java is generated when you compile .java file using any Java compiler like Sun's javac which comes along JDK installation and can be found in JAVA_HOME/bin directory.

2. class file contains byte codes. byte codes are special platform independent instruction for Java virtual machine. bytecode is not a machine language and mere instruction to JVM. since every machine or processor e.g. INTEL or AMD processor may have different instruction for doing same thing, its left on JVM to translate bytecode into machine instruction and by this way java achieves platform independence.

3. class file of inner class contains $ in there name. So if a Java source file contains two classes, one of them is inner class than java compiler will generate two class file. separate class file for top level and inner class. you can distinguish them by looking at there name. Suppose you have top level class as "Hello" and inner class as "GoodBye" then java compiler will generate two class file:

Hello.class
Hello$GoodBye.class

Hello$GoodBye.class is a class file for inner class. whose name is in format of top-class$inner-class.

4. You can look bytecode of class file using javap command. javap command can also display method and field information from .class file. see my post how to decompile .class file in Java for more details.

5. class file format is subject to change and its changed to support new feature introduced in Java 1.5. In general every java compiler and JRE comes with supported version of .class file format and you can not run a .class file which is in higher version of those supported by JRE. this often result in java.lang.UnsupportedClassVersion. class file has two version major and minor which is included inside class file. See my post Bad version number in .class file for more details.

6. .class file in java is identified by a magic number in header which is a 4 byte CA FE BA BE ( in hex). which is the first element in .class file, followed by major and minor versions of class file

7. .class file allows Java Virtual machine to implement security. Since number of instruction class file contains are limited. also if some one tempers .class file externally it may not run on different browsers and JRE.

8. Java class file can be divided into 10 basic sections e.g.
Magic Number : 0xCAFEBABE
Major and Minor class version or .class file
Constant pool - constants for this class
Access modifiers - to indicate whether class is static or abstract
This class - name of this class
Super class - name of super class
Interfaces -
Fields
Methods
Attributes

9. Top level .class file name is same as name of java source file e.g. Hello.java will produce Hello.class

10. You can view class file in any hex editor or any byte code viewer plug-in in Eclipse.

That's all on what is class file and basics of .class file. As I said this is not a detailed article on .class file format rather this is the bare minimum information regarding .class file an average java programmer should be familiar with. I highly recommend to read more about .class file format if you are interested but it depends upon your experience level and beginners may not find the class file format easy to understand

Similar Documents

Premium Essay

File Management

...File Management POS/355 Brandon Elizaldi Steven Kernan File Management File management and file systems are a core part of the user experience for most users. They provide many essential and necessary functions for the user as well as almost anyone else working with a computer system. They provide anything from long term existence to the ability to create and delete stored data. Some of the benefits to the user are long term existence, the ability to be shared between processes and structure. Long term existence is an important aspect because it can be stored and recalled in the future. Imagine being stuck in the days the original Nintendo for example. You could play a game and get deep into game play but if you didn’t have time to finish the game you had to start all over again. This was due to the fact that there was no file system built in due to the fact a storage device was not available for the system. This is one of the great things about current game systems that have file systems and storage capacity. Another benefit is the ability to share files between processes. This has streamlined new software creation because the program doesn’t have to be built as a standalone. This keeps programmers from having to reinvent the wheel every time they write a program making them cheaper and easier to write. This also saves disk space on the users system. The next benefit is structure which provides a hierarchy within a file system allowing for more complex structures...

Words: 705 - Pages: 3

Free Essay

Dropboz 101

...and Sending Files on Your Dropbox   Chapter 8: Get More Free Space Chapter 1: IntroductionGo from beginner to pro with this time saving guide. Whether you are new to Dropbox or looking for some valuable hacks, this jump start guide will allow you to look effortless in front of coworkers and friends. In this piece you will get the bare bones basics of Dropbox with additional protips at the end of each chapter. Once you get the bare essentials down, read further and try out some of the pro tips in the end of the sections. The guide illustrates the ins and outs of backing up important data, how to utilize third party software with Dropbox and much much more. Don’t scour the internet looking for these invaluable tips, they are all right here! What is Dropbox?What is Dropbox? Co-founder Drew Houston calls Dropbox the ‘fabric that connects’ all devices. Instead of keeping track of a USB stick, with limited data storage and the ability to become corrupted over time, Dropbox is a safe and secure way to share and edit files with numerous people. Instead of trying to gather all your data manually, Dropbox is the app that allows your data to follow you everywhere. Since it was founded in 2006, the company has grown from a mere two employees to over 200 employees today in 2014. Over 50 million users depend and trust Dropbox with their data. It is one of the best cloud databases and is simple to use. Some major corporations use Dropbox like Groupon to edit and exchange files. Dropbox...

Words: 7401 - Pages: 30

Free Essay

Nt1110 Unit 10 Analysis Repair Shop

...pictures, files, videos, music, movies, documents, and any other things saved on the computer. The user will be able to transport these things to the new computer * With this option the user will have all the information for a new computer or a computer that has been repaired, or changed operating systems * The user will not have to pay any additional fees to store the files. * There is no need for the internet in order for the user to access any of the information. * The computer will be brand new with the same files the user has managed to accumulate over the life of the computer Cons: * Biggest downfall is the DVD’s can be scratched easily and can be physically damaged * DVD’s can also go missing or even are sometimes stolen * Some older computers don’t have the capability to write DVD’s. * There’s a cost involved in buying the DVD * The DVD doesn’t have the capacity to store games, programs, updates, and applications the user has installed Someone with a new computer will not be affected nearly as much as the others. New computers won’t have as many things saved to the computer already. Someone who has on older computer will have many more headaches involved. This user may even need to invest in multiple DVD’s and have to keep up with more DVD’s. This user will also lose all programs, updates, and applications. The business user may be complicated but the user will be able to save all files and will not lose any work progress or important work related...

Words: 339 - Pages: 2

Premium Essay

Kohls Manager

...systems can determine the software and hardware utilized, the applications of the devices or programs, and determines the demographic, which will use the products. However the ever-changing field of technology has become more user-friendly, compatible, and more accepted in main stream than before. The main operating systems employed today are as follows: UNIX/Linux, Mac, and Windows. We will explore the various aspects of key components in these operating systems, memory, process, and file management along with the security of each system. The comparison of each system will determine the operating system best suited for the needs of our creations, projects, and improvements to the technology of the past, present, and future. MEMORY MANAGEMENT Memory management in multiprocessor systems is essential in executing several processes simultaneously. The multitasking of a system aids the user in accomplishing his or her task more efficiently than with a single processor system, which is important in the current climate of today’s multifaceted mix of professional and personal world. Why choose UNIX/Linux, Mac, or Windows to develop a device, product, or program? The decision of operating system depends upon the needs of the end resulted processes, and must be weighed heavily prior to electing one or the other. Memory management between these three operating systems vary and need a closer scrutiny help clarify the best choice. Memory management is streamlined into UNIX/Linux...

Words: 2557 - Pages: 11

Premium Essay

Configure Basic Security Controls on a Linux Server

...answers are due at the beginning of class the following week. Students are encouraged to perform and submit their lab assessment results immediately upon completion of the lab activity or prior to the due date. During this lab students will properly secure a Linux server system. They will perform steps to secure the bootloader, enable iptables and run SELinux to help lock down the Linux OS. The students will also apply ACLs to directories and files and then check those ACLs and permissions on the system. To accomplish the lab assignment below, students will need to obtain a copy of the Fedora Image provided to you by the Substitute Instructor and complete a basic VMware installation of Fedora. The questions in the lab book will be based on the installation experience. Assigned Pages: 10-26 Questions: 1 through 10. This assignment is due by the beginning of class for Unit 3. 1. What is GRUB and why is it important to lock it down? GRUB stands for Grand Unified Bootloader (1 of 2 boot menus' for the operating system) which is important to lock down is for security reasons. These reasons include being used to start other operating systems (eg. other versions of Linux or Microsoft Windows), & can be used to boot a system into single-user mode with full administrative privileges. 2. Discuss the purpose of granting "sudo" access. Why is it a good idea not to login as a root user? The "sudo" (-su or -sg) command logs the user in as root administator which is dangerous...

Words: 745 - Pages: 3

Free Essay

Hacking

...ngA Basic UNIX Overview Asriel UNIX FOR DOS ADDICTED WaReZ PuPPieZ AND THEIR PETS Introduction ------------ One of the most common operating systems in existance is Unix. Unix exists in many different flavors, from Berkeley BSD to AT&T System V to SunOs. Basic working knowledge of Unix is almost essential to a hacker, as it is the system a hacker is most likely to come across. If you intend to use the internet at all, or to do any serious exploration of Telenet, the ability to navigate through Unix is a necessity. (Unix is also the single most interesting system in existance: it's just fun to fuck with). Unix Logins ----------- Most Unix logins look essentially the same. A general Unix login prompt looks something like this: connected to five.finger.com login: That first line is the system identifier. Although it's not at all essential to what you are doing, it's good to know what system you are attempting to log on to. The second line is what typically identifies the system you are on as Unix. Almost all Unix systems greet a user with the same prompt: login:. Well, there's not much to do in Unix from the outside, and Unix systems are typically fairly secure at this point. You may be able to obtain a list of users, or current users, by logging in as 'who', but other than that there are few functions available here. Unless you are on the internet, or have accounts specifically...

Words: 3455 - Pages: 14

Premium Essay

Operating Systems in a Nutshell !

...The CMI mechanism provides the user with a usually black screen, and the user can type in commands he wants to be executed. The command execution service can be subdivided into two categories, resident and nonresident commands. The resident commands are those commands the reside in memory in order to be accessed immediately. The nonresident commands, as you might expect, do not remain on memory and is loaded into memory as necessary. File management The OS also serves file management system. Because files are not always stored contiguously on the disk a file management system is needed in order to be able to keep track where files are stored on the disk. The file management system also provides tools, in which a user can copy, move or load a file. It also takes care of providing I/O devices with the files needed, even though the I/O device or the user doesn’t know the file structure of the device being accessed. More advanced file management systems provide users with back up features and recovery mechanisms which are useful if “things go wrong.” Input/Output Services Some of the I/O services include the implementations of interrupts (described in a previous post). The I/O drivers also...

Words: 909 - Pages: 4

Free Essay

Disk Management and Maintenance

...Having a reliable storage for people to save their files, documents or projects at is important because if they do put it into storage they know they might or will need later. Losing important work stuff can cause a lot of trouble with the bosses or the managers because the company will be losing money while the employee has to redo the work that was done in the given time. This will also fall on my shoulders because I’m responsible for the quality of my work, which includes keeping the hard disk as reliable as possible and backing up the data if possible. One of the ways to achieve reliability on the hard disk is by doing occasional disk cleaning. Microsoft has a tool called Disk Cleanup which allows me to delete any unneeded files, temporary internet files, files in the Recycle Bin, Hibernation files, setup log files, temporary files, thumbnails and office Web pages. Although it may sound that this tools delete too many things at once, it actually has the capability of choosing what particular things the users wants to be deleted. It is great because it keeps the hard disk from being crowded with stuff that is completely useless and just takes up the space for the important stuff. Another way of making sure the disk is not being slowed down is by doing the defragmentation. If the hard drive is used extensively and large files are being stored the will be full of fragments very soon. Microsoft has also shown initiative with this issue and the Disk Defragmentation tool was...

Words: 875 - Pages: 4

Premium Essay

Medical Records System

...keep records up to date. Good Health Medical Services has grown over the years from seeing an average of twenty patients a week to over two hundred patients a week. The staff has also grown and now has over ten specialty physicians that range from Pediatrics to Oncology. The record keeping staff has grown as well going from one person to three people. There have been several cases of misfiled information or lost or missing files and the directors want to lessen some of these factors, save money and move into the current technology world of Electronic Medical Records (EMR). Purpose/ Business Need: The directors feel that there are several benefits to be had by moving from paper files to electronic files. The benefits of EMR are less paper files, savings on paper, less maintenance to the files and manpower being put into looking for the files. Plus, many times a patient can be seen by more than one physician at the facility. If the file is electronic that can assist the physician in updating files. With today’s technology the physicians can update files from cellular phone or other mobile device. There is less time spent on manually...

Words: 2778 - Pages: 12

Free Essay

Creating a First Website

...to portray. Things I need to think about while planning my website are the business requirements, user requirements, technical specifications, and design requirements. Planning should include what my ultimate goal with the site is. From a user’s standpoint, I need to think about how easy my site is to access and use as well as the content that I have on my page. I learned that HTML, also known as hypertext markup language and its tags are the basis for all web pages. I also found out that the Dreamweaver application is the tool that makes HTML and CSS creation simple. I have learned that CSS or cascading style sheets is how I give my website its personality. CSS helps you keep your visual properties separate from your content on the page. You can also have internal and external CSS files. These CSS files can be applied to multiple HTML pages. CSS style consists of selectors and properties. I have found out the three most important tools I will use in Dreamweaver are files, insert, and CSS Designer. I also learned I need to save all my graphics or media to the folder for my website. It is simple to use Dreamweaver to add organization to my webpage. For instance, I can start with a mess of text and select what parts of my page I want them to be in and Dreamweaver does the rest. I learned that I could use live view to be able to see what my page is going to look like. One of the most important things I will need to do is set up a local site folder for all my files to be saved...

Words: 606 - Pages: 3

Free Essay

Time

...NARRATIVE REPORT Our school, let us students to engage and experience the things happening in the actual world of Industrial through our On-The-Job-Training(Internship) in HR Department and other Industrial establishments related. We have given 360 hours to undergo and pursue this training that will help us to acquire knowledge and skills that will serve as a tool to face the challenges of life in the future. It will set our mind of what does a real world of industrial is all about. Others think that industrial matters only on encoding or interviewing applicants which is true; however, it also matters or related in decision making. It also related to the development of our skills in communication, teamwork, enhance knowledge and management. Thus, experience is vital to one’s improvement and preparing students to their career is the best way to set them on success. Pierre and Paul is my first company to work with but unfortunately, I didn’t want the nature of the work so I decide to look for another company that will give me an opportunity to learn more and it was related on my course. My concern classmate informed me that National Bookstore Inc. is looking for Interns so I grab it. I started my OJT on July 29, 2013 at National Bookstore Inc. I really amazed and glad because we all know that National Bookstore Inc. is a well known company in our company. I was assigned at the HR Department because the Assistant HR Manager their said that they need OJT’s on their department...

Words: 968 - Pages: 4

Free Essay

Lindalomanvictimoragent

...Get started with Google Drive 1 Store any file Use Drive’s 15GB of free Google storage to keep anything you want. Learn how to add a file Share files and folders Everyone can see and edit files at the same time in Drive. See how to share a file or folder See your stuff anywhere Get to your files from any smartphone, tablet, or computer. Download the app for mobile & desktop 2 Clean up your digital life If you’re like most people, you have disk drives and files floating everywhere—on CDs, USB sticks and external drives. Use Drive’s 15GB of free Google storage to keep any type of file in one safe place. 3 Here’s how to store files in Drive On Android On iOS Select “Upload” and choose files to add. Click the “+” button and select files to add. Upload On the web Drag files or folders into your Chrome browser. or Click the “Upload” button and select files to add. EATE 4 On PC Drag and drop any file or folder into the Drive folder on your desktop. On Mac Drag and drop any file or folder into the Drive folder on your desktop. 5 Share and plan together Budget Guest list Invite.pdf Use a shared folder in Drive to start prepping for that big event (like a wedding) with the help of your family and friends. You’ll always be looking at the most recent version of your files, and you’ll have the ability to track changes on things like the guest list, budget or designs for the invite. 6 Here’s how to share files in Drive On Android Click the “Info” icon, then...

Words: 442 - Pages: 2

Premium Essay

Unit 2 P2 Explain The Purpose Of Operating Systems

...Unit 2 Assignment 2 P2: Explain the purpose of operating systems An operating system is software which lets users operate the system in an interactive way. It is the most important program that runs on a computer which runs other programs that will be used for different tasks such as, input from a mouse, output of a monitor, managing files and controlling peripheral devices. Without an OS the computer’s hardware would be useless. GUI The OS has a graphical user interface that lets users interact with computer using and I/O device such as keyboard and mouse. For example a windows GUI has start menus, a desktop and a cursor; these features of a GUI makes it easier for users to navigate instead of having to learn complex command buttons/languages....

Words: 1072 - Pages: 5

Premium Essay

Computer and Network Security

...the lack of technology. People or organizations could be interconnected over the shared network. It was no longer necessary to connect systems in a point-to-point configuration. Vulnerabilities were introduced with the deployment of this distributed environment utilizing shared, packet switched networks employing protocols such as TCP/IP and the concept of trusted systems. Systems on the network "trusted" each other. This situation was frequently made worse by connecting relatively secure LANs to an unsecured WAN. This early use of networking opened up some major security risks. The holes that allowed unauthorized access made it so, computers and networks needed new protocols to protect the systems. Why Network security has become so important Network security is a high priority form of security because many hackers try to infect as...

Words: 1474 - Pages: 6

Free Essay

Homework 3

...Homework #3 September 17, 2012 1. What is the difference between a directory and a file? A directory is another term for folder. Directory’s can have director’s under them Files are basic unit of storage on pc. Collection of related data, operating system runs software program files. User files are opened of viewed by application software. 2. What is the difference between an ASCII file and a binary file? Text files are most often ASCII-encoded. Binary files specially encoded by software program that created the file. Like image files, sound files. 3. Explain what a root directory is. Is the first or top most directory in a hierarchy. It can be related to the root of a tree. 4. What are the default file extensions for the following types of files? ASCII text file ____ASC_______ Microsoft Word file ____DOC_______ Microsoft Excel file ____XLS_______ Microsoft PowerPoint file ___PPT________ Compressed (zipped) file ______ZIP_____ Web page ____HTM_______ 5. What basic type of files have file extensions of  .bmp, .gif, or .jpg ? Picture files 6. If you create a new file with the long file name Budget Analysis 2005.html, what would be the short name generated by Windows?Budgetan.htm 7A.   What does a checkmark infront of the following setting allow and disallow?                Hide extensions for known file types It will only show the file name and hide the extension of the file type from showing. 7B.   What does the absence of a checkmark infront of the following...

Words: 385 - Pages: 2