1, Java Operation
Test jar: Execute---java-classpath f:/testhello.jar Test2
Or
JAVA-CP F:/testhello.jar Test2
Print Results: Hello World
The Java classes are as follows:
/**
* Document: This kind of function----> Print Hello World
* USER:YANGJF
* date:2016/9/25 9:48
/Public Class Test2 {public
static void Main (string[] args) {
System.out.println (' Hello World ');
}
2, Scala operation
Test jar: Execute--"Scala-classpath F:/testhello.jar Test2
Print Results: Hello World
The Scala classes are as follows:
/**
* Document: This type of action---->
* USER:YANGJF
* DATE:2016/9/25 9:37/
object Test2 {
def Main (args:array[string]) {
println ("Hello World")
}
}
Note: If you want to introduce additional packages, you need the following design
JAVA-CP ".: Lib/phoenix-core-4.7.0-hbase-0.98.jar:\
lib/scala-library-2.10.5.jar:\
lib/ Test-phonenix.jar: "\
com.yjf.phoenix.kerberos.QueryPhoenixTableData \
>>/home/spark/logs/ Hour_cdn_license_queryphoenixtabledata.log 2>&1
The above test passes, can use directly