I'm attempting to learn how to use Junit testing through the terminal and so far, I'm stuck in the post installation process. I'm following this tutorial link as of now and I'm pretty sure I've done all the steps in it but my terminal keeps giving me the warning at the javac command that several packages are missing from org.Junit. Help please?
https://www.tutorialspoint.com/junit/junit_quick_guide.htm
Related
I am trying to install JavaFX and in particular just run this application. I've been using Java for a while and I have to compile from console since IntelliJ just won't load in my laptop. Whenever I try compiling with "javac HelloFX.java" I get a lot of errors and in particular error: package javafx.application does not exist. This is what my java folder looks like
Java Folder
I also already set up a path C:\Program Files\Java\javafx-sdk-18.0.1\lib
I really have no clue as to what I am doing wrong, and the solutions I've been able to find seem rather complex, or use IntelliJ tools. Thank you in advance.
Even if IntelliJ does not work for you, you could still use either Maven or Gradle to build your project which would already simplify things a lot. You should also have a look at the official documentation.
https://openjfx.io/openjfx-docs/
I recently can't run any of my java programs an JUnit test anymore. Eclipse gives me this vague error code and I can't seem to find the solution
Using: Java, IntelliJ Community Edition, Azure DevOps, Ubuntu agent
Goal: To see accurate charted results of tests run either automatically when a pipeline is triggered, manually, or locally if a test is run locally in IDE
Steps so far:
tried in-built vs test as there was tons of documentation on it but it seems that's only for windows agents (and possibly only .net?) neither of which is an option. Link1. Link2.
installed cucumber-html-report app to azure devops
added cucumber dependencies to pom.xml and added the following code main runner
#CucumberOptions(features="classpath:LoginTest.feature", plugin={"pretty", "html:target/cucumber-html-report", "json:target/cucumber.json", "junit:target/cucumber.xml", "rerun:target/rerun.txt"})
tests run and output but when you open the file, there's no formatting (just raw js, html, etc)
I've spent so long on what seems like such a simple task. I suspect it's at least in part due to the fact that I'm still familiarising myself with Cucumber and Azure DevOps so I'm hoping someone will see something I've missed. At this point I've thrown everything I could find on Google at it and nothing has worked successfully. Any and all help is very much appreciated
I got the answer. It was this section:
"html:target/cucumber-html-report",
It was missing the .html at the end which is why I seemed to be following the instructions, getting some output, but not producing the expected result
I recently downloaded a portable edition of Notepad++ and copied Java files in order to be able to use it for java development on the go. I got the plugins I needed, but can't get the code to compile or run. This is the code I have for the script to run and compile the java code:
cd "$(CURRENT_DIRECTORY)"
"F:\Java\jdk1.7.0_11\bin\javac.exe" $(FILE_NAME)
"F:\Java\jdk1.7.0_11\bin\java.exe" $(NAME_PART)
I'm getting an error that says
CreateProcess() failed with error code 2: The system cannot find the
file specified.
I've tried multiple solutions and tinkered with the code to try and solve it, but nothing has worked. What am I doing wrong?
Is there a way to stop a headless eclipse build for java using the apt compiler if an error has occurred?
A bit of background:
I am trying to build my java project from the command line using
C:\eclipse\eclipsec -nosplash -application org.eclipse.jdt.apt.core.aptBuild -data "../.." -build JavaMain
However, I have recently noticed this compiles my binary even when there are errors in the project such as missing files or missing variables.
I have tried adding -Declipse.exitOnError or removing the -nosplash but it still continues on like a runaway freight train. I have looked for documentation on eclipse apt but all I can find is two pages in their help index which shows me the exact same command I am already using. I checked some other stack overflow questions such as
Build Eclipse Java Project from Command Line
which recommend the same command.
I know that eclipse builds can be done using ant but I was kind of hoping to keep it my project simple with a single command. I know I have to be missing something, there has to be a way for a compiler to report errors.
Also please do not hesitate to correct me on anything I have forgotten to add to this question, this is my first stack overflow post so I am bound to have missed something.