Step By Step |
Now run the Java application (theMain
class) with the Java interpreter, as follows:
If you included thejava Mainmain
routine within theHelloWorld
class (as described in Step 1:Write the Java Code, then run it as follows:java HelloWorldIn either case, you should see the following output:
If you see an exception like this one:Hello World!then you don't have your library path set up correctly. The library path is a list of directories that the Java runtime system searches when loading libraries. Set your library path now, and make sure that the name of the directory where thejava.lang.UnsatisfiedLinkError: no hello in shared library path at java.lang.Runtime.loadLibrary(Runtime.java) at java.lang.System.loadLibrary(System.java) at at java.lang.Thread.init(Thread.java)hello
library lives is in it.
Step By Step |