Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared 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
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

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

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • 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 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

Share:

    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

    • Meet the Red Hat Node.js team at PowerUP 2025

    • How to use pipelines for AI/ML automation at the edge

    • What's new in network observability 1.8

    • LLM Compressor: Optimize LLMs for low-latency deployments

    • How to set up NVIDIA NIM on Red Hat OpenShift AI

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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

    Red Hat legal and privacy links

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

    Report a website issue