DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
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..

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links