bytecode

Is BCEL == monkeypatching for java?

a colleague pointed me the other day to BCEL which , as best I can tell from his explanation and a quick read, a way to modify at run time the byte code. My first thought was that it sounded dangerous, and my second thought was that it sounded cool. Then I gave it some more thought and I recalled the codinghorror post on monkey-patchin...

What are advantages of bytecode over native code?

It seems like anything you can do with bytecode you can do just as easily and much faster in native code. In theory, you could even retain platform and language independence by distributing programs and libraries in bytecode then compiling to native code at installation, rather than JITing it. So in general, when would you want to execu...

Differences between MSIL and Java bytecode?

I'm new to .Net and I'm trying to understand the basics first. What is the difference between MSIL and Java bytecode? ...

Is there a good reference on how java executes bytecode?

I'm interested in how java organizes memory and executes code (like what gets put in the stack or the heap), from the start of main, to assigning variables, calling functions, passing parameters, returning values, instantiating objects, etc. Has anyone found a good, beginner-friendly article/reference on it? Preferably online, of course,...

Is there an Eclipse add-on to build a python executable for distribution?

I want to build an executable to distribute to people without python installed on their machines. Is there an add-on to Eclipse that allows this? I couldn't find one. If not, do you have a builder that you recommend that would make it easy to go to my python project directory created in Eclipse, and bundle it all up? Thanks, Mark ...

What CLR/.NET bytecode tools exist?

I'm well aware of Java tools for manipulating, generating, decompiling JVM bytecode (ASM, cglib, jad, etc). What similar tools exist for the CLR bytecode? Do people do bytecode manipulation for the CLR? ...

C++ performance vs. Java/C#

My understanding is that C/C++ produces native code to run on a particular machine architecture. Conversely, languages like Java and C# run on top of a virtual machine which abstracts away the native architecture. Logically it would seem impossible for Java or C# to match the speed of C++ because of this intermediate step, however I've...

Create a BCEL JavaClass object from arbitrary .class file

I'm playing around with BCEL. I'm not using it to generate bytecode, but instead I'm trying to inspect the structure of existing compiled classes. I need to be able to point to an arbitrary .class file anywhere on my hard drive and load a JavaClass object based on that. Ideally I'd like to avoid having to add the given class to my cla...

Best Library for programatically inspecting Java class files

I'm working on a project where we're doing a lot of remote object transfer between a Java service and clients written in other various languages. Given our current constraints I've decided to see what it would take to generate code based on an existing Java class. Basically I need to take a .class file (or a collection of them) parse t...

How would you describe the difference between Managed/Byte Code and Unmanaged/Native Code to a Non-Programmer?

Sometimes it's difficult to describe some of the things that "us programmers" may think are simple to non-programmers and management types. So... How would you describe the difference between Managed Code (or Java Byte Code) and Unmanaged/Native Code to a Non-Programmer? ...

Why the Global Interpreter Lock?

What is exactly the function of Python's Global Interpreter Lock? Do other languages that are compiled to bytecode employ a similar mechanism? ...

Which library/program can be used to generate Java-bytecode?

I know about BCEL, but this project seems to be dead, as it had no releases for two years. And the Java-world moves on. For example JDK 1.6 has a new class-file-format. So what library can be used to create bytecode for the JVM. If no library, a program is ok too, if I can manipulate the generated code in detail, for example a bytecode-...

Java bytecode specification.

Is there a nice place for learning the JVM bytecode instruction set. The specification perhaps and maybe some tutorials? I ask because I would like to design a toy language and a compiler for it that generates JVM bytecode. Thanks for your knowledge and perhaps googling. ...

pyc to py files

hello, I wrote a lot of important python code for my project. unfortunately, I ran sed with wrong options and lost my files :( In repo these files are very old, but I have the pyc files. How can I convert pyc files to py? Thanks! ...

Java's Virtual Machine and CLR

As a sort of follow up to the questions called "Differences between MSIL and Java bytecode?" what is the (major) differences or similarity in how the Java Virtual Machine works versus how the .NET Framwork Common Language Runtime (CLR) works? Also, is the .NET framework CLR a "virtual machine" or does it not have the attributes of a vir...

From C Source to Java Bytecode?

I'm looking for a way to compile C source code into high-performance Java bytecode. I've successfully used NestedVM, but the performance hit is not acceptable for a project I'm working on. I've also seen various open source projects aimed at this problem and a couple of commercial products. This SO question deals with general problem o...

Adding a language to the AVM2

Hey there I'm interested in making a language to run on the AVM2 and I'm looking for advice on where to start. I do realize that this is by no means a trivial task, but I would like to give it a try and at the very least learn more about implementing a language along the way. I have messed around with ANTLR and have been reading up on ...

java: retrieve bytecode from in-memory to prevent hacking

How can i retrieve the bytecode and make a hash to see if someone has manipulated with my bytecode in-memory or on file? EDIT: Does signing the binaries protect the code from being modified and executed? As much as I want to protect my users from making sure they are running my software. I would also like to protect the program (server)...

Trouble examining byte code in MSVC++

I've been messing around with the free Digital Mars Compiler at work (naughty I know), and created some code to inspect compiled functions and look at the byte code for learning purposes, seeing if I can learn anything valuable from how the compiler builds its functions. However, recreating the same method in MSVC++ has failed miserably ...

How can I strip Python logging calls without commenting them out?

Today I was thinking about a Python project I wrote about a year back where I used logging pretty extensively. I remember having to comment out a lot of logging calls in inner-loop-like scenarios (the 90% code) because of the overhead (hotshot indicated it was one of my biggest bottlenecks). I wonder now if there's some canonical way to...