• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Java on Chromebook?

 
Ranch Hand
Posts: 134
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been developing a library and code base in Java pertaining to audio (relying on javax.sound.sampled, but I've previously made a wrapper that allows audio output on Android). I was just speaking with some school teachers who thinks some of the musical programs I made would be interesting to her students. She has been budgeted with one Chromebook per student. I'm wondering what is required to get my applications running on Chromebook.

Based on very cursory research, it appears that running a Java application on a Chromebook is no easy feat. I have had success with using jlink to make self-contained applications that run on Windows (64-bit) and MacOSX. Is there a process for creating a runnable program, written in Java, for the Chromebook? I don't mind going through a few elaborate hoops, but the resulting program would have to be easy for the end user to install in order to make this worthwhile.

Is this a possibility?
Has Google designed their system to exclude the running of Java?
 
Saloon Keeper
Posts: 5718
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My impression was that pretty much any Linux app can be installed on ChromeOS, so Java should work fine.

Searching for java on chromebook yields numerous articles that purport to describe exactly that - are you following any of those? What are you stuck on, specifically?
 
Phil Freihofner
Ranch Hand
Posts: 134
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, thanks, I've been looking at the articles. I'm trying to ballpark "commercial viability," so that entails ease-of-install and -use for the user base (elementary school kids and teachers).

Maybe it is the way my brain works--I tend to read a lot more ambiguity into text than other people. (Part of why I love Java is it's relative lack of ambiguity, it's tendency to explicit and clear at the cost of a little verbosity.)

Things that to me are not answered:

Are "extra steps" required of the user in order to run a Java program? From the articles, it seems that the we are dealing with the need to do one or more of the following:

> run via "Developer mode"
> have dual boot ChrUbuntu installed
or
> have Crouton installed

Also, I see references to Java 8 but none to module-based Javas. A self-contained program with the entire JRE embedded runs, what, 300+MB? With JLINK, I am able to package downloads in the vicinity of 18MB that unpack to around 75-80 MB.

One article mentioned the ability to boot ChrUbuntu from a thumb drive. Selling programs with a thumb drive would be a plausible business plan (not necessarily a good one, but at least worth considering). But not if the user also has to be in developer mode to boot from the thumb drive.

It seems that schools are increasingly making use of Chromebooks, and so, Chromebooks are becoming an important platform for educational software.

(Alternate plan to be considered to reach this market: write GUI in HTML/CSS/JS with FreeMarker link to the Java program, run a Jetty or Apache server, make the programs .war files. But that will require researching if WebAudio can perform in a manner comparable to a javax.sound.sampled.SourceDataLine.)
 
Phil Freihofner
Ranch Hand
Posts: 134
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like installing GalliumOS enables the install of either Java 8 or Java 11, and that it is an OpenJDK version (good!). That should allow the creation of a JLINK-created jre for a self-contained Java application.

The program would need the GalliumOS running on the Chromebook in order to run.

So the main practical hurdle is more non-technical: whether a school teacher (or IT department for a school that purchases the Chromebooks) is willing to install GalliumOS on multiple Chromebooks.
 
Bartender
Posts: 2330
100
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your aim is to only run music and do some basic mixing on chromebooks, then I would suggest looking into Html based solutions as well. You can research on "Web Audio API". Your Application would be quite easily ported to multiple platforms without any changes. If the Chromebooks are running on a LAN, and you have a client-server model, you can deploy it on a local running webserver like tomcat or jetty".
 
Phil Freihofner
Ranch Hand
Posts: 134
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes! I'm also researching the possibility of going the route of jetty/java/freemarker/webaudioAPI. That should work for some of what I've done and want to do. But the real-time work, e.g., a virtual theremin, and some other tools that are based on real time response, I don't know yet. I need to learn more, including how the computational work of the program is divided between the server and the client. Also, whether one can feed raw data into a WebAudio output similar to the way one can feed data directly to a SourceDataLine for output with javax.sound.sampled.

Back to Chromebooks, though, even better than the GalliumOS, I've learned that Crostini has become standard with Chrome OS 69, and it supports Debian Linux. I just installed a Debian Java 11 and Jetty on a Ubuntu-server system, so it's pretty certain that Java 11 should work on Chromebook that is enabled with Crostini. The question remains, though, on how "scary" enabling Linux will be to school district IT departments, and whether doing so disrupts other programs that the units are intended to run.  
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!