function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AndykAndyk 

How to call java class file in Scontrol

I have a simple helloWorld java class file that i have attached to an Scontrol, can someone tell me how to execute this java file within javascript in Scontrol.
 
public class hello
{
 public static void main(String[] args)
 {
  System.out.println("Hello World!");
 }
}
sfdcfoxsfdcfox
From what I remember of Java (back from the old days of, say, Java 1.3), this code shouldn't run in a browser with any effect-- there's no console to print to (stdout is normally mapped to nul for programs that use a GUI, such as Internet Explorer). Ordinarily, you'd subclass Applet and override the init() or start() method, which is then called when the applet is displayed in the page. Then, you can call Graphics.drawString() to display "Hello World" on the screen... Any Java website should have an example you can try.