I'm trying to compile a simple latex using LaTexTools package, and when I press cmd-B, I get the following error. I've googled this error and all the answers I've read have to do with java files, which I don't have here. I'm not sure how I should go about fixing this.
Error: Could not find or load main class test
[Finished in 0.1s with exit code 1]
[cmd: ['java', 'test']]
[dir: /Users/Username/Desktop]
[path: /Users/Username/Projects/reedsnotes/google-cloud-sdk/bin:/Users/Username/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin]
Related
I'm building a react native app that uses the react-native-vision-camera by Mrousavy (https://github.com/mrousavy/react-native-vision-camera) and I'm trying to create a frame processor plugin, following this guide https://mrousavy.com/react-native-vision-camera/docs/guides/frame-processors-plugins-android, which is basically a piece of native code, in this case Kotlin, that process the camera stream, frame by frame.
However, I've tried it several times and I keep getting this error related to Kotlin/Java code:
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
/home/luciano/wildsense/nam-vital-signs/rn/RNCamera0/android/app/src/main/java/com/rncamera0/MainApplication.java:16: error: cannot find symbol
import com.rncamera0.BasicFrameProcessorPluginPackage;
^
symbol: class BasicFrameProcessorPluginPackage
location: package com.rncamera0
/home/luciano/wildsense/nam-vital-signs/rn/RNCamera0/android/app/src/main/java/com/rncamera0/MainApplication.java:33: error: cannot find symbol
packages.add(new BasicFrameProcessorPluginPackage());
^
symbol: class BasicFrameProcessorPluginPackage
Note: /home/luciano/wildsense/nam-vital-signs/rn/RNCamera0/android/app/src/debug/java/com/rncamera0/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
As far as I understand, there's a problem with how I'm importing and using the class BasicFrameProcessorPluginPackage but nothing of what I've tried fix it.
The file that contains the error (MainApplication.java), and the two files for the code I want to add (BasicFrameProcessorPlugin.kt and BasicFrameProcessorPluginPackage.kt) are in the same directory(.../android/app/src/main/java/com/rncamera0), and all of them have package com.rncamera0 as the first line.
Being that said, I will appreciate any help to find the solution to the error.
I'm trying to install Logstash in my system and when I'm trying to run logstash.bat,
I'm getting the below error:
Error: Could not find or load main class 7.1.0\logstash-7.2.0\logstash-7.2.0\log stash-core\lib\jars\animal-sniffer-annotations-1.14.jar;D:\ELK
Whats the reason?
I have added the below code on the logstash.bat file as well.
set JAVA_HOME=path\to\custom_jdk_folder\jdk_8u161set
CLASSPATH=%JAVA_HOME%\bin
But the error still exists.
The reason is that ... somehow ... the batch file has gotten the Java command line wrong. It looks like it has misinterpreted something as the class name.
The current version of the logstash.bat file is here. As you can see, it is assembling the Java command line from a variety of things including:
parameters on the command line,
the logstash "jvm.options" file, and
the list of logstash's JAR files from "logstash-core\lib\jars"
It is unclear what has actually gone wrong, but this kind of problem often happens if there is an unexpected (unquoted) space in the Java command line.
My recommendation would be to debug what the BAT file is actually doing, starting by finding out what the command line actually looks like.
Also, take a look at the explanation of what the command line should look like in:
What does "Could not find or load main class" mean?
I'm just starting out with Scala and have been following its Getting Started instructions. The second part of the instruction involves pulling the hello-world template by running the sbt new scala/hello-world.g8 command.
My problem is that it keeps on giving me this error:
Error: Could not find or load main class Anne
Caused by: java.lang.ClassNotFoundException: Anne
I'd like to know the reason for this, as well as any possible fix I might use.
The following is my insight and attempts on fixing this problem.
Insight:
1. I might have a problem with java installation/scala/sbt installation that needs this class Anne since even with other sbt commands like sbt sbtVersion I get the same error
Attempts:
1. Change command to retrieve from full url:
sbt new https://github.com/scala/hello-world.g8
2.(Edit): Previously I thought the repository scala/hello-world.g8 did not exist and tried getting from other repositories with no luck and with the same error as above. However it was pointed out below that the repository actually exists in this url https://github.com/scala/hello-world.g8, thanks Dmytro Mitin.
I was looking into the incorrect account (sbt) instead of (scala)
(Edit): Day 2
3. Uninstall/Reinstall sbt -- still getting the error
4. Checked if java running properly by compiling sample code and running ( successful )
I was actually running the command in Visual Studio Code's bash terminal. I tried running it with cmd and everything's now working fine.
I have recently made a project using LWJGL 3 but have run into a wall. I have looked all over but cannot seem to figure out why calling GL20.glShaderSource(shaderId, shaderCode) and then subsiquently GL20.glCompileShader(shaderId) returns an error. The error that I receive makes it appear as though lwjgl cannot discern the path to the shader files:
LWJGL Version 3.1.2 build 13
java.lang.Exception: ERROR COMPILING SHADER CODE: VERTEX SHADER FAILED TO
COMPILE WITH THE FOLLOWING ERRORS:
ERROR: 0:1: ERROR(#132) SYNTAX ERROR: "/" PARSE ERROR
ERROR: ERROR(#273) 1 COMPILATION ERRORS. NO CODE GENERATED
at com.wilby.model.ShaderProgram.createShader(ShaderProgram.java:47)
at com.wilby.model.ShaderProgram.createVertexShader(ShaderProgram.java:24)
at com.wilby.Renderer.initialise(Renderer.java:62)
at com.wilby.Game.initialise(Game.java:46)
at com.wilby.Game.loop(Game.java:23)
at com.wilby.Main.run(Main.java:27)
at com.wilby.Main.main(Main.java:16)
However it still makes this error even when the files do not need any prefix to reach it. Like I say, I am completely stumped.
The link to my project is here.
I found the solution. You have to read the file and use that as the string in the shader source method. Facepalm.
So, here's my problem. I've got my ANTLR4 code successfully compiled, without errors and now I want to test it out. The ANTLR4 Documentation tells me, to test my applications, I shall do this:
java org.antlr.v4.runtime.misc.TestRig
I've tried this and got following error:
Error: Main Class org.antlr.v4.runtime.misc.TestRig couldn't be found or load.
I've checked if my CLASSPATH wasn't set, but everything was correctly set as it should be. I also tried moving the file directly to my test folder and opened CMD there and tried it again, I occur the same error. Searching in the Internet didn't help, as no one seemed to have occurred this error with ANTLR4 before.
Specs:
Java 1.7.0.55
ANTLR 4.4
There seems to be something wrong with your classpath, contrary to your belief everything is okay.
When I download the ANTLR 4 JAR and run TestRig:
wget http://www.antlr.org/download/antlr-4.4-complete.jar
...
java -cp antlr-4.4-complete.jar org.antlr.v4.runtime.misc.TestRig
I see the following on my console:
java org.antlr.v4.runtime.misc.TestRig GrammarName startRuleName
[-tokens] [-tree] [-gui] [-ps file.ps] [-encoding encodingname]
[-trace] [-diagnostics] [-SLL]
[input-filename(s)]
Use startRuleName='tokens' if GrammarName is a lexer grammar.
Omitting input-filename makes rig read from stdin.