Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • See all Red Hat products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Red Hat OpenShift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • See all technologies
    • Programming languages & frameworks

      • Java
      • Python
      • JavaScript
    • System design & architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer experience

      • Productivity
      • Tools
      • GitOps
    • Automated data processing

      • AI/ML
      • Data science
      • Apache Kafka on Kubernetes
    • Platform engineering

      • DevOps
      • DevSecOps
      • Red Hat Ansible Automation Platform for applications and services
    • Secure development & architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & cloud native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • See all learning resources

    E-books

    • GitOps cookbook
    • Podman in action
    • Kubernetes operators
    • The path to GitOps
    • See all e-books

    Cheat sheets

    • Linux commands
    • Bash commands
    • Git
    • systemd commands
    • See all cheat sheets

    Documentation

    • Product documentation
    • API catalog
    • Legacy documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore the Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Red Hat JBoss Developer Studio on MacOS X- an alternative setup

October 20, 2016
Earl R. Lapus
Related topics:
ContainersDeveloper Tools
Related products:
Developer Tools

    The  recommended steps for setting up the Red Hat JBoss Developer Studio (JBDS), on all supported platforms, are found here. The instructions are pretty straight-forward and it is enough to get started right away - as long as you have a suitable java SDK installed on your machine.

    However, if I go along that path, I would later have to deal with the Java SDK updates to go along with the compatibility of the existing tools. Eventually, I may end up having to install multiple versions of the Java SDK.

    This led me to look for other alternatives. I thought to myself, the Linux'y way to go would be to run the JBDS as a container and have it display on my Desktop. I figured that I already have the tools for such task: XQuartz as an X11 server, socat to relay the display ports, and my Red Hat Enterprise Linux (RHEL) virtual machine. Yey!

    The following are the steps on how I got all these to work together.

    Installing Docker and running it as a service

    On my RHEL virtual machine, I ran the following:

    sudo yum install docker
    sudo systemctl start docker.service
    sudo systemctl enable docker.service
    

     

    Preparing a Dockerfile

    I decided to build on top of the jboss/base-jdk image. And from that, install gtk2, epel-release and webkitgtk (gtk2 and webkitgtk are required by Developer Studio while the epel-release is a pre-requisite for webkitgtk).

    FROM docker.io/jboss/base-jdk:8
    USER root
    RUN yum -y install gtk2
    RUN yum -y install epel-release
    RUN yum -y install webkitgtk
    USER jboss
    

     

    Building the image

    On my RHEL virtual machine, I ran the following:

    sudo docker build -t jbossenv .
    

     

    Running the conatiner and installing Developer Studio

    On my RHEL virtual machine, I ran the following:

    sudo docker run --rm --privileged=true -it -v ~/docker/jboss/:/opt/jboss/ docker.io/jboss/base-jdk:8 bash
    
    bash-4.2$ java -jar devstudio-10.1.0.GA-installer-standalone.jar
    

     

    I just followed the on screen prompts of the installer. After the installation was done, I exited the shell. Notice that when I ran the container, I mounted the local directory ~/docker/jboss to the /opt/jboss container directory. I did this so that the Developer Studio installation will be saved in ~/docker/jboss.

     

    Running XQuartz with socat

    On my local machine, I ran the following commands to have the X11 server ready for connections:

    ~ » open -a XQuartz
    ~ » echo $DISPLAY
    /private/tmp/com.apple.launchd.iY4pclkKNl/org.macosforge.xquartz:0
    ~ » socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
    

     

    So what's happening here?

    XQuartz runs an X11 server that is listening on a UNIX socket. In this instance, it created the following: /private/tmp/com.apple.launchd.iY4pclkKNl/org.macosforge.xquartz:0 

    In order for the Developer Studio (which will be running as a container) to be displayed on my Desktop, I also ran a tool called socat. It is used to created a TCP socket that listens on port 6000 in my host machine and "pipe" data to the UNIX socket created by XQuartz.

    The socat binary can be installed via Macports or Homebrew (Personally, I prefer using Macports). You can check out a discussion on using socat with XQuartz here.

    Running the Developer Studio container

    On my RHEL virtual machine, I ran the following:

    sudo docker run --privileged=true --rm -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jboss/devstudio/studio" -e DISPLAY="10.211.55.2:0" -v ~/docker/jboss:/opt/jboss -t jbossenv devstudio
    

     

    Environment Variables passed to the container

    • PATH should be set to include the path of the Developer Studio binary
    • DISPLAY should be set to the IP address of the host machine (READ: not the virtual machine IP address) assigned by Parallels. In my case, 10.211.55.2 is the IP of the vnic0 virtual NIC. The "prlsrvctl net list" command is a good place to start to determine the virtual interface names. From there you can basically figure out the appropriate IP to use. The ":0" basically maps to port 6000 (see socat command above). If I indicated port 6001, then I'd have to adjust and use the value ":1".

    After that, you should see the Developer Studio window prompting for the default workspace directory screen like the one below (I'd have to admin that the text rendering is awful... but this is enough for me to get started)
    developer-studio_via_xquartz_socat

     

    Last updated: November 9, 2023

    Recent Posts

    • Run privileged commands more securely in OpenShift Dev Spaces

    • Advanced authentication and authorization for MCP Gateway

    • Unify OpenShift Service Mesh observability: Perses and Prometheus

    • Visualize Performance Co-Pilot data with geomaps in Grafana

    • Integrate a custom AI service with Red Hat Ansible Lightspeed

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue