পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Thursday, January 19, 2017

Java.lang.Runtime Class

Introduction

The java.lang.Runtime class allows the application to interface with the environment in which the application is running.

Class declaration

Following is the declaration for java.lang.Runtime class:
public class Runtime
   extends Object

Class methods

S.N. Method & Description
1 void addShutdownHook(Thread hook)
This method registers a new virtual-machine shutdown hook.
2 int availableProcessors()
This method returns the number of processors available to the Java virtual machine.
3 Process exec(String command)
This method executes the specified string command in a separate process.
4 Process exec(String[] cmdarray)
This method executes the specified command and arguments in a separate process.
5 Process exec(String[] cmdarray, String[] envp)
This method executes the specified command and arguments in a separate process with the specified environment.
6 Process exec(String[] cmdarray, String[] envp, File dir)
This method executes the specified command and arguments in a separate process with the specified environment and working directory.
7 Process exec(String command, String[] envp)
This method executes the specified string command in a separate process with the specified environment.
8 Process exec(String command, String[] envp, File dir)
This method executes the specified string command in a separate process with the specified environment and working directory.
9 void exit(int status)
This method terminates the currently running Java virtual machine by initiating its shutdown sequence.
10 long freeMemory()
This method returns the amount of free memory in the Java Virtual Machine.
11 void gc()
This method runs the garbage collector.
12 static Runtime getRuntime()
This method returns the runtime object associated with the current Java application.
13 void halt(int status)
This method forcibly terminates the currently running Java virtual machine.
14 void load(String filename)
This method loads the specified filename as a dynamic library.
15 void loadLibrary(String libname)
This method loads the dynamic library with the specified library name.
16 long maxMemory()
This method returns the maximum amount of memory that the Java virtual machine will attempt to use.
17 boolean removeShutdownHook(Thread hook)
This method de-registers a previously-registered virtual-machine shutdown hook.
18 void runFinalization()
This method runs the finalization methods of any objects pending finalization.
19 long totalMemory()
This method returns the total amount of memory in the Java virtual machine.
20 void traceInstructions(boolean on)
This method enables/disables tracing of instructions.
21 void traceMethodCalls(boolean on)
This method enables/disables tracing of method calls.

Methods inherited

This class inherits methods from the following classes:
  • java.lang.Object

No comments:

Post a Comment