Termux-packages: Package request: javac/jar/jdk

Created on 15 Jun 2016  ยท  70Comments  ยท  Source: termux/termux-packages

Please add the Java compilers (java, javac, jar, etc.)

help wanted package request

Most helpful comment

That is awsome , I have been waiting this for months now.

All 70 comments

Yeah it would be much appreciated

Ya, Terminal IDE is really hard to use. I've tried importing their binaries to a custom folder to run, but it doesn't work

I can get the JRE 8 Runtime working on Android but it requires mounting the libraries whoch requires root

@TheDiamondYT1 please, elaborate. I've been trying to get openjdk to build for Android but it fails for shm support.

@vishalbiswas Im not entirely sure if this is correct, because this is a new phone and i had it working on the old one, but here is my script.

NOTE!!!!! Please compile and use my app to download and run the script if you are on lollipop or below. Or just go to my app repo's "download" branch and get java.zip and copy to /sdcard/.JRE4Droid then run the script in the system somewhere

#!/system/bin/sh
# Java Installer by TheDiamondYT
#
# Set DIR variable
dir=$(dirname $0)
busybox=$dir/busybox
#
# Mount / read write
$busybox mount -o rw,remount /
#
# Create java directory
$busybox mkdir $dir/java
#
# Extract java.zip here
$busybox unzip /sdcard/.JRE4Droid/java.zip -d $dir/java
#
# Create directory for java libs
$busybox mkdir /lib
#
# Umount
$busybox umount /lib
#
# Bind folders
$busybox mount -o bind $dir/java/lib /lib
#
# Mount / read only
$busybox mount -o ro,remount /
#
#
#
# (The Android Shell doesn't like empty lines)

I originally got those commands from (this app)(github repo)

@TheDiamondYT1 I'm more interested in how you compiled the files in java.zip. It will allow us to create a package for termux.

@vishalbiswas I didnt. I got the compressed archive from the repo in my previous comment. For some reason this time around i cant get the correct permissions on the java binary.

java not working

Is this happening? - referring to javac in termux?
If it is ace, but if not is there some other solution to compiling java files and allowing them to run within the termux environment?
Sorry if this question has been asked and answered elsewhere I found a few things but nothing really covered it fully... thanks!

If we can get a JRE working maven will easily run

Done.

alt

However, there are some interesting things to note:

  • java returns "No such file or directory" unless you do (from the top level directory)
$ mount -o remount,rw /
$ mkdir /lib
$ mount -o bind lib /lib
  • You dont need to set execute permissions for the java binary
  • The guy who made the compressed file containing the jre claims he downloaded it from oracle, but thr folder structure is different to that of the one i downloaded from oracle.

Compiling openjdk fails at shm support. That's the roadblock I'm stumped at.

@TheDiamondYT1 already tried. That implementation isn't complete. Semaphore functions are missing which are required for ipc

http://openjdk.java.net/projects/mobile/android.html
This documents how to cross compile OpenJDK 9 for Android. But I just can't get the build to succeed.

If this works that would open a new world of possibilities.. @vishalbiswas Do you still remember what the error is from the build?

@lynnard undefined reference to SHMLBA and semop
------------------------------EDIT-------------------------------
Exact errors:

hotspot/src/os/linux/vm/os_linux.cpp: In function 'char* shmat_with_alignment(int, size_t, size_t)':
hotspot/src/os/linux/vm/os_linux.cpp:3391:35: error: 'SHMLBA' was not declared in this scope
   if (!is_size_aligned(alignment, SHMLBA)) {
                                   ^
hotspot/src/os/linux/vm/os_linux.cpp: In function 'char* shmat_at_address(int, char*)':
hotspot/src/os/linux/vm/os_linux.cpp:3427:33: error: 'SHMLBA' was not declared in this scope
   if (!is_ptr_aligned(req_addr, SHMLBA)) {
                                 ^
hotspot/src/os/linux/vm/os_linux.cpp: In static member function 'static int os::loadavg(double*, int)':
hotspot/src/os/linux/vm/os_linux.cpp:5454:10: error: '::getloadavg' has not been declared
   return ::getloadavg(loadavg, nelem);
          ^
hotspot/src/os/linux/vm/os_linux.cpp: In function 'timespec get_mtime(const char*)':
hotspot/src/os/linux/vm/os_linux.cpp:6082:13: error: 'struct stat' has no member named 'st_mtim'
   return st.st_mtim;

semop and other semaphore functions are available as a syscall. I'm using them.

Managed to get past these errors with some hacks. Now the build fails for fatal error: langinfo.h not found

Why is android so difficult

Terminal IDE uses a different approach, rather than compiling the native package for java command via c/cpp, spartacus rex uses an internal classLoader which uses android's dalvikvm API "dalvik.system.DexClassLoader" with reflection and a custom dexClassLoader class, ALL in java, although you need to check for lots of errors and exceptions. I don't have experience with java reflection APIs so can't do much. If you guys have time, please have a look at the two java classes from Terminal IDE:
java.java and dexClassLoader.java,
Please have a look at this method,it requires a script to invoke and is abit unsafe but I hope someone can work around with it and we'd have a working java classloder to load and run most of the JDK toola like jar,javac,javap etc.

@Harshiv-Patel Reflection? So, does that mean it has a large performance hit?
OpenJDK 9 will have native support for Android. In fact, preliminary code for compilation for Android has already been added. I'm waiting for them to tag the next development release so that I can update the disabled openjdk package in the repo.

Terminal IDE does lag a little(~1500-2000ms) for the first time, when I load the tools.jar(~1.8MB, stripped, contains dexed classes from original tools.jar+resources for jar,javac and some other tools from JDK so it would make a difference when working with larger libraries I guess. Native support for Android sounds really good, it would be great.

With reagards to running java code on your phone through termux, this seems relatively easy to set up. I used jack (apt install jack) to compila java code to a dex, and then used dalvikvm to run it:

mkdir -p dex
jack --output-dex dex $(find -name *java)
dalvikvm -cp dex/classes.dex <name of your class>

So far I've only tried some really simple code, I'll experiment to see how far this works ๐Ÿ˜„
(requires no root btw ;))

@vishalbiswas I have got the JRE 8 working on Android by downloading the files from a guys Dropbox folder. He claims its straight from the oracle website but the folder structure isint the same. It requires root and you have to mount some stuff but it does work

@vishalbiswas , Did you solved that header file not found error? We can already load the (dexed)Java classes via dalvikvm as suggested by @MarijnS95, and most of the JDK tools are written in java, so I think that we can just dex the classes from JDK's tools.jar and load them via dalvikvm, mostly we do not need the entire Java SE JRE 8(not sure though), JDK tools are sufficient for most of the android projects.
@TheDiamondYT1 , root requirement and remounting method can be unsafe for noobies(like me) and we need a package that can be added to termux via apt install package_name.

I know I was just sharing how I can run jar files

The latest source already deals with these issues, but there are others. Zero interpreter on arm has real bad performance

Android already has it's class loader optimized by AndroidRuntime, all they needed was to replace native Linux APIs with those of android's native API, using an interpreter is really bad idea when you can just dex your java classes as most of the java SE libraries are in java. Anyway what java command does is to load&run code from some archive which dalvikvm does for us, we can then load the dexed tools.jar and other Java SE libraries to be used with android and load them via dalvikvm. I've already dexed some tools like javac and jar, if I get success with javah,javadoc and javap, I'll post the scripts and dexed tools.jar for anyone interested to try out and test ,in next weekend.

Zero interpreter is only needed for arm devices. x86 devices can use the client jvm. Does dalvik has the complete java api? What about running apps that require a jdk? I want to ultimately be able to run gradle and build Android apps on Termux as if it was a real Linux box.

  1. I think there are very few devices running x86(not sure though) :confused:
  2. Yeh dalvikvm only has limited set of libraries, but most of the libraries can just be dexed with dx and should work on android that way, I guess :smirk:
  3. So you want to add JRE to android libraries, as done by @TheDiamondYT1, somewhat harder to accomplish but very useful once done :grinning:
  1. No. I want a standard java installation which I can use to compile Android apps on device painlessly.

So the JDK (which also happens to include the JRE)

@vishalbiswas I've been fiddling with that for the past two days, and it turns out to be pretty simple (and is able to compile standard java applications as well, as mentioned in my previous comment). I only have apps that consist of a couple java files, some native C++ code through jni, and a simple makefile to invoke the compiler/packer. Nothing fancy, so if your apps include a lot of configuration with gradle, custom build tools etc, this might be more difficult ;)

The only thing I'm still working on is seamlessly installing the application and figuring out how to debug it (see the logs, for instance). But I'll save that for a more appropriate topic. Nevertheless, here's a rough outline of the steps involved:

  • Generate R.java file from resources with aapt (I haven't tried this as I don't have a layout or other resources ๐Ÿ˜›).
  • Compile java class files into classes.dex using jack.
  • Generate apk package using aapt, to which the AndroidManifest.xml file is added.
  • Add classes.dex and other resources to the apk, either with aapt or zip (eventually your native library, if you're working with JNI).
  • zipalign and pack the apk with apksigner (special termux version that does both at the same time, standalone zipalign exists though).

    • Invoke the app-installer by calling termux-share with the filename of the final apk.

@MarijnS95 lastly, we combine all these steps into a bash script and some extra features like

  • To check if every step is completed without any errors ( $? may be ?) if any error is there than abort the process.
  • The script can take all the project data from project's home folder like package name and name of MainActivity and other important data from a file ( as it was in .project.properties file in eclipse)
    and add others.

Porting the entire JDK to Android and then using Gradle is something that takes lots of experience and time AnD more space on device, It would take some time to write and debug the script, I'll probably give it a try.

Edit: That @joakim-noah has already built a script for native apps I guess.

I made a simple script to compile Android apps

https://github.com/TheDiamondYT1/termux-buildapk

I've dexed some JDK tools and got them working. 'java' command isn't the full fledged desktop version, it's just a plain dumb class loader. Rest of tools are almost original. Running them on Samsung's Marshmallow Stock ROM may give errors, haven't tested yet on android 6+, do give it a try. Zip file:
JDK_tools.zip

I've dexed some JDK tools and got them working. 'java' command isn't >the full fledged desktop version, it's just a plain dumb class loader. Rest >of tools are almost original. Running them on Samsung's Marshmallow >Stock ROM may give errors, haven't tested yet on android 6+, do give it a >try.

Did anyone looked at the zip ? It's about a month or so, anyone please look at it.

I'm using a Nexus 6p on 7.1.2.

I just copied into ~ and chmod +x on java. Ran ./java from the ~/JDK_Tools:

java.lang.ClassNotFoundException: Didn't find class "com.hrp.java" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
Exception in thread "main" java.lang.ClassNotFoundException: Didn't find class "com.hrp.java" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

Note 4 on 6.0.1
java -v -jar kafka_2.11-0.10.2.0.jar kafka
ODEX_FOLDER : /data/data/com.termux/files/usr/var/android
JAR/DEX FILE : kafka_2.11-0.10.2.0.jar
CLASSNAME : kafka
My path is: kafka_2.11-0.10.2.0.jar
Output file will be /data/data/com.termux/files/usr/var/android/kafka_2.11-0.10.2.0.dex
Failed loadDex 'kafka_2.11-0.10.2.0.jar': java.io.IOException: No original dex files found for dex location /data/data/com.termux/files/home/kafka_2.11-0.10.2.0/libs/kafka_2.11-0.10.2.0.jar
Native lib path 0: /vendor/lib/
Native lib path 1: /system/lib/
DexClassLoader com.hrp.dexclassloader@3ea08f7: findClass 'kafka'
Now searching: kafka_2.11-0.10.2.0.jar
java.lang.ClassNotFoundException: kafka in loader com.hrp.dexclassloader@3ea08f7
at com.hrp.dexclassloader.findClass(dexclassloader.java:258)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.hrp.java.main(java.java:90)
Suppressed: java.lang.ClassNotFoundException: Didn't find class "kafka" on path: DexPathList[[zip file "/data/data/com.termux/files/usr/bin/loader.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 2 more
Suppressed: java.lang.ClassNotFoundException: kafka
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 3 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Usage : java -v -jar [List of Jar files] CLASSNAME
$

I was able to get Java working.

  • I grabbed the file that TheDiamondYT1 mentinoned https://github.com/TheDiamondYT1/JRE4Droid/blob/download/java.zip?raw=true or https://www.dropbox.com/s/c6xnyehgdtwobct/nukkit_library.tar.gz?dl=0 (they're the same)
  • Switched to su
  • Mounted the lib directory as su to the root of the file system /lib (note: this is not the lib directory in the jre folder along side the bin folder)
  • I was never able to get the java binaries that came in that pack to work. But I was able to download download.java.net/download/jdk8u60/archive/b25/binaries/jdk-8u60-ea-bin-b25-linux-arm-vfp-hflt-21_jul_2015.tar.gz
  • These binaries worked for me. (The only reason I used u60 was cuz I was too lazy to find a direct link to an earlier update)

This is all in the root user space tho. I'm sure its possible to get it to work outside of it.

As a side note:

  • libcrypto seems to conflict with the one provided for openssh when I tried copying lib into the termux lib folder
  • Jack is no longer a package. No idea what the alternative is.
  • I tried compiling my desired jar into dex using dx on windows. Which resulted in errors.
  • Honestly, I would love a simple linux environment on android without the overhead of a vm or gui. If anyone knows how to do this please send me msg :D

I'm using a Nexus 6p on 7.1.2.

Note 4 on 6.0.1

Sorry Guys, I haven't tried to run it on Android Lollipop 5.1.1+, it doesn't seem worth trying as Open JDK would be available on android in future.
Android requires dex files to run them, usually "classes.dex" is required, you can't run normal java class files or ".jar" files containing classes, they need to be "dexed" first, using dx tool.

There are some Android apps which build quit well on device with the tools we have at our disposal today! Some of these apps are quite complex. Others are very entertaining. While others are very simple, mere fragments of apps that are complete in themselves. A new repository has just been opened with instructions and scripts that build Android apps on device (a smartphone).

Have you ever wanted to build your own Android application? Now you can easily compile these selected applications that have already been successfully built and installed on device.

Enjoy this project! Your feedback is welcome at either the wiki, the issues pages or through the code itself.

screenshot_20170529-034309

ok here https://github.com/sirmordred/JarClassLoader
it can be beneficial for you guys

Info: i have a dx tool which works on android directly (compiled from latest dx sources)
and have ecj compiler which works on android directly (latest version ecj)

the big disadvantage of ecj compiler is that it needs "androd.jar" as bootclasspath (34mb) (and it must be placed somewhere)
if anyone have a standalone ecj compiler sources? maybe we can fuse both of jars (android.jar and ecj.jar) and create standalone android java compiler and handle that disadvantage

the big disadvantage of ecj compiler is that it needs "androd.jar" as bootclasspath (34mb) (and it must be placed somewhere)

You can place it in your internal storage somewhere, android.jar only requires to have read permission. I've put them in "~/storage/external-1/"
and it works fine and then I added it's path to bashrc
export droidjar=path/to/jar
this can save some megabytes as long as it's only required to have read permission.
I think we could place all jdk9 libraries and other such files like this, it would reduce the memory footprint considerably.

Info: i have a dx tool which works on android directly (compiled from latest dx sources)

  1. which version? 1.12 or higher?
  2. does it work with android.jar API level 22 or higher?

Yeah its 1.12 version
And yeah im on marshmallow(23) its working great

for the ecj compiler, im currently trying to pack them, i mean packing android.jar and ecj.jar and create standalone aar library,
i put into assets and compiler will copy from assets into application's internal folder (data/data/com.xyz.. ) via getApplicationContext,getFilesDir.getAbsolutePath

@AravK Java, javac and jar available through:

TermuxArch

Now you can install Arch Linux in Termux ๐Ÿ“ฒ on your smartphone and tablet. More information at https://sdrausty.github.io/TermuxArch

Java is available through https://sdrausty.github.io/TermuxArch/ Just follow the easy install instructions at https://sdrausty.github.io/TermuxArch/docs/install or simply copy and paste the following into your Termux window:

cd && git clone https://github.com/sdrausty/TermuxArch
./TermuxArch/setupTermuxArch.sh

Read more about the Arch Linux package manager at duckduckgo arch+linux+install+java+pacman.

To install java run pacman -Syy; pacman -Su; pacman -S jdk8-openjdk

screenshot_20171109-220204
screenshot_20171109-222326

AWESOME! Thanks! I love Arch Linux, this helps immensely.

On Fri, Nov 10, 2017, 4:25 AM S D Rausty notifications@github.com wrote:

@AravK https://github.com/aravk Java is available through:
TermuxArch https://github.com/sdrausty/TermuxArch

Now you can install Arch Linux in Termux ๐Ÿ“ฒ on your smartphone and
tablet. More information at https://sdrausty.github.io/TermuxArch

Java is available through https://sdrausty.github.io/TermuxArch/ Just
follow the easy install instructions at
https://sdrausty.github.io/TermuxArch/docs/docs/install or simply copy
and paste the following into your Termux window:

cd && git clone https://github.com/sdrausty/TermuxArch
./TermuxArch/setupTermuxArch.sh

Read more about the Arch Linux package manager at duckduckgo
arch+linux+install+java+pacman.
https://duckduckgo.com/?q=arch+linux+install+java+pacman&atb=v90-2__&t=cros&ia=qa

To install java run pacman -Syy; pacman -Su; pacman -S jdk8-openjdk

[image: screenshot_20171109-220204]
https://user-images.githubusercontent.com/27742457/32641053-cedfdcfe-c599-11e7-9c73-b185e70e9c6a.png
[image: screenshot_20171109-222326]
https://user-images.githubusercontent.com/27742457/32641590-d5541d4a-c59c-11e7-8855-e151bc217acc.png

โ€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/324#issuecomment-343364440,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARILTo9TZNzA9CfXca0rV6UTzcfHDDPBks5s08IbgaJpZM4I2K8f
.

>

AK

That is awsome , I have been waiting this for months now.

Use useradd username. Then cp -r arch/root/ arch/username. Finally su - username and similar to login as user, not the root account of your Arch Linux in Termux installation and similar.

From https://github.com/sdrausty/TermuxArch/issues/26 "...use makepkg to build packages" which should be useful for user and permission issues with Termux-app and Termux-packages.

Please direct PRoot in Termux issues https://github.com/termux/proot here. Comments regarding setupTermuxArch.sh should be directed to https://github.com/sdrausty/TermuxArch/issues. setupTermuxArch.sh creates system information when requested. Run setupTermuxArch.sh --sysinfo and post this information along with your input and complete output if necessary. Also include a screenshot if it will help in resolving the issue.

@AravK @EralpCelebi Thank you for your compliments! Hopefully you are inspired with Arch Linux in Termux PRoot and Termux on device as well as I am. A new website regarding Arch Linux in Termux PRoot is being built at https://sdrausty.github.io/TermuxPovray/ regarding https://github.com/termux/termux-packages/issues/202 Package request: povray.

scifi_demo

Created on device in Termux from https://github.com/termux/termux-packages/issues/202 Package request: povray.

If you use DexClassLoader make sure to prevent System.exit calls from crashing the whole app.

Oracle jdk8 install on termux:----
1)(Termux updare and upgrade)
$ apt update && upgrade -y

2)(package Install)
$ pkg install
$ pkg install git
$ pkg install lftp proot

3)(Jdk download on Oracle site, hflt.tar.gz type jdk file download)
http://www.oracle.com/technetwork

then code paste in termux

$ cd && git clone https://github.com/sdrausty/TermuxArch

$ ./TermuxArch/setupTermuxArch.sh
Sometime consume to installation
after installation:-

$ exit

$ startarch

$ rm -r TermuxArch

$ cd arch

5)(copy java file sdcard to arch terminal)
go to mobile setting ----> install apps ---> termux access storage permissions ----"on"... then paste the code on termux
$ cp /sdcard/Download/jdk-8u212-linux-arm64-vfp-hflt.tar.gz .

6)(then java install in arch go to file location ware you java install and paste the code)
$ pacman -S sudo -y
$ sudo tar xvzf jdk-8u212-linux-arm64-vfp-hflt.tar.gz

7)(java path sate)
$ sudo nano /etc/profile.d/jdk1.8.0_212.sh

8)(then nano pad open then type java location)
export JAVA_HOME="/jdk1.8.0_212"
export PATH="$PATH:${JAVA_HOME}/bin"

(type alt +x ---> y "To save" then press enter that's all)
$ exit
$ exit
Reopen termux
$ startarch
$ cd arch

$ echo $JAVA_HOME
$ echo $PATH

Then Type "java -version"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

Hello eveyone. This is just a poke to see if there is any movement on this topic. It seems like some people are using ejc as a replacement for javac. I will be reading and catching up on how to compile the JDK.

@CRamsan , many of the most used tools in JDK like javac, javah etc are written in java, that are not as difficult to bring to android as porting the runtime environment, which is written in native languages and APIs per OS.

many of the most used tools in JDK like javac, javah etc are written in java

Significant part of OpenJDK is written in C++ and has problems when compiling with clang from Android NDK (starting from NDK r18).

I suppose a simple yet difficult way to deal with such a problem is to make a list of problematic functions and deal them one by one, handling all the API differences ?

@CRamsan

It seems like some people are using ejc as a replacement for javac.

JavaOnTermux.sh

I will be reading and catching up on how to compile the JDK.

Did you go beyond that?

Hello everyone, just wanted to ask if there has been any new development on this.

there has been any new development on this.

If package request tagged as help wanted, then Termux maintainers can't handle it. Pull requests are wanted.

Ah I didn't notice that, thanks for the info.

So, i highly suggest looking at Minecraft JE on Android launchers. They managed to get JRE 8 working on android. Will it help, though?

They managed to get JRE 8 working on android. Will it help, though?

The only thing that will help is a submission of script and patches for cross-compiling JDK for Android OS (Termux). Until that, JDK may never be ported.

Read my previous comment.

@artdeell Your repository link is neither official OpenJDK sources nor has anything that will help to create a proper build script for Termux.

See https://github.com/termux/termux-packages/tree/667fce5a65eaf163ed05a65dce9fb0d587b46301/disabled-packages/openjdk-9-jre-headless (but updated at least to Java 11 & fixed for latest Clang-based NDK) to know what we are looking for.

check out my fork of the run_java repository (that uses dx/ecj).

My version comes from a fork which added support for class filenames (.class instead of .dex), but didn't support multiple input arguments.

I was able to get this fixed and working with multi-arg support
(aka: javac *.java or javac fileA.java fileB.java ... fileN. java

of course it's not going to make actual compiled Java .class files run, but it does function identically when compiling/running (tab autocompetion works)

idn if anyone is even still thinking about / cares about this anymore, but maybe it will make someone happy ๐Ÿ˜Š

If it can run a minecraft server then it is good enough for me!

On Wed, Nov 4, 2020 at 11:53 AM hltdev8642 notifications@github.com wrote:

check out my fork https://github.com/hltdev8642/run_java of the run_java
https://github.com/zaoqi-clone/run_java repository (that uses dx/ecj).

My version comes from a fork which added support for class filenames
(.class instead of .dex), but didn't support multiple input arguments.

I was able to get this fixed and working with multi-arg support
(aka: javac *.java or javac fileA.java fileB.java ... fileN. java

of course it's not going to make actual compiled Java .class files run,
but it does function identically when compiling/running (tab autocompetion
works)

idn if anyone is even still thinking about / cares about this anymore, but
maybe it will make someone happy ๐Ÿ˜Š

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/324#issuecomment-721941486,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFYTD5HUOZAZ4J4MB4WAAKTSOGWMVANCNFSM4CGYV4PQ
.

Maybe!!!, however I doubt it as I dont think that it deals with jar files (and you couldnt just extract it, as the method being used in the run_java repo is basically just creating .dex files and renaming them so they basically just look "like" a standard java class file.

If you want to run a minecraft server on Android that's not all too hard

the thing is, is that it is not really running java/javac in the _traditional_ way, but just linking filenames to the android binaries dx and ecj (compile dex (android-formatted) src code).

but good luck, who knows it may work :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wetitpig picture Wetitpig  ยท  3Comments

loveablefellow007 picture loveablefellow007  ยท  3Comments

roalyr picture roalyr  ยท  3Comments

am11 picture am11  ยท  3Comments

zejji picture zejji  ยท  4Comments