GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - juniffiro/java-defineClass: ClassLoader defineClass utility.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
classes
classes
 
 
src/ua/juniffiro/cl/definecl
src/ua/juniffiro/cl/definecl
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Java defineClass utility

defineClass() is a protected method of the ClassLoader class that allows you to convert a byte array into an instance of the class 'Class'.

I added the ability to use this method in any ClassLoader and extended its functionality.

How to use

/*
 * Example of creating a new instance
 * of a compiled Test.class
 * with defineClass()
 */
try {
    Class<?> testClass = Define.defineClass(
            getClass().getClassLoader(),
        Paths.get("./classes/Test.class"));
    testClass.newInstance();
} catch (Exception e) {
    throw new RuntimeException(e);
}

Open source

The project is an open source project distributed under the Apache License 2.0

Getting started

  1. Download the latest build from releases
  2. Read the FAQ and examples
  3. Enjoy!

Status

The project is in beta. Use at your own risk.

About

ClassLoader defineClass utility.

Topics

java-classesjava-classloaderjava-utility

Resources

Readme
Apache-2.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.