Results 1 to 5 of 5
Thread: compiling with comand prompt
- 04-13-2009, 11:39 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 1
- Rep Power
- 0
compiling with comand prompt
Could someone please tell me how to compile a program with comand prompt. ive tried for 5 or 6 hours today and one minute it works one mnute it doesnt
Note that the compiler is named java not javac
What do i have to type in please
Ive tried many ways one was
dir c;\
prompt java:\documents/helloworldframe.class
class exicute but does not work could you exsplain how and tell me preciacly what comands i should type in please it been a year and still cant get vista to do it.
I got it to wotk once by fluke but i tried and tried and cant get it to work PLEASE SAVE ME
Ive done the jframe i think its right
//CODE IS
Import javax.swing.*;
Import javax.swing.frame.*;
import java.util.*;
public class swingframe exstends jframe() {
public static void main(String[] args) {
Frame f = new Frame("this is a swing frame");
f.setdefaultcloseoperation(EXIT-ON_CLOSE);
f.setsize(new dimensions(200, 200));
f.standalone(true);
}
piublic void createrunnableclass() {
runnable = new runableclass(swingframe.class)
}}
- 04-14-2009, 12:24 AM #2
Do you have the JDK installed... If not install it and your apps should work...
Who Cares... As Long As It Works...
- 04-14-2009, 12:26 AM #3
try compiling a simple hello world program first. then report back all errors. also include your path and classpath. and don't forget to install the jdk. what version are you using?
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 04-14-2009, 02:01 AM #4
huh?
The above does not compute. Why in the world is it called different? And if the compiler executable is "Java", then what is the command to run the app? In this case, it couldn't be "Java".Note that the compiler is named java not javac
I may be missing something here but the name of the class and the class file name have to be EXTACTLY the same (case sensitive).prompt java:\documents/helloworldframe.class
.
.
.
public class swingframe exstends jframe() {
helloworldframe != swingframe.
Also, in the above, "extends" is misspelled.
I would suggest installing the JDK and using the correct commands to compile and run your app.
to compile: javac MyJavaProgram.java
to run: java MyJavaProgram
Luck,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 04-14-2009, 03:28 AM #5
if you have already installed JDK 1.X maybe you havent configured your run time environment.. right click mycomputer goto advance then click a button w/ the word run time environment then edit the path put a ";" at the end of the path then paste your java bin path... you ate using windos right?
It's easy to write a code that computers can understand...
... the challenge is to write a code that humans can understand
Similar Threads
-
Is there any way to run java file through command prompt of .jar
By sachin.parnami in forum New To JavaReplies: 2Last Post: 12-03-2008, 01:24 PM -
help me!!!! about command prompt..
By kureikougaiji in forum New To JavaReplies: 2Last Post: 11-13-2008, 06:15 PM -
input prompt
By angelbaby21 in forum New To JavaReplies: 8Last Post: 08-25-2008, 04:22 AM -
How to use DirectoryDialog to prompt for a directory
By Java Tip in forum SWTReplies: 0Last Post: 07-02-2008, 08:00 PM -
How do I show * in a password prompt?
By tanalyw in forum New To JavaReplies: 3Last Post: 04-16-2008, 02:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks