Questions tagged [runtime]

Runtime is the time during which a program is running (executing)

In computer science, run time, run-time, runtime, or execution time is the time during which a program is running (executing), in contrast to other phases of a program's lifecycle such as compile time, link time, load time, etc.

A run-time error is detected after or during the execution of a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, storage allocation, code generation, and code optimization are typically done at compile time, but may be done at run time depending on the particular language and compiler.

Related

7799 questions
482
votes
26 answers

Runtime vs. Compile time

What is the difference between run-time and compile-time?
devforall
  • 7,217
  • 12
  • 36
  • 42
351
votes
11 answers

How to find where a method is defined at runtime?

We recently had a problem where, after a series of commits had occurred, a backend process failed to run. Now, we were good little boys and girls and ran rake test after every check-in but, due to some oddities in Rails' library loading, it only…
Matt Rogish
  • 24,435
  • 11
  • 76
  • 92
305
votes
25 answers

How to add property to a class dynamically?

The goal is to create a mock class which behaves like a db resultset. So for example, if a database query returns, using a dict expression, {'ab':100, 'cd':200}, then I would like to see: >>> dummy.ab 100 At first I thought maybe I could do it…
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304
226
votes
10 answers

java.lang.NoClassDefFoundError: Could not initialize class XXX

public class PropHolder { public static Properties prop; static { //code for loading properties from file } } // Referencing the class somewhere else: Properties prop = PropHolder.prop; class PropHolder is a class of my own. The class…
Leon
  • 8,151
  • 11
  • 45
  • 51
208
votes
8 answers

What is the C runtime library?

What actually is a C runtime library and what is it used for? I was searching, Googling like a devil, but I couldn't find anything better than Microsoft's: "The Microsoft run-time library provides routines for programming for the Microsoft Windows…
B.Gen.Jack.O.Neill
  • 8,169
  • 12
  • 51
  • 79
204
votes
14 answers

Java Runtime.getRuntime(): getting output from executing a command line program

I'm using the runtime to run command prompt commands from my Java program. However, I'm not aware of how I can get the output the command returns. Here is my code: Runtime rt = Runtime.getRuntime(); String[] commands = {"system.exe", "-send" ,…
user541597
  • 4,247
  • 11
  • 59
  • 87
178
votes
6 answers

Is there a "vim runtime log"?

Sometimes I try a customization/command in my vimrc. Everything seens to be correct, but it just doesn't work. It's difficult to know what's happening when vim starts, and know which command failed or not, so it's really difficult to debug what can…
175
votes
3 answers

Objective-C Runtime: best way to check if class conforms to protocol?

I have a Class (but no instance) and need to know if it conforms to a certain protocol. However, Class can be subclassed several times and class_conformsToProtocol() ignores protocols declared on superclasses. I could just use class_getSuperclass()…
CodeSmile
  • 64,284
  • 20
  • 132
  • 217
164
votes
5 answers

How do you calculate program run time in python?

How do you calculate program run time in python?
feisky
  • 1,863
  • 3
  • 14
  • 16
157
votes
12 answers

What's the difference between SDK and Runtime in .NET Core?

I've read many articles, including this one, yet I can't still figure out what's the difference, and they have not explained it either in simple terms or at all. Can someone please clarify what's the difference between .NET SDK and .NET…
143
votes
9 answers

Dynamically Changing log4j log level

What are the different approaches for changing the log4j log level dynamically, so that I will not have to redeploy the application. Will the changes be permanent in those cases?
Ravi
  • 7,939
  • 14
  • 40
  • 43
138
votes
8 answers

How fast is D compared to C++?

I like some features of D, but would be interested if they come with a runtime penalty? To compare, I implemented a simple program that computes scalar products of many short vectors both in C++ and in D. The result is surprising: D: 18.9 s …
Lars
  • 2,616
  • 3
  • 21
  • 18
136
votes
16 answers

Java Error opening registry key

I get this error when I try to do anything with Java in command prompt: Error opening registry key 'Software\JavaSoft\Java Runtime Environment.3' Error: could not find Java.dll Error: could not find Java 2 Runtime Environment I did screw around…
gFu
  • 1,579
  • 2
  • 11
  • 12
134
votes
5 answers

how to "reimport" module to python then code be changed after import

I have a foo.py def foo(): print "test" In IPython I use: In [6]: import foo In [7]: foo.foo() test Then I changed the foo() to: def foo(): print "test changed" In IPython, the result for invoking is still test: In [10]: import foo In…
user478514
  • 3,859
  • 10
  • 33
  • 42
126
votes
7 answers

Compile time vs Run time Dependency - Java

What is the difference between compile time and run time dependencies in Java? It is related to class path, but how do they differ?
Kunal
  • 2,929
  • 6
  • 21
  • 23
1
2 3
99 100