Jump to content

[General] Trouble setting up dev environment for IntelliJ in Linux


Cerandior

Recommended Posts

Okay so getting some specific details out first:

Linux OS: Manjaro 19.0.1 XFCE

Java Version: openjdk version "1.8.0_242"

Gradle Version: Gradle 6.1.1

So what is the problem? Well, I have my dev environment already set up on Windows. I just recently installed Manjaro on dual boot with Windows on my machine as I needed Linux for some other (uni) projects of mine. I like to delve into minecraft modding from time to time as a fun way of practicing my (newly acquired) java knowledge. Because I am spending a lot of time in Linux at the moment because of the other projects, I decided to set up the dev environment here as well so I don't have to keep switching between Windows and Linux just to do some minecraft modding.

I thought it wouldn't take me long. Just cloned my github repo into some folder, imported the project in intellij through the build.gradle file and so far so good. Now at this point in Windows, you just run gradlew genIntellijRuns in the intellij terminal (you can probably use powershell too) and you are ready to go. In Linux, I wasn't able to do that because the gradlew command was not being recognized. I tried running that through the System's terminal as well and gave me the same error.

I also tried to run the command with the gradlew file that is present in the project directory like this: ./gradlew genIntellijRuns however that gave me another error:

 

Spoiler

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

 

So I did some "research" online, and apparently you have to build the gradle wrapper? I really don't know what gradle is, or what the gradle wrapper is because I have never had any experience with it outside minecraft modding. Even here, although it might be an essential part of the project, it is barely touched on by the developer apart from building the project so I never felt the need to look for more information related to it.

Anyway, I installed gradle on my Linux, headed over to the terminal again, navigated to my project folder and ran gradle wrapper to build the wrapper. This initially seemed to work, however it didn't. It ended up giving me this error:

Spoiler


> Configure project :
The version property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the archiveVersion property instead.
        at build_erdyqb214r3s3mfl66bekr7ry$_run_closure3$_closure16.doCall(/home/"my-username"/vanilla-extended/build.gradle:118)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
New Dep: net.minecraftforge:forge:1.14.4-28.1.96_mapped_snapshot_20190719-1.14.3

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'vanilla-extended'.
> Failed to notify project evaluation listener.
   > org.gradle.internal.nativeintegration.services.FileSystems.getDefault()Lorg/gradle/internal/nativeplatform/filesystem/FileSystem;


 

 

 

So I am assuming, I can't build the wrapper with my installed gradle version because the forge gradle version is seemingly older? Do I have to find another version for gradle now, or is there something I can modify inside build.gradle that can fix this problem?

Thank you in advance.

 

 

Link to comment
Share on other sites

Ok, so I managed to generate the runs by downloading version 4.10 of gradle. Running gradle wrapper command at the folder of my project, then ./gradlew genIntellijRuns

However, now when I try to run the game in IntelliJ I am getting this error:
 

Spoiler

[02Mar2020 15:51:01.196] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190829.143755, --fml.mcVersion, 1.14.4, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 28.1.96, --version, MOD_DEV, --assetIndex, 1.14, --assetsDir, /home/"my-user"/.gradle/caches/forge_gradle/assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[02Mar2020 15:51:01.203] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 4.1.0+62+5bfa59b starting: java version 1.8.0_242 by Oracle Corporation
[02Mar2020 15:51:01.593] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[02Mar2020 15:51:01.676] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.ExceptionInInitializerError
[02Mar2020 15:51:01.678] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at sun.nio.fs.LinuxFileSystem.newWatchService(LinuxFileSystem.java:47)
[02Mar2020 15:51:01.679] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.FileWatcher$WatchedDir.<init>(FileWatcher.java:218)
[02Mar2020 15:51:01.679] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.FileWatcher$WatchedDir.<init>(FileWatcher.java:210)
[02Mar2020 15:51:01.680] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.FileWatcher.lambda$addWatch$0(FileWatcher.java:81)
[02Mar2020 15:51:01.680] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
[02Mar2020 15:51:01.681] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.FileWatcher.addWatch(FileWatcher.java:81)
[02Mar2020 15:51:01.681] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.FileWatcher.addWatch(FileWatcher.java:69)
[02Mar2020 15:51:01.682] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.AutoreloadFileConfig.<init>(AutoreloadFileConfig.java:18)
[02Mar2020 15:51:01.682] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at com.electronwill.nightconfig.core.file.GenericBuilder.build(GenericBuilder.java:242)
[02Mar2020 15:51:01.683] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.fml.loading.FMLConfig.loadFrom(FMLConfig.java:56)
[02Mar2020 15:51:01.684] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.fml.loading.FMLConfig.load(FMLConfig.java:69)
[02Mar2020 15:51:01.684] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.fml.loading.FMLServiceProvider.initialize(FMLServiceProvider.java:81)
[02Mar2020 15:51:01.685] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68)
[02Mar2020 15:51:01.685] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107)
[02Mar2020 15:51:01.686] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at java.util.HashMap$Values.forEach(HashMap.java:981)
[02Mar2020 15:51:01.687] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107)
[02Mar2020 15:51:01.687] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59)
[02Mar2020 15:51:01.688] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.run(Launcher.java:75)
[02Mar2020 15:51:01.688] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
[02Mar2020 15:51:01.689] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101)
[02Mar2020 15:51:01.690] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.NullPointerException
[02Mar2020 15:51:01.690] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
[02Mar2020 15:51:01.691] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.lang.Runtime.loadLibrary0(Runtime.java:871)
[02Mar2020 15:51:01.691] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.lang.System.loadLibrary(System.java:1124)
[02Mar2020 15:51:01.692] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.nio.fs.LinuxWatchService$1.run(LinuxWatchService.java:462)
[02Mar2020 15:51:01.693] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.nio.fs.LinuxWatchService$1.run(LinuxWatchService.java:460)
[02Mar2020 15:51:01.693] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.security.AccessController.doPrivileged(Native Method)
[02Mar2020 15:51:01.694] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.nio.fs.LinuxWatchService.<clinit>(LinuxWatchService.java:460)
[02Mar2020 15:51:01.694] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     ... 20 more


Does it have to do anything with the java version?
 

Edited by Cerandior
Link to comment
Share on other sites

24 minutes ago, Cerandior said:

Ok, so I managed to generate the runs by downloading version 4.10 of gradle. Running gradle wrapper command at the folder of my project, then ./gradlew genIntellijRuns

The point of the gradle wrapper is that you do not need to download Gradle. It downloads the appropriate gradle version if necessary.

 

25 minutes ago, Cerandior said:

However, now when I try to run the game in IntelliJ I am getting this error:

Update Forge. This bug was fixed.

  • Thanks 1
Link to comment
Share on other sites

39 minutes ago, diesieben07 said:

The point of the gradle wrapper is that you do not need to download Gradle. It downloads the appropriate gradle version if necessary.

That was the problem, I couldn't run the command without installing the proper gradle version beforehand. I don't know why.

 

EDIT: It's highly likely I wasn't executing the command properly.
 

Quote

Update Forge. This bug was fixed.

Thank you, moved over to the latest build for 1.14 and it is working fine now.

Edited by Cerandior
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Okay I got on the discord server and followed there steps and got it to start working, however the log is constantly being filled with this error code. It is creating additional copies of the config file, up to 5 copies.
    • I would like to force the pose of a living entity to a standing position (i.e. Pose.STANDING) when it is riding a certain vehicle. I have tried to call Entity#setPose every tick via LivingTickEvent, but the living entity remains in a sitting position. Here is my code: // I made it a low-priority event because I was wondering if the code should be executed at the end of each tick. @SubscribeEvent(priority = EventPriority.LOWEST) public static void livingTickEvent(LivingEvent.LivingTickEvent event) { LivingEntity livingEntity = event.getEntity(); if (!livingEntity.level.isClientSide && livingEntity.getVehicle() instanceof TheVehicle) { livingEntity.setPose(Pose.STANDING); } }   By the way, I am aware there is a setForcedPose method, but it's only for the Player class.
    • I am trying to get a Private Vault Hunters 3rd edition up and running. The server launched fine before I pasted the Vault+Hunters+3rd+Edition-Update-10.0.1_Server-Files Contents into the file I made for the server info. Then after I pasted it I get the log information in the spoiler. I don't understand what I'm looking at. I'm using Forge 1.18.2, I also downloaded the most recent version of JDK.
    • Hey, my friends put together a custom modpack to use and asked me to set up a server to run it. Problem is, they didn't think to log which mods where client side only and which worked server side. Naturally, I only found this out when I actually attempted to run said server. There's quite a long list of them and, frankly, I have no idea which are causing the problem. I just run servers and install modpacks, not curate them. If anyone could help me identify the problem and what's causing the error, it would be greatly appreciated.   To make things a bit easier, I'm running the server in a docker container on a Ubuntu 20.04 server installation. Also, I'm using Java 17 and Forge ver 1.19.2 release 43.2.8 as that is the same version as the modpack, so everything should be working. Again, any help would be really appreciated. latest log: https://pastebin.com/f95NC0X7 All mods installed: https://pastebin.com/xy8d55kJ
    • I'm trying to install Forge for 1.12.2. The installer runs properly and says it installed forged succesfully, but when I go into the launcher there is no Forge profile and forge isn't in the version list when cresting a custom profile. In the versions folder in .minecraft the forge 1.12.2 folder is there, but it only has the .json file, it seems that the installer is not actually getting the .jar file. I tried with both the recommended and latest installers. I also tried downloading the universal .jar directly and pasting it into the versions folder but that didn't work either.   Installer log: JVM info: Oracle Corporation - 1.8.0_371 - 25.371-b11 java.net.preferIPv4Stack=true Found java version 1.8.0_371 Extracting json Considering minecraft client jar Downloading libraries Found 0 additional library directories Considering library net.minecraftforge:forge:1.12.2-14.23.5.2859   File exists: Checksum validated. Considering library org.ow2.asm:asm-debug-all:5.2   File exists: Checksum validated. Considering library net.minecraft:launchwrapper:1.12   File exists: Checksum validated. Considering library org.jline:jline:3.5.1   File exists: Checksum validated. Considering library com.typesafe.akka:akka-actor_2.11:2.3.3   File exists: Checksum validated. Considering library com.typesafe:config:1.2.1   File exists: Checksum validated. Considering library org.scala-lang:scala-actors-migration_2.11:1.1.0   File exists: Checksum validated. Considering library org.scala-lang:scala-compiler:2.11.1   File exists: Checksum validated. Considering library org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2_mc   File exists: Checksum validated. Considering library org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2_mc   File exists: Checksum validated. Considering library org.scala-lang:scala-library:2.11.1   File exists: Checksum validated. Considering library org.scala-lang:scala-parser-combinators_2.11:1.0.1   File exists: Checksum validated. Considering library org.scala-lang:scala-reflect:2.11.1   File exists: Checksum validated. Considering library org.scala-lang:scala-swing_2.11:1.0.1   File exists: Checksum validated. Considering library org.scala-lang:scala-xml_2.11:1.0.2   File exists: Checksum validated. Considering library lzma:lzma:0.0.1   File exists: Checksum validated. Considering library java3d:vecmath:1.5.2   File exists: Checksum validated. Considering library net.sf.trove4j:trove4j:3.0.3   File exists: Checksum validated. Considering library org.apache.maven:maven-artifact:3.5.3   File exists: Checksum validated. Considering library net.sf.jopt-simple:jopt-simple:5.0.3   File exists: Checksum validated. Considering library org.apache.logging.log4j:log4j-api:2.15.0   File exists: Checksum validated. Considering library org.apache.logging.log4j:log4j-core:2.15.0   File exists: Checksum validated. Considering library org.apache.logging.log4j:log4j-slf4j18-impl:2.15.0   File exists: Checksum validated. Building Processors Injecting profile Finished!
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.