Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run java-tron using OpenJDK #4133

Closed
air3ijai opened this issue Oct 24, 2021 · 4 comments
Closed

Run java-tron using OpenJDK #4133

air3ijai opened this issue Oct 24, 2021 · 4 comments

Comments

@air3ijai
Copy link

1. What did you do?

For now are running java-tron using OpenJDK installed on Ubuntu. It seems that it works fine, despite the mentioning on How to Build:

On Linux Ubuntu system (e.g. Ubuntu 16.04.4 LTS), ensure that the machine has Oracle JDK 8, instead of having Open JDK 8 in the system. If you are building the source code by using Open JDK 8, you will get Build Failed result.

Or it is related only for the builds and we can run compiled jar using OpenJDK?

2. What did you expect to see?

We want to be able run java-tron using OpenJDK and have an official support for this.

3. What did you see instead?

For now we are run java-tron using OpenJDK.

As Oracle no longer releasing updates for long-term support (LTS) Java releases under a permissive license, there is a lot of other OpenJDK.
For example we can very easy run java-tron using Docker and pre-compiled OpenJDK image:

version: '3'
services:
  tron:
    container_name: java-tron
    image: amazoncorretto:8
    network_mode: bridge
    restart: unless-stopped
    working_dir: /java-tron
    command: java -Xmx25g -XX:+UseConcMarkSweepGC -jar FullNode-4.3.0.jar -d data -c main_net_config.conf
    ports:
      - "8090:8090"        # HTTP API
      - "8091:8091"        # HTTP API Solidity
      - "18888:18888"      # P2P network TCP
      - "18888:18888/udp"  # P2P network UDP
      - "50051:50051"      # gRPC
    volumes:
      - /data:/java-tron

Thank you!

@Benson0224
Copy link
Contributor

only oracle JDK 8 is supported. Open JDK is not supported, please double-check.
image

https://github.com/tronprotocol/java-tron/blob/develop/build.md

@air3ijai
Copy link
Author

We have Ubuntu 18.04 with the OpenJDK 8 and it works fine for now:
OS

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"

Package

sudo apt list | grep openjdk-8 | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

openjdk-8-jdk/bionic-updates,bionic-security,now 8u292-b10-0ubuntu1~18.04 amd64 [installed]
openjdk-8-jdk-headless/bionic-updates,bionic-security,now 8u292-b10-0ubuntu1~18.04 amd64 [installed,automatic]
openjdk-8-jre/bionic-updates,bionic-security,now 8u292-b10-0ubuntu1~18.04 amd64 [installed,automatic]
openjdk-8-jre-headless/bionic-updates,bionic-security,now 8u292-b10-0ubuntu1~18.04 amd64 [installed,automatic]

Java verison

java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

What is this - just a luck, what is the issue to run java-tron using OpenJDK?

@Benson0224
Copy link
Contributor

#337
From this issue, I can see that seems people got a solution to run java-tron with OpenJDK.
You may have a similar setup as mentioned in this issue.

However I would still suggest you use Oracle JDK to avoid other potential risks, thanks.

@Benson0224
Copy link
Contributor

Thanks for your contribution to java-tron.
This issue will be closed as no update for a long time.
Please feel free to re-open it if you still see this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Benson0224 @air3ijai and others