dynamic-compilation

How can I access the classes loaded by Java Web Start when dynamically compiling code?

I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start. //The exception evolver.core.model.change.execution.ExecutionException: Compilation failed! DynamicComparator.java:2: package evolver.core.model....

Options for dynamic compilation in Java 5

Are there any options other than Janino for on-the-fly compiliation and execution of Java code in v5? I know v6 has the Compiler API, but I need to work with the v5 VM. I essentially need to take a string containing a complete Java class, compile it and load it into memory. ...

VBCodeProvider not honoring OptionInfer in providerOptions?

I'm trying to dynamically compile some VB code in my C# project and I'm running into an issue with the VBCodeProvider. It doesn't seem to be honoring the OptionInfer flag that I'm putting in the providerOptions Dictionary. My code looks like this: var providerOptions = new Dictionary<string, string>(); providerOptions.Add("CompilerVer...

Dynamically generate classes at runtime in php?

Here's what I want to do: $clsName = substr(md5(rand()),0,10); //generate a random name $cls = new $clsName(); //create a new instance function __autoload($class_name) { //define that instance dynamically } Obviously this isn't what I'm actually doing, but basically I have unknown names for a class and based on the name, I want to ...

dynamic code compilation

I'm working on a program that renders iterated fractal systems. I wanted to add the functionality where someone could define their own iteration process, and compile that code so that it would run efficiently. I currently don't know how to do this and would like tips on what to read to learn how to do this. The main program is written ...

Is there a high level language with an interpreter, dynamic compiler and static compiler(e.g. like the c++ compiler) along with a multimedia library?

The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler. ...

Render ASPX page at runtime from database

Hi, Assuming the code below: public class DynamicAspxHandler : IHttpHandler { bool IHttpHandler.IsReusable { get { return false; } } void IHttpHandler.ProcessRequest(HttpContext httpContext) { string aspxContent = PlainASPXContent(); Page page = CreatePage(httpContext, aspxContent); page.ProcessRequest(...

How can i create a partial class at runtime?

How can i create a partial class at runtime? Example: I have a class public partial class A { } I want to create partial of my A class at runtime from an XML file. because I don't compile my project when any change in code. I know this is little meaning less but i need this. XOML files work for me? ...

Dynamic Java Compilation: BeanShell, Janino, JavaCompiler?

I am about to start developing a small Java desktop app. The app is just an engine for which the user provides Java classes to do the work (translating input to output). I would like the user to provide actual Java classes as files that can be loaded (and reloaded) on the fly. For this particular use, is there any reason why Java woul...

Specify Output Path for Dynamic Compilation

My dynamic compilation in Java 6 is working perfectly. However, I would like to change the output path. I have tried tons of things (I'll spare you) to no avail. Anyway, here's the working code String[] filesToCompile = { "testFiles/Something.java" }; JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); StandardJavaFileManager ...

How safe is an AppDomain sandboxed with SecurityPermissionFlag.Execution?

I have a plug-in vector established using System.AddIn that accepts the body of a pre-defined method, munges the method body into boilerplate code, generates the assembly and executes the method. The assembly references System and System.Core and is sandboxed with var pset = new PermissionSet(PermissionState.None); pset.AddPermission(n...

Web SITE publishing, dynamic compilation, smoke & mirrors

When you publish a web SITE in Visual Studio, in the dialog box that follows, you are given an option to "Allow this precompiled site to be updatable". According to MSDN, checking this option "specifies that all program code is compiled into assemblies, but that .aspx files (including single-file ASP.NET Web pages) are copied as-is to th...

How to dynamically load aspx code from a database?

I have content like this stored in a database <p>This a sample text. <%= Html.ActionLink("test", "myaction", "mycontroller") %></p> The content is part of my data repository, that is the reason I want to keep it inside the database. I would like to know how it is possible to render it and execute it at compile time. I am using it on ...

C/C++ line number

In the sake of debugging purposes, can I get the line number in C/C++ compilers? (standard way or specific ways for certain compilers) e.g if(!Logical) printf("Not logical value at line number %d \n",LineNumber); // How to get LineNumber without writing it by my hand?(dynamic compilation) Thanks ...

Java - Dynamic Compilation without JDK

im aware that j2se 6 has introduced the JavaCompiler API; however, it's cumbersome to use and require a JDK not JRE. Is it possible to do dynamic compilation without a JDK? (im very interested in all-in-memory compilation.) additionally, i expect the performance to be close to raw java code, so i don't want to use a scripting language ...

"This project cannot be viewed in object browser" on VS2008 - ASP.NET C# v4.0

Hello all, I have an application that compiles some code dynamically, and creates an assembly as well. I use the CodeDomProvider class with the CompilerParameters class in order to compile the files. I add references with the ReferencedAssemblies.Add() method, and I need to add adittional assemblies as well (MyApp.dll) - And as far as...

Dynamic ASP.NET application compilation

Hello all, My web application (ASP.NET v3.5 / C#) dynamically creates other asp.net applications (creates aspx, aspx.cs, classes, web.config, project.csproj file etc.). The thing is even after I configure the 'new' application folder as APPLICATION in the IIS, When I try to browse it, I get the following parser error: Could not load ty...