-
-
Notifications
You must be signed in to change notification settings - Fork 216
feat: add Java language support with DoppioJVM #788
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
Conversation
β Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Thank you @Seth0x41 I have added some edits, mostly organizational for consistency.
Do we need this file? public/assets/lang-java-worker.js Please review the changes and let me know what you think. |
|
Hi @hatemhosny, |
|
Thank you @Seth0x41 I have added docs for Java: https://deploy-preview-788--livecodes.netlify.app/docs/languages/java It covers the live reload vs full reload. It also covers helper methods & properties that allow communication between Java & JavaScript in the page. Please review and let me know if you have any comments or additions. |
|
Excellent work, @hatemhosny and this might be confusing, especially since it's printed right after the initialization, so someone might mistake it for a compiler error (I was one of them π). // from https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/searches/BinarySearch.java
public class BinarySearchSnippet {
/**
* Search an item with binarySearch algorithm.
*
* @param arr sorted array to search
* @param item an item to search
* @return if item is found, return the index position of the array item otherwise return -1
*/
public static int binarySearch(int[] arr, int left, int right, int item) {
if (right >= left) {
int mid = left + (right - left) / 2;
if (arr[mid] == item) {
return mid;
}
if (arr[mid] > item) {
return binarySearch(arr, left, mid - 1, item);
}
return binarySearch(arr, mid + 1, right, item);
}
return -1;
}
public static void main(String[] args) {
int[] sortedArray = {1, 3, 5, 7, 9, 11, 13, 15};
int itemToSearch = 7;
int result = binarySearch(sortedArray, 0, sortedArray.length - 1, itemToSearch);
if (result == -1) {
System.out.println("Result: Item not found in the array.");
} else {
System.out.println("Result: Item found at index -> " + result);
}
}
} |
|
Good suggestion π Thank you. |
|
i18n ActionsSource PR has been merged into the default branch. Maintainers can comment |
|
Thank you @Seth0x41 It would be great if we can later on upgrade the Java version. Very grateful β€οΈ |
|
.i18n-update-push |
i18n Actions:
|
| Name | Description |
|---|---|
| New Branch for i18n | i18n/Seth0x41/feature-java-support |
| Last Commit SHA | a804500 |
Maintainers can comment .i18n-update-pull after translation is done to trigger the i18n pull workflow and pull the changes back to Github.
|
.i18n-update-pull |
i18n Actions:
|
| Name | Description |
|---|---|
| i18n Branch | i18n/Seth0x41/feature-java-support |
| Last Commit SHA | 019e001 |
| i18n PR | #794 |



What type of PR is this? (check all applicable)
Description
Supporting Java language using DoppioJVM
This PR adds support for the Java language in LiveCodes using DoppioJVM and BrowserFS. It enables users to write, compile, and run Java code directly in the browser. Key additions include:
Related Tickets & Documents
Closes #780
Added tests?
This PR adds a new language (Java) to LiveCodes, but no automated tests were added because the language runtime (DoppioJVM) and virtual file system (BrowserFS) are third-party libraries that are already tested. The functionality was manually tested using the javaStarter template. If tests are needed (e.g., for the Web Worker or UI integration), I can add them with guidance.
Added to documentations?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?