cvs0
cvs0
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
Well i mean thats just an internal minecraft class. we should be ignoring those when defining the classes i think
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
its a library that the jar references, so i dont think its bundled with it.
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
hey
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
Its closed source, but it pretty much recieves the buffer of a jar, then just passes the bytes to that load method.
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
need help
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
package cc.cnrm.loader.internal;

import java.util.Map;

public class CustomClassLoader extends ClassLoader {
private final Map<String, byte[]> classes;

public CustomClassLoader(ClassLoader parent, Map<String, byte[]> classes) {
super(parent);
this.classes = classes;
}

@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
Class<?> loadedClass = findLoadedClass(name);
if (loadedClass == null) {
byte[] classBytes = classes.get(name);
if (classBytes != null) {
return defineClass(name, classBytes, 0, classBytes.length);
}
}
return super.findClass(name);
}


public Class<?> defineClass(String name, byte[] b) {
return super.defineClass(name, b, 0, b.length);
}
}
package cc.cnrm.loader.internal;

import java.util.Map;

public class CustomClassLoader extends ClassLoader {
private final Map<String, byte[]> classes;

public CustomClassLoader(ClassLoader parent, Map<String, byte[]> classes) {
super(parent);
this.classes = classes;
}

@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
Class<?> loadedClass = findLoadedClass(name);
if (loadedClass == null) {
byte[] classBytes = classes.get(name);
if (classBytes != null) {
return defineClass(name, classBytes, 0, classBytes.length);
}
}
return super.findClass(name);
}


public Class<?> defineClass(String name, byte[] b) {
return super.defineClass(name, b, 0, b.length);
}
}
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
thats where we get the classes from the jar, and here is the custom class loader.
24 replies
JCHJava Community | Help. Code. Learn.
Created by cvs0 on 3/28/2025 in #java-help
Streaming jar in
24 replies
PPrisma
Created by cvs0 on 2/5/2025 in #help-and-questions
Any better way for data refreshing here?
i mainly mean displaying fresh data after performing updates through prisma, as some fields just update weirdly or need a reload.
7 replies
PPrisma
Created by cvs0 on 2/5/2025 in #help-and-questions
Any better way for data refreshing here?
Alright
7 replies
PPrisma
Created by cvs0 on 12/21/2024 in #help-and-questions
My items dont update on deletion.
If anyone could check it out, it would be greatly appreciated!
4 replies