java class file not compiling termux | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

java class file not compiling termux

I have this example script (test.java) class A { void func(){ System.out.println("some string"); } } class Mainz{ public static void main(String [ ] args){ A obj =new A(); obj.func(); } } running the eclipse java compiler command ecj test.java works and doesnt throw any errors running the data explorer (dx) command dx --dex --output=test.dex Mainz.class produces a test.dex and a Mainz.class file however running the dalvikvm command dalvikvm -cp test.dex Mainz trows classNotFound Error why

30th Apr 2019, 10:51 AM
_c0d£ Bit£_
_c0d£ Bit£_ - avatar
5 Answers
+ 3
Saad Mughal (ofcourse i know it works here i sololern) i was asking to run it in termux since it can run java offline (and other languages too and because i really love the app :) you know not everone has internet everytime to use sololearn otherwise thanks for commenting :)
30th Apr 2019, 4:02 PM
_c0d£ Bit£_
_c0d£ Bit£_ - avatar
+ 2
@Rstar Thanks for commenting i have checked out the site and the commands are not the problem even making the class public still throws an error i define the class in another file but well.... i will try that
30th Apr 2019, 12:17 PM
_c0d£ Bit£_
_c0d£ Bit£_ - avatar
30th Apr 2019, 1:16 PM
Mr Robot
Mr Robot - avatar
+ 1
and where do these grey ticks come from btw ?..
30th Apr 2019, 12:18 PM
_c0d£ Bit£_
_c0d£ Bit£_ - avatar