package speedychris2.Cheerio;
import cpw.mods.fml.common.Mod;
#Mod(modid = "Mod", name = "Mod", version = "1.0")
public class Cheerio {
}
This is the error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at GradleStart.main(GradleStart.java:59)
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
When I click on (GradleStart.java:59) It brings up a window telling me that 59 is not a valid line number in gradlestart then prompts me to attach a source, which of course I don't know. This is in eclipse with Forge ModLoader for Minecraft. I was following these videos, and it gave me an error.
Any help?
Related
I forked this apache solr and when I try to build as indicated in the README, I get the following errors:
When trying to install on java version 11
[root#192 solr]# ./gradlew assemble
Exception in thread "main" java.lang.IllegalArgumentException: error: release version 11 not supported
at jdk.compiler/com.sun.tools.javac.main.Arguments.reportDiag(Arguments.java:891)
at jdk.compiler/com.sun.tools.javac.main.Arguments.handleReleaseOptions(Arguments.java:311)
at jdk.compiler/com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:350)
at jdk.compiler/com.sun.tools.javac.main.Arguments.init(Arguments.java:246)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:185)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:119)
at jdk.compiler/com.sun.tools.javac.launcher.Main.compile(Main.java:364)
at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:176)
at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:119)
\nSomething went wrong. Make sure you're using Java 11 or later.
Then I decided to change the version to 1.8.0, having received the following:
[root#192 solr]# ./gradlew assemble
Unrecognized option: --source
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
\nSomething went wrong. Make sure you're using Java 11 or later.
Has anyone encountered the same problem, and if you managed to solve it, then how?
brew install leiningen
I got
Compiling joy.gui.DynaFrame
Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
Exception in thread "main" java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath: , compiling:(/private/var/folders/zm/swyymlvn4l7__d1rln_n391r0000gn/T/form-init7580966196782799989.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$compile$fn__5071.invoke(core.clj:5652)
at clojure.core$compile.invoke(core.clj:5651)
at user$eval20$fn__29.invoke(form-init7580966196782799989.clj:1)
at user$eval20.invoke(form-init7580966196782799989.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Compilation failed: Subprocess failed
I tried to reinstall but the issue does not solved.
When I type,
lein version
I got this:
Leiningen 2.9.1 on Java 12 Java HotSpot(TM) 64-Bit Server VM
I installed Java correctly but not sure where to start to fix this problem.
I looked around and it seems you are trying to run an old example from The Joy of Clojure, right?
The example needed a minor touch-up for me to be able to run it.
I created a new Leiningen project first with lein new app dynademo.
Inside the new project folder, I created the directories for the namespace: mkdir -p src/joy/gui
Created the file src/joy/gui/DynaFrame.clj
The Leiningen project that we just created with lein new ... uses Clojure 1.10, which doesn't seem to like one thing:
Replace the line with :prefix df- with :prefix "df-" (eg. wrap the value df- in quotes)
Save the file, and now you can launch the window from the REPL, like this:
$ lein repl
nREPL server started on port 44037 on host 127.0.0.1 - nrepl://127.0.0.1:44037
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
dynaframe.core=> (compile 'joy.gui.DynaFrame)
joy.gui.DynaFrame
dynaframe.core=> (def hello-frame (joy.gui.DynaFrame. "Hello"))
#'dynaframe.core/hello-frame
dynaframe.core=> (.show hello-frame)
nil
It looks like this:
(you will need to move/resize the window a bit, but you get the idea). Note: I'm using Java 8 (JDK 1.8.0_191) but it should work the same in JDK 12.
I try to install the RDRPOSTagger package through devtools.
devtools::install_github("bnosac/RDRPOSTagger", build_vignettes = TRUE)
Downloading GitHub repo bnosac/RDRPOSTagger#master
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.5 from http://cran.r-project.org/bin/windows/Rtools/.
√ checking for file 'C:\Users\X1\AppData\Local\Temp\RtmpUD2iwv\remotes70c59a944c1\bnosac-RDRPOSTagger-af51e38/DESCRIPTION' ...
- preparing 'RDRPOSTagger': (1.1s)
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'RDRPOSTagger_1.1.tar.gz'
Installing package into ‘C:/Users/X1/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package 'RDRPOSTagger' ...
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'RDRPOSTagger'
finding HTML links ... done
rdr_add_space_around_punctuations html
rdr_available_models html
rdr_model html
rdr_pos html
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
Error : package 'rJava' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/X1/Documents/R/win-library/3.5/RDRPOSTagger'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/X1/AppData/Local/Temp/RtmpUD2iwv/file70c8917649/RDRPOSTagger_1.1.tar.gz’ had non-zero exit status
Session Info:
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Java version on my CPU: java 10.0.2 64 bit
I try to use the qdap package which also needs rJava and this works just fine.
Error : package 'rJava' could not be loaded
This package is not loaded because JAVA_HOME is not set.
It can be done by first installing depending on your R (32 bit or 64 bit), Java 32 bit or 64 bit.
Download java from here: https://www.java.com/en/download/
Using this find JAVA_HOME address:
find.java <- function() {
for (root in c("HLM", "HCU")) for (key in c("Software\\JavaSoft\\Java Runtime Environment",
"Software\\JavaSoft\\Java Development Kit")) {
hive <- try(utils::readRegistry(key, root, 2),
silent = TRUE)
if (!inherits(hive, "try-error"))
return(hive)
}
hive
}
Load find.java and you will find the address for JAVA_HOME. Enter that address here:
Sys.setenv(JAVA_HOME='C:\\Your\\Java\\Directory')
library(rJava)
That should load the package rJava.
ERROR: loading failed for 'i386'
This error is maybe because you have downloaded both version of R (32 bit and 64 bit) and devtools tries to build for both of them.
You can use this:
devtools::install_github("mne-tools/mne-r", INSTALL_opts=c("--no-multiarch"))
I was also getting the similar type of error and after searching through I came across this solutions which worked for me.
I've been trying to load the qdap package, searching on here and troubleshooting, - realised Java couldn't be found. Uninstalled and downloaded Java - assuming I've done the correct 64 bit version as I am assuming I have RStudio 64 by checking
> R.Version()
$platform
[1] "x86_64-w64-mingw32"
I'm using "R version 3.4.3 (2017-11-30)" and Windows 10
Followed the advice here and set the following
Sys.setenv(JAVA_HOME='C:\\Program Files(x86)\\Java\\jre1.8.0_181')
ran this
find.java <- function() {
for (root in c("HLM", "HCU")) for (key in c("Software\\JavaSoft\\Java
Runtime Environment",
"Software\\JavaSoft\\Java
Development Kit")) {
hive <- try(utils::readRegistry(key, root, 2),
silent = TRUE)
if (!inherits(hive, "try-error"))
return(hive)
}
hive
}
Got this
find.java()
> find.java()
$`Security Baseline`
$`Security Baseline`$`1.4.2`
[1] "1.4.2_99"
$`Security Baseline`$`1.5.0`
[1] "1.5.0_99"
$`Security Baseline`$`1.6.0`
[1] "1.6.0_201"
$`Security Baseline`$`1.7.0`
[1] "1.7.0_191"
$`Security Baseline`$`1.8.0`
[1] "1.8.0_181"
Assumed this means Java can now be found. Also did this to check.
> system("java -version")
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Client VM (build 25.181-b13, mixed mode, sharing)
So try to load rJava again.
> library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object
'C:/Users/grant/OneDrive/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified module could not be found.
In addition: Warning message:package ‘rJava’ was built under R version 3.4.4
I've tried to follow the advice given in here and as shown above I know I have Java and a Java Run Time Environment and I have followed some of the suggested fixes already. I haven't done the PATH fixes as I'm not sure what exactly my PATH is, if it's wrong and how to change the PATH or put server in path. I've got as far as this but not sure how to decipher it.
> Sys.getenv("Path")[1] "C:\\Rtools\\bin;C:\\Program Files\\R\\R-3.4.3\\bin\\x64;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\grant\\AppData\\Local\\Microsoft\\WindowsApps;"
I've also tried downloading and using Dependency Walker and didn't understand it.
Have I made an error in my assumptions? Is there an issue with my Path and if so how does Path get changed? Or is there anything else I can try?
so i am just trying eclipse with processing and are having a problem with getting the java application to run.
I am basically following this tutorial: https://processing.org/tutorials/eclipse/
I have followed the steps but when i get to this part:
import processing.core.PApplet;
public class UsingProcessing extends PApplet{
public static void main(String[] args) {
PApplet.main("UsingProcessing");
}
}
No errors or nothing but when i press run (run as java application), a java program opens (no window, i can just see the program in the bottom part of the screen). Then it closes after a couple of seconds.
I also get the following errors:
java.lang.NoClassDefFoundError: com/apple/eawt/QuitHandler
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3119)
at java.base/java.lang.Class.getMethodsRecursive(Class.java:3260)
at java.base/java.lang.Class.getMethod0(Class.java:3246)
at java.base/java.lang.Class.getMethod(Class.java:2065)
at processing.core.PApplet.runSketch(PApplet.java:10707)
at processing.core.PApplet.main(PApplet.java:10504)
at processing.core.PApplet.main(PApplet.java:10486)
at UsingProcessing.main(UsingProcessing.java:6)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.QuitHandler
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 9 more
That part of code should at least give me an empty sketch but i get nothing..
This guy got it to work but i cant.. https://www.youtube.com/watch?v=0cqSjyvA8EY
I can assure you that i have imported the processing library correct, so that is not where the problem lays. I believe that it is some problem with my java? I am using a macbook pro and the following java:
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Thankful for all the help and I am kind of new to this so please be gentle if anything is wrong!
EDIT:
I have also tried with IntelliJ without luck, the same thing, java opens for a brief moment and then closes. This video was my guide: https://www.youtube.com/watch?v=_h2GZgnPcnM
I can assure you that i have imported the processing library correct, so that is not where the problem lays.
You need more than just the core.jar library. In your case you need whatever .jar file contains the com/apple/eawt/QuitHandler class.
This answer says that the .jar you're looking for comes with the Mac JDK. Try adding that .jar file to your classpath.
So i believe the problem is sort of solved. The problem was (i think) with the java that apple uses(?). So i downgraded to the Processing 2 core.jar and everything worked fine.
Found here: https://github.com/processing/processing/issues/5371
and a link that i did not fully understand : https://github.com/processing/processing/wiki/Supported-Platforms#java-9
The guy there suggests that you should downgrade your jdk(?), but I think that it was processing 2 that was discussed (when i did that it did not work). So for now, everything in eclipse done with processing has to be done with processing 2.
This is strange because the tutorial on processings website made it work with processing 3
EDIT: the previous answer was asked more than five years ago..