java and Dos


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: java and Dos

  1. #1
    Join Date
    Oct 2003
    Posts
    2

    java and Dos

    probably a stupid question but i cant open up JAVA the normal way, how do you open it in DOS??
    thanx..

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    "open" Java? Do you mean compile a Java program? Compile a Java program?
    ArchAngel.
    O:-)

  3. #3
    Join Date
    Sep 2003
    Posts
    16
    Well, to compile a program, you need to use the javac command. Lets say the development software was saved in the C:\Java, then when you are in the folder with your .java file that you wish to compile, type:
    c:\Java\bin\javac <filename>.java

    This compiles it. To run it, simply type java <filename>.java. If it is an applet, then you need to create a html page that will look something like this:

    <applet code = "<filename>" width=300 height=300>
    </applet>

    Place the class file in the same directory as the html file, and then open up the html file.

    Did that answer your question? Not sure if I really knew what you wanted, so I might've completely wasted your time. I'm not exactly sure what you meant by open in DOS ...
    Jerod Brown

  4. #4
    Join Date
    Oct 2003
    Posts
    2
    thanx for the replies guys. i got the problem fixed.. i actually could not get java started at all. but it appears to be workin now. so thanx again..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center