|
|
|
|
Re: How do I do this? [message #900412 is a reply to message #899833] |
Mon, 06 August 2012 22:09 |
Steve Blass Messages: 276 Registered: July 2009 |
Senior Member |
|
|
Edward Rech wrote on Thu, 02 August 2012 09:55Here's what I got!
Exception in thread "main" java.lang.NoClassDefFoundError: javac
Caused by: java.lang.ClassNotFoundException: javac
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
I put this in the VM thing. In the program thing it just pasted the code and did nothing at all
When using Eclipse you do not have to invoke javac Test.java yourself. Javac is the standard command line java compiler. In Eclipse you either check 'Build Automatically' in the Project menu OR you choose 'Build Project' OR you right-click the project name and choose 'Build Project'. That will compile your java code into classes and place it in a hidden bin folder in your project tree. Then to run the program you can right click the project and choose 'Run-As' -> Java application. That is the equivalent of the command line command 'java Test'. Note that if you have 'Build Automatically' checked then those 'Build Project' options will be greyed out or missing.
To run your test program with the arguments Hello, World you can use the Run menu 'Run-configurations' choice to 1) create a new java application config, 2) put Hello and World in to the program arguments dialog, 3) Run
[Updated on: Mon, 06 August 2012 22:13] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.08622 seconds