I want to run cucumber in my java project directly through jruby without having to use Ant or Maven. I have installed cuke4duke through jruby and have it up and running. I can run the feature files but I have problem in getting my step definition recognized by cucumber. Although I have the step definition folder, implementations are shown as pending to me.
What can I do to resolve this.
It's not supported yet, feel free to vote for this feature request.
Related
I'm just about starting to learn Java. Reading about, I installed Netbeans.
Running Apache Netbeans IDE 11.2.
The Java version is 13.0.2.
I'm promptly follow the Quickstart guide on the netbeans website.
File>>New project>> Java >> Java Application.
Errhmm, I don't have this 'Java' option. All I have is
So what's the difference between Java & Java with Maven/Cradle/Ant . At this point in time, I intend to start with basics of Java programming and then move on from there. SO which option am I meant to be starting with? If I'm missing Java, how can I add it ? Going through the installation procedures didn't give me any option to choose from.
p:s - this is all running on Mac OS Catalina
You can start with any of Java with ... option. I use Java with Ant option.
Maven, Gradle, Ant are build-tool addons i.e. they provide additional support if you intend to use any of these as your build tool.
When you choose Java with Ant option, it will let you create, compile, debug and run your Java programs without requiring anything additional. After using this option, you will get an interface as shown in the screenshot given below:
Maven, Gradle and Ant are build tool which allows you to compile, unit test, package and (if you like) even deploy your Java applications (they do support other languages btw).
I suggest you to start with one of those (Maven is very popular and probably a little bit easier than the others) instead of relying on your Java IDE specific features.
Once you master a build tool you can change IDE (IntelliJ is also a very good option ;-)) and will still work as before. You also find plenty of resources and help (like Stackoverflow) if you need hit some problems.
Best of luck!
Building Java projects straight from the IDE in IntelliJ has been nice. It's fast and it just works. I wasn't able to find any documentation on how IntelliJ does these default builds. I'm guessing it uses Ant? What I want to do is automate this fast and painless build process for anyone who downloads my project. Is that possible?
I've usually used Maven, but it's very slow and error prone. I actually wasn't even able to convert this to a Maven project, because Maven refuses to find JUnit despite setting up the dependency according to examples in the official docs. I also tried to generate Ant build files from the IDE, but those do not work out of the box and after googling a bit, seems like that is not a good approach?
IntelliJ IDEA has its own build system, called JPS. It has limited support for automatic download of dependencies and it's really hard to invoke from the command line, so it's unlikely to be the best option for everyone who downloads your project, unless you want to force them to use IntelliJ IDEA.
In the Selenium Tutorial on Guru99 in the WebDriver installation tab (http://www.guru99.com/installing-selenium-webdriver.html), one of the installation steps says to install the Eclipse IDE. I was wondering if I could get around that and just run Selenium WebDriver for Java without using any sort of IDE.
You don't require any IDE to run your selenium scripts..
however using IDE like eclipse will make your work easier and faster
There are two things:
Designing the Selenium scripts: Initially when you are developing your selenium script, the IDE will make job easier for you when you want to setup things, (like adding the Selenium server jar to your Reference libraries etc.)
Executing the Scripts: Once you are done with the designing of the script. Since you are using Java, You can export your project into a Jar (or an Executable jar) and run it directly like any other Jar file. While exporting into Jar, don't forget to choose the option of 'Export all required libraries into Jar'.
Allowing us to use a programming language, Java in this case, Selenium allows us to play around and do almost all the stuffs one can do with the Core programming language.
Hope it helps :)
However not a requirement for Selenium, it integrates nicely with testng and with testng plugin for Eclipse, it becomes much easier to run tests. Also, if you are using Java as the language for implementing the tests, Eclipse is great tool.
recently I am using Drools in eclipse. When I was running program, there is one exception:
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:310)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:295)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:184)
at org.drools.compiler.PackageBuilderConfiguration.(PackageBuilderConfiguration.java:162)
at org.drools.compiler.PackageBuilder.(PackageBuilder.java:277)
at org.drools.compiler.PackageBuilder.(PackageBuilder.java:205)
at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:46)
at com.adsc.cybersage.rules.DroolEngineInit.readKnowledgeBase(DroolEngineInit.java:48)
at com.adsc.cybersage.rules.DroolEngineInit.initializeDrools(DroolEngineInit.java:32)
I search online and found that this is because I didn't add eclipse JDT library org.eclipse.jdt.core.jar, then I add this jar and the program works well. But I don't want to add eclipse JDT Library because its license is strict. So is there any alternative jar which is under a not strict license I can use?
I am compiling and running Drools without org.eclipse.jdt.core.jar, calling javac and java from the command line (actually, a shell script).
PROTOBUF=protobuf-java-2.4.1.jar
root=/extra/drools-distribution-5.5.0.Final/binaries
tag=5.5.0.Final
export CLASSPATH=".:$root/drools-core-${tag}.jar:$root/knowledge-api-${tag}.jar:$root/knowledge-internal-api-${tag}.jar:$root/drools-compiler-${tag}.jar:$root/antlr-2.7.7.jar:$root/antlr-3.3.jar:$root/antlr-runtime-3.3.jar:$root/ecj-3.5.1.jar:$root/mvel2-2.1.3.Final.jar:/extra/quartz-1.8.3/quartz-1.8.3.jar:$root/drools-decisiontables-${tag}.jar:$root/drools-templates-${tag}.jar:$root/xstream-1.4.1.jar:$root/jxl-2.6.10.jar:$root/slf4j-api-1.6.4.jar:$root/$PROTOBUF"
Then javac and java are called.
Of course, when you are running within Eclipse, you may indeed need Eclipse stuff. You can develop and test under Eclipse and then compile DRL and execute your application using the aforementioned technique.
I am looking for a solution to build java project using gant inside eclipse, i searched web but didn't find any thing. May because I am not searching in the right direction because I have no idea about gant.
Actually I got all the java source and build.gant script from another developer, I made some minor changes in the java source only and since then looking for a way to build the solution without any luck.
I also tried to build solution using command line, downloaded binaries from ant and gant websites but for some reasons it's unable to find ANT_HOME variable, which I have already added as an environment variable.
Gant is a tool for scripting Ant tasks using Groovy instead of XML to specify the logic.
Download GANT from the Codehaus website and build using it.
http://gant.codehaus.org/