Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invalid Package name #180

Open
fuma-nama opened this issue Oct 4, 2022 · 3 comments
Open

Invalid Package name #180

fuma-nama opened this issue Oct 4, 2022 · 3 comments

Comments

@fuma-nama
Copy link

fuma-nama commented Oct 4, 2022

Error is thrown in runtime when using in a Minecraft Mod
it seems that 'static' is not a valid package name

Exception in thread "main" java.lang.IllegalArgumentException: imgui.static: Invalid package name: 'static' is not a Java identifier
	at java.base/jdk.internal.module.Checks.requireTypeName(Checks.java:161)
	at java.base/jdk.internal.module.Checks.requirePackageName(Checks.java:72)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at java.base/java.lang.module.ModuleDescriptor$Builder.packages(ModuleDescriptor.java:2026)
	at cpw.mods.securejarhandler/cpw.mods.jarhandling.impl.ModuleJarMetadata.<init>(ModuleJarMetadata.java:29)
	at cpw.mods.securejarhandler/cpw.mods.jarhandling.JarMetadata.from(JarMetadata.java:41)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.moddiscovery.AbstractModProvider.lambda$createMod$0(AbstractModProvider.java:40)
	at cpw.mods.securejarhandler/cpw.mods.jarhandling.impl.Jar.<init>(Jar.java:143)
	at cpw.mods.securejarhandler/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:70)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.moddiscovery.AbstractModProvider.createMod(AbstractModProvider.java:38)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.moddiscovery.AbstractJarFileModLocator.lambda$scanMods$0(AbstractJarFileModLocator.java:19)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.SpinedBuffer$1Splitr.forEachRemaining(SpinedBuffer.java:356)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
	at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.moddiscovery.AbstractJarFileModLocator.scanMods(AbstractJarFileModLocator.java:19)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.discoverMods(ModDiscoverer.java:74)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:166)
	at MC-BOOTSTRAP/fmlloader@1.19.2-43.0.2/net.minecraftforge.fml.loading.FMLServiceProvider.beginScanning(FMLServiceProvider.java:86)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:112)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:100)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
	at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:102)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:55)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.run(Launcher.java:87)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at cpw.mods.bootstraplauncher@1.1.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
@elect86
Copy link
Collaborator

elect86 commented Nov 3, 2022

Sorry for the delay, I just updated it, could you give it a try?

implementation("kotlin.graphics:imgui-core:1.79+05")
implementation("kotlin.graphics:imgui-gl:1.79+05")
implementation("kotlin.graphics:imgui-glfw:1.79+05")

@fuma-nama
Copy link
Author

fuma-nama commented Nov 7, 2022

Nice, but I am getting "Could not resolve" error on build even after adding more repositories

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val lwjglVersion = "3.3.1"
val lwjglNatives = "natives-windows"
plugins {
    kotlin("jvm") version "1.7.20"
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("https://dl.bintray.com/kotlin/kotlin-dev")
    maven("https://oss.sonatype.org/content/repositories/snapshots/")
    maven("https://jitpack.io")

    maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")
}

dependencies {
    implementation(platform("org.lwjgl:lwjgl-bom:$lwjglVersion"))
    testImplementation(kotlin("test"))

    implementation("kotlin.graphics:imgui-core:1.79+05")
    implementation("kotlin.graphics:imgui-gl:1.79+05")
    implementation("kotlin.graphics:imgui-glfw:1.79+05")

    implementation("org.lwjgl", "lwjgl")
    runtimeOnly("org.lwjgl", "lwjgl", classifier = lwjglNatives)
}

tasks.test {
    useJUnitPlatform()
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
}

@elect86
Copy link
Collaborator

elect86 commented Nov 7, 2022

Is the project public?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants