Codic
04/05/2020, 4:06 PMimport com.file2
fun main() { file2.test() }
nfrankel
04/05/2020, 4:07 PMcom.file1
and then come.file2
nfrankel
04/05/2020, 4:07 PMCodic
04/05/2020, 4:33 PMnfrankel
04/05/2020, 4:35 PMCodic
04/05/2020, 4:39 PMCodic
04/05/2020, 4:39 PMCodic
04/05/2020, 4:39 PMnfrankel
04/05/2020, 4:41 PMkotlinc --help
is your friendCodic
04/05/2020, 5:22 PMCodic
04/05/2020, 5:22 PMnfrankel
04/05/2020, 5:35 PMcp
or classpath
optionCodic
04/05/2020, 6:00 PMCodic
04/05/2020, 6:01 PMCodic
04/05/2020, 7:40 PMCodic
04/05/2020, 7:40 PMCodic
04/05/2020, 7:40 PMCodic
04/05/2020, 7:40 PM-cp file1.jar
Codic
04/05/2020, 7:40 PMCodic
04/05/2020, 7:40 PMCodic
04/05/2020, 7:40 PMCodic
04/05/2020, 7:42 PMCodic
04/05/2020, 7:42 PMnfrankel
04/05/2020, 8:48 PMilya.gorbunov
04/05/2020, 9:47 PMpackages cannot be importedIndeed, but you can import every declaration from a package:
import com.file1.*
Codic
04/06/2020, 1:05 AMIndeed, but you can import every declaration from a package:Âimport com.file1.*
Codic
04/06/2020, 1:05 AMCodic
04/06/2020, 1:05 AMCodic
04/06/2020, 1:07 AMthere’s nothing kotlin specific here
please check the java documentation relevant to classpath
Codic
04/06/2020, 1:07 AMCodic
04/06/2020, 3:21 AMCodic
04/06/2020, 3:21 AM