Shell - Java compile code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Shell - Java compile code

Tore Nilsen via use-livecode
To compile Java code do the following;

1.  Open a text editor and paste the Java code

public class ArgExample {
    public static void main(String[] args) {
        for(int i = 0; i < args.length; i++) {
            System.out.println(args[i] + " is arg " + (i+1));

Save the file on Desktop as
Make sure you save it as Plain Text.
After you saved it make sure the filename has
the extension ,java such as

2.  Open the Terminal app and type:

cd ~/desktop

After it has been compiled it will appear
on the desktop as ArgExample.class.

That is the file you call in Livecode.


use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences: