Coder Social home page Coder Social logo

termux-java's People

Contributors

guziomg avatar harshiv-patel avatar hax4us avatar masterdevx avatar miguelmota avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-java's Issues

How I change java java.io.tmpdir in termux permanently?

I have an issue while running this code in termux Java which was provided by you.
When I run this command:- java -Djava.io.tmpdir=/data/data/com.termux/files/usr/tmp
It just print out the Java usage message

$ java -Djava.io.tmpdir=/data/data/com.termux/files/usr/tmp
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
              A : separated list of directories, JAR archives,
              and ZIP archives to search for class files.
-D<name>=<value>
              set a system property
-verbose:[class|gc|jni]
              enable verbose output
-version      print product version and exit
-version:<value>
              Warning: this feature is deprecated and will be removed
              in a future release.
              require the specified version to run
-showversion  print product version and continue
-jre-restrict-search | -no-jre-restrict-search
              Warning: this feature is deprecated and will be removed
              in a future release.
              include/exclude user private JREs in the version search
-? -help      print this help message
-X            print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
              enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
              disable assertions with specified granularity
-esa | -enablesystemassertions
              enable system assertions
-dsa | -disablesystemassertions
              disable system assertions
-agentlib:<libname>[=<options>]
              load native agent library <libname>, e.g. -agentlib:hprof
              see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
              load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
              load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
              show splash screen with specified image

See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

And when I run:- java -Xshowsettings to see the tmp file location the default tmpdirectory is set the command is not working or let me know I am pressing the wrong command??
Please help me to fix this hidden issue in termux.
And also not working with msfvenom embedding payloads into original apk.

It doesn't work, which ld.so should we use?

Termux-Java can not work,
First the java file linked to a wrong so path.(run file java to show this)
Then I fixed it by using:
patchelf --set-interpreter /data/data/vn.vhn.vsc/files/share/glib/ld-linux-aarch64.so.1 java
But it also complains: Accessing a corrupted shared library.
I found that there is a ld.so in Termux-Java/openjdk/lib/, so copy it to replace ld-linux-aarch64.so.
Then it complains: Segmentation fault.
(I use Huawei MatePad pro, android 10)

Screenshot_20210216_214233

Java command returns "Killed"

Hello,
I went through the steps. after installing java it seems everything is installed successfully without any error. but after i run java command or java -version, it returns me "Killed". no idea why.

Also i want to run some commands like update "sudo yum/apt-get update -y" but these two command says "command not found". Please help me

Thanks

java is not found

u0_a115@localhost:~$ wget https://raw.githubusercontent.com/MasterDevX/java/master/installjava && bash installjava
--2019-10-31 12:03:00-- https://raw.githubusercontent.com/MasterDevX/java/master/installjava
Resolving raw.githubusercontent.com... 151.101.8.133
Connecting to raw.githubusercontent.com|151.101.8.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1305 (1.3K) [text/plain]
Saving to: ‘installjava’

installjava 100%[=========================>] 1.27K --.-KB/s in 0s

2019-10-31 12:03:01 (67.5 MB/s) - ‘installjava’ saved [1305/1305]

This script will install Java in Termux.
Libraries compiled by Hax4us, script written by Hax4us and MasterDevX.

Java is already installed!

u0_a115@localhost:$ java
/data/data/com.termux/files/usr/bin/java: line 9: /data/data/com.termux/files/usr/share/jdk8/bin/java: No such file or directory
u0_a115@localhost:
$ cat $PREFIX/bin/java
#!/data/data/com.termux/files/usr/bin/bash

unset LD_PRELOAD
export JAVA_HOME="$PREFIX/share/jdk8" export LIB_DIR="$PREFIX/share/glib"
export LD_LIBRARY_PATH="$LIB_DIR" exec $JAVA_HOME/bin/java "$@"

Bad system call

Screenshot_20200319-134311
When I try to run Java and javac, that error appears, but when I try whit proot it works fine.

Segmentation fault

This script will install Java in Termux.
Libraries compiled by Hax4us, script written by Hax4us and MasterDevX.

[] Downloading JDK-8 (~70Mb) for arm...
[
] Moving JDK to system...
[] Extracting JDK...
[
] Moving Java wrapper scripts to bin...
[*] Cleaning up temporary files...

Java was successfully installed!

┌─[u0_a189@localhost]─[]
└──╼ $java
Segmentation fault
┌─ [✗]─[u0_a189@localhost]─[]
└──╼ $javac
Segmentation fault
┌─ [✗]─[u0_a189@localhost]─[]
└──╼ $jar
Segmentation fault
┌─ [✗]─[u0_a189@localhost]─[]
└──╼ $

Java not installing

When I type
wget https://raw.githubusercontent.com/MasterDevX/java/master/installjava && bash installjava

Then

Java

This happens:

This script will install Java in Termux.
Libraries compiled by Hax4us, script written by Hax4us and MasterDevX.

[] Downloading JDK-8 (~70Mb) for arm...
[
] Moving JDK to system...
mv: can't rename 'jdk8_arm.tar.gz': No such file or directory
[] Extracting JDK...
tar: can't open 'jdk8_arm.tar.gz': No such file or directory
[
] Moving Java wrapper scripts to bin...
mv: can't rename 'bin/': No such file or directory
[
] Cleaning up temporary files...

Java was successfully installed!

$ java
No command 'java' found, did you mean:
Command 'cava' from package 'cava'
$

please help me

Bad system call

After running the install and trying to run java -version, I only get "Bad system call" as a return.

Screenshot_20200924-135751

I'm running Android 11 on a Pixel 3a, no root.

JDB doesn't work

This is the error I'm getting:
error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

"Bad system call"

Installation succeeds, though on executing java (e.g. java -version) the process returns the message "Bad system call"

It didn't work.

It downloaded java but didn't install it. How i solve it?.

dockerd Error : "failed to start daemon: Devices cgroup isn't mounted"

I'm trying to install docker on android and installed it. now the docker --version shows right version and it seems it is installed well. but I cannot start daemon. it seems I need cgroup. Is there any package for cgroup? i couldn't find it in termux repositories. My general question is
"Can I install and use docker on android". I found x86_64 docker files and it seems its possible.
and second question is how to resolve this problem:
"failed to start daemon: Devices cgroup isn't mounted"
11

2

Execute Jenkins to report an error

2020-07-30 03:59:17.641+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @1771ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-07-30 03:59:18.496+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
2020-07-30 03:59:29.746+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2020-07-30 03:59:30.247+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.27.v20200227; built: 2020-02-27T18:37:21.340Z; git: a304fd9f351f337e7c0e2a7c28878dd536149c6c; jvm 1.8.0_152-b16
2020-07-30 03:59:34.197+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2020-07-30 03:59:34.531+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2020-07-30 03:59:34.532+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2020-07-30 03:59:34.546+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 660000ms
2020-07-30 03:59:37.492+0000 [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /home/?/.jenkins found at: $user.home/.jenkins
2020-07-30 03:59:37.786+0000 [id=1] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.UnsatisfiedLinkError: /usr/share/jdk8/jre/lib/aarch64/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerNativeLibrary.(FontManagerNativeLibrary.java:32)
at sun.font.SunFontManager$1.run(SunFontManager.java:339)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.(SunFontManager.java:335)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.awt.Font.getFont2D(Font.java:491)
at java.awt.Font.getFamily(Font.java:1220)
at java.awt.Font.getFamily_NoClientCode(Font.java:1194)
at java.awt.Font.getFamily(Font.java:1186)
at java.awt.Font.toString(Font.java:1683)
at hudson.util.ChartUtil.(ChartUtil.java:260)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:218)
Caused: hudson.util.AWTProblem
at hudson.WebAppMain.contextInitialized(WebAppMain.java:219)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:933)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:892)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:825)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at winstone.Launcher.(Launcher.java:182)
at winstone.Launcher.main(Launcher.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at Main._main(Main.java:375)
at Main.main(Main.java:151)
2020-07-30 03:59:40.574+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@29d37757{Jenkins v2.235.2,/,file:///home/%3F/.jenkins/war/,AVAILABLE}{/home/?/.jenkins/war}
2020-07-30 03:59:40.688+0000 [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@4d14b6c2{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-07-30 03:59:40.691+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @24821ms
2020-07-30 03:59:40.693+0000 [id=18] INFO winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled

Java Command Not Found

After getting success massage of installation..
When I run java command in termux. I got command not found error.
Screenshot_2020-07-04-14-29-47-54_84d3000e3f4017145260f7618db1d683

Networking failure

I'm trying to run like a socket to "gateway.discord.gg" but it's throwing UnknownHostException. I ran the same code on my pc and it works just fine

Error:

I entered java -version into a clean install Termux I get this error:

"Bad System Call"

Bad System Call

Job 1, 'java' terminated by signal SIGSYS (Bad system call)

Where is uninstall_java.sh

Can anyone tell me the directory in which uninstall_java.sh is present? I can't uninstall java if I'm not able to find the script

Could not find or load main class

Hi there. I had installed the package using your script. But when i issue the java command to run my program it throws the error "Could not find or load main class". I don't know how to solve this issue in termux and also -jshell command is not working. Can you help?

Fallo de semengtacion

Amigo, al ejecutarlo no me sirve, sabes por que?, trate de usar proot y tampoco funcionó

Bad System Call

Shows Bad system call after installing and trying to run java --version or java or javac

java killed

when i installed jdk ,i try to excute 'java -version',but it show 'killed'.
Same with other commands

Snipaste_2020-09-10_21-05-15

Error loading libpthread.so.0

$ java
java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

I have libpthread.so in /data/data/com.termux/files/usr/bin. I copied it and put it in the same directory and renamed it to libpthread.so.0, but java could still not recognize it.

$ uname -a
Linux localhost 4.4.153-perf-g480d017 #1 SMP PREEMPT Thu Aug 15 06:00:13 CST 2019 aarch64 Android

My Android version is 9, whose API level is 28.

Bad System Call

Self-explanatory
Android version: Oreo 8.0.0
I cant run java command plz fix

Simply "Segmentation fault"

I know, this issue exists.

I have a Segmentation error... Like I think everyone on ARM. Also my screenshot does not show the same type of Segmentation error as the other ones:
Screenshot_20191109-211521_Termux

So, it doesn't say "[xx]x Segmentation fault XXX", it only says "Segmentation fault", which (I think) seems to be less problematic than the error one... I hope it is.

Thanks

Source code to compile

Hi,

I'm working in adding full disc bluray and uhd bluray support to Android.
The menus of this discs use JRE.
I'm facing several errors while trying to use this and I believe this could be possible to overcome if I could compile it myself.

The src.zip doesn't contain the source.

Are you able to obtain the source code of this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.