I have an audio visualizer applet I created with processing and minim using fft to analyze the audio. Now I want to feed in songs to the program dynamically with php as the user clicks on a song. I have read about JavaBridge and have it up and running with Tomcat. Would I need to store the song variable values in an xml file and send it over to the .java file? Is that the right approach? And if so, any idea what this would look like? I'm completely new to java and processing. Any help would be incredibly appreciated!
PHP variables to Java applet?
706 Views Asked by Dante Cullari At
2
There are 2 best solutions below
0
Joop Eggen
On
The fundamental sequence is as follows:
- The user request a .php page in the browser.
- The web server lets PHP write the page. It can write HTML with an applet specified, the applet HTML can be written with parameter with values filled in by PHP.
- The client receives an HTML page, which starts the applet.
So a click on the page cannot be handled by PHP, in a simple direct way. Follow @AndrewThompson in this.
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in PHP
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in APPLET
- Can't install .cap file on NXP P71D321
- how do I view an old applet?
- How to set priority of a process(that gets inherited by OS threads) in golang for mac?
- How to connect Apple GPU to Jupyter Notebook?
- How to save and restore macOS Launchpad configuration?
- Where is source code of the binding from javascript to C for Cinnamon? Which C objects / methods can be accessed?
- How to change background color of font for Cinnamon TextApplet?
- android.se.omapi.SEService: My app doesn't connect with the OnConnectedListener
- wrong notifications from my applet ( IFTTT ) (Python trading script)
- How to animate a ball grow with NoApplet?
- Creating a PWA for GeoGebra Applets so that they work offline without needing internet connection
- Can I use install for personalization two times for a SD?
- Why is my ACOSJ Javacard applet failing to install?
- Using symmetric key DES to sign and verify a message
- IsEnabled not working when a function is triggered in Java applet
Related Questions in PROCESSING
- Processing substitute long variables for something shorter
- How do I shuffle these blocks and make a win/loss game-state?
- How to read and process big csv file fast and keep memory usage low in java?
- Why does the shadow appear above the image in this p5.js code?
- How to fix rendering issue when rotating an arc in processing?
- Kinect V1 not connecting to Kinect Studio v1.8.0
- How to create a 2d top-down movement system where moving while holding two keys is possible in processing?
- How to fix the problem on converting ShaderToy color to Processing?
- 2d UI elements in a 3d environment in Processing
- Using A* to Create Procedurally Generated Rooms in Processing
- Having some issues with Void Draw in Processing
- Understanding NAudio and converting buffer to floats
- Processing ZoomOut
- I struggle with a basic feedback delay network
- i cant seem to find the syntaxerror in setup and draw in this flowfield sketch
Related Questions in PHP-JAVA-BRIDGE
- Javabridge-JDBC-PHP: throwing fatal error after upgrading PHP from 7.4 to 8.2
- Unable to load JasperReports classes in PHP script using JavaBridge and Docker
- Tomcat Run Php through Php/ Java Bridge
- How do I place files of JavaBridge for my PHP Project?
- How to call a Jasper report (.jasper) from Phalcon
- failed to open stream: HTTP request failed using phpjavabridge
- require_once(): Failed opening required on javabridge
- how to fix operator + undefined for the arguments type(s) int, object
- how to fix evaluation of for looping
- how to set java bridge http local as static port?
- how to call javaBridge Main from java application
- How to run JAR file using php script?
- How to solve javaBridge error php.java.fastcgi.ConnectionException?
- Unable to run the java class from php using PHP-Java Bridge
- Unable to run java file in PHP using PHP Java Bridge
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Translations presumed for answer:
Since the HTML has links to songs, add an
onclick()handler and in the called function, use JavaScript to call an applet method to load the required song.So long as the applet is loading the song from the code base or document base, this should be allowable in a sand-boxed applet. Unfortunately doing so from a method called from JS complicates matters slightly, since the security sand-box is tightened even further.
If that is the case here, it will be necessary to wrap the call in a
PrivilegedActionand call it usingAccessController.doPrivileged(PrivilegedAction)