How to compile and run kotlin using notepad++ and NPPExec - kotlin

1.Can i do it
2.Can any body tellme a ready "script(NPPExec script)" to compile and run it.
3.So far i tried following these c and cpp styled script as fallows below
npp save
kotlinc "$(FULL_CURRENT_PATH)" -include-runtime -d "$(CURRENT_DIRECTORY)\$(NAME_PART).jar"
npp_run java -jar $(CURRENT_DIRECTORY)\$(NAME_PART).jar
and
npp save
kotlinc "$(FULL_CURRENT_PATH)" -include-runtime -d "$(CURRENT_DIRECTORY)\$(NAME_PART).jar"
java -jar $(CURRENT_DIRECTORY)\$(NAME_PART).jar"""
Didn't succeed though.

Related

Running Karate from karate.jar with cucumber reports

I want to run my karate tests using karate.jar.
Currently am using maven for execution. I have a runner class which handles cucumber reporting as mentioned in karate documentation.
java -jar karate.jar -T 5 -t ~#ignore -o /mydirectory/all.feature
When I change the test execution as above, is there a way I can get cucumber reports generated same as I was getting for maven?
my current execution is like this: mvn clean test -Dtest=TestRunner.java -Dkarate.env=UAT
when running the features using karate standalone jar, cucumber-html-reports will be generated default on target directory inside you karate.jar's directory
look for target\cucumber-html-reports in the directory where you have you karate.jar
java -jar karate.jar -T 5 -t ~#ignore /mydirectory/all.feature
karate also provides a -o flag in which the provided directory will be used to save reports
java -jar karate.jar -T 5 -t ~#ignore -o /mydirectory /mydirectory/all.feature

How to run tests by directory using the JUnit5 console launcher

I'm trying to run tests using the --select-directory option in junit-platform-console-standalone but tests aren't being discovered. The docs don't have examples for this so I'm a bit lost.
My project looks like this
/home/me/
source/com/mypackage/MyClass.java
unit-tests/com/mypackage/MyClassTest.java
integ-tests/com/mypackage/MyClassIntegTest.java
eclipse-bin/com/mypackage/
MyClass.class
MyClassTest.class
MyClassIntegTest.class
I can run tests with java -jar junit-platform-console-standalone.jar -cp $JUNIT_CLASS_PATH -c com.mypackage.MyClassTest succesfully.
I'm trying to run just the tests under unit-tests only. So far I've tried:
java -jar junit-platform-console-standalone.jar -cp $JUNIT_CLASS_PATH -d /home/me/unit-tests
java -jar junit-platform-console-standalone.jar -cp $JUNIT_CLASS_PATH -d /home/me/eclipse-bin
I even tried to discover them by file
java -jar junit-platform-console-standalone.jar -cp $JUNIT_CLASS_PATH -f /home/me/eclipse-bin/com/mypackage/MyClassTest.class
java -jar junit-platform-console-standalone.jar -cp $JUNIT_CLASS_PATH -f file:///home/me/eclipse-bin/com/mypackage/MyClassTest.class
But none of those discover any tests. How are we supposed to use the -d and -f switches?
Try
java -jar junit-platform-console-standalone.jar --class-path unit-tests:eclipse-bin --scan-class-path
after getting rid of all *Test.class files under eclipse-bin/.

Haxe: openfl test works but not lime build

I'm in the process of moving all my projects to individual modules in IntelliJ rather than having one module in the entire git repo, and my IntelliJ builds stopped working. I notice it uses lime builds even though my module is set to openfl (and always has as far as I know)
openfl test flash -debug
this works
lime build GassyRickAstley.xml flash -debug -verbose
this does not. Full gist of both -v
Lime Command-Line Tools (2.9.1)
Initializing project...
Using project file: GassyRickAstley.xml
Warning: Could not read HXCPP config: /Users/booboo/.hxcpp_config.xml
Using target platform: FLASH
Running command: UPDATE
- Embedding asset: removed for brevity
- Copying template file: removed for brevity
Running command: BUILD
- Running command: haxe -main ApplicationMain -cp /usr/local/lib/haxe/lib/flixel/git -D flixel=4.3.0 -cp /usr/local/lib/haxe/lib/openfl/3,6,1 -D openfl=3.6.1 -cp /usr/local/lib/haxe/lib/lime/2,9,1 -D lime=2.9.1 -cp /usr/local/lib/haxe/lib/actuate/1,8,7 -D actuate=1.8.7 -cp /usr/local/lib/haxe/lib/ash/1,5,4/src -D ash=1.5.4 -cp source -cp lib -cp /usr/local/lib/haxe/lib/openfl/3,6,1/extern -cp ../Krakel/source -cp ../../lib/HxAssert/src -D native-trace -D HXCPP_QUIET -D openfl-next -D tools=2.9.1 -D flash-use-stage -D no-compilation -D openfl-flash -D verbose=1 -D web --macro flixel.system.macros.FlxDefines.run() -swf-lib export/flash/obj/assets.swf -swf-version 11.8 -swf export/flash/bin/GassyRickAstley.swf -cp export/flash/haxe -debug
georges-mbp:Gassy Rick Astley booboo$
It doesn't seem like anything went wrong, but I'm pretty shit with analyzing terminal output.
For now I can just build manually, but not having breakpoints is gonna get pretty lame, pretty fast. Any help is appreciated.
Bonus question. When I run/test the project in open fl and close the game's window the active terminal process never ends. I have to close the terminal, reopen and cd my directory again. is there a way around this?
It looks like it may have worked. openfl test flash is similar to running openfl build flash && openfl run flash, which in turn should behave practically the same as lime build flash && lime run flash.
I think your lime build flash command is working properly, but is exiting because the application has finished building. If you use lime test flash instead, it might build-and-run for you, as the other command does?

How can I run the Kotlin REPL kotlinc-jvm or kotlinc

I am completely new to Kotlin, and I am trying to run the Kotlin REPL.
Following this, and considering I am using OS X, and I have tried this:
$ /usr/local/bin/kotlinc-jvm
which is equivalent to:
$ kotlinc-jvm
Then in the following link, I found that a nicer way to run it is:
$ kotlinc
Is there any differences between this two commands, and which one should I choose?
If you look inside the kotlinc-jvm files, they actually just launch the kotlinc that's in the same folder they are in, and pass any arguments they were started with to it:
kotlinc-jvm for Unix:
#!/usr/bin/env bash
# (License here)
DIR="${BASH_SOURCE[0]%/*}"
: ${DIR:="."}
"${DIR}"/kotlinc "$#"
kotlinc-jvm.bat for Windows:
#echo off
rem (License here)
call %~dps0kotlinc.bat %*
I'm not sure why kotlinc-jvm is there in this form, it's basically just a very simple redirect. I'd just use kotlinc.

Invoking Jython without Weblogic's WLST

I'm using an AIX machine which has Weblogic 9.21 installed and it also has jython as part of its installation (WLST).
Is there a way to run jython code without having to initialize the WLST first?
I have the following jars too if they bring in any ideas:
['.', '/opt/weblogic921/weblogic92/common/lib/jython.jar', '/opt/weblogic921/weblogic92/common/lib/config.jar', '/opt/weblogic921/weblogic92/common/lib/config.jar', '/opt/weblogic921/weblogic92/server/lib/weblogic.jar', '/opt/weblogic921/weblogic92/common/wlst/modules/jython-modules.jar/Lib', '/opt/weblogic921/weblogic92/common/wlst', '/opt/weblogic921/weblogic92/common/wlst/lib', '/opt/weblogic921/weblogic92/common/wlst/modules']
Right now I'm invoking the jython code using:
java -cp /opt/weblogic921/weblogic92/server/lib/weblogic.jar weblogic.WLST file.py
Paste below code in a shell script say jythonExec.sh and use it
Example Usage : /bin/bash jythonExec.sh file.py
#!/bin/bash
jythonJarLoc=/opt/weblogic921/weblogic92/common/lib/jython.jar
javaLoc=/usr/bin/java
pythonCacheDir=/tmp/pythonCacheDir
if [ ! -f ${jythonJarLoc} ]; then
jythonJarLoc=/opt/weblogic921/weblogic92/server/lib/weblogic.jar
fi
${javaLoc} -cp ${jythonJarLoc} -Dpython.cachedir=${pythonCacheDir} org.python.util.jython $#