0
How to compile and run on a mac with sublime text.
The instructions say: Open a command prompt window and go to the directory in which you saved the file. We'll say that it's C:\sololearn. To compile your code, type javac ExampleProgram.java, and press Enter. If there are no errors in your code, the command prompt will take you to the next line and generate a bytecode file, ExampleProgram.class. and then: Now, when we have the .class file containing the bytecode, we can run it. Type java ExampleProgram to run your program. This will print "Hello World" to the command prompt window. can someone explain how to do this using a mac with sublime. thanks
3 Respostas
+ 1
in sublime you can go to Tools>Build or press Ctrl+B to build your project (it may give you a choice of compiler, javac should be listed)
but you have to make sure you have the Java Development Kit properly installed
+ 1
sublime will compile the Java file and run it at the same time. otherwise just do what the tutorial told you.
you read the tutorial didn't you?
0
But how do you run it?