+ 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
5 Antworten
+ 7
Make class Mainz public and then try
https://www.google.com/amp/s/lydericblog.wordpress.com/2017/09/04/straightforward-java-compilation-on-termux/amp/
+ 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 :)
+ 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
+ 2
check it's working
https://code.sololearn.com/cLKTaXEiU48k/?ref=app
+ 1
and where do these grey ticks come from btw ?..