Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java supports DOS?  RSS feed

 
Punitha Manohar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
Whether java classes run in machine which has only DOS OS.
anyone reply me.
 
Narayana Murthy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Manohar
Java is not os specific language it doesn't require more than DOS os to execute its class files.
Interpreter will execute the byte code of java class ,that all requires is for invoke java interpreter we have to set the classpath of jdk then it will be executed in dos environment also.
This is perfetcly right environment for java to execute its class files.
 
Punitha Manohar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Murthy,
Thanks for replying.But in DOS os the files will be stored
with extension .jav(it takes only three characters).Then how
a interpreter can run this file.
Also whether it is possible to run a class file in UNIX machine
which has been compiled in some other OS.Whether we should
put the java file also on UNIX machine and compile it here or
only class files are needed to be placed here.
from
Punitha

 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not aware of a Java Virtual machine for DOS. Although there could potentially be a J2ME targetted at DOS. There are several important areas where DOS is hard for a full Java system. Java specifies its class files must have the extension ".class"; Java includes AWT and Swing graphics as core components and DOS has no graphics subsystem; Java includes network access as a core component and DOS has no network connectivity subsystem; DOS has only a single-process model with no support for threading and so on. Java requires a lot more memory than typical DOS software, and DOS has no virtual memory mechanism, so that old 4MB DOS box will probably be too small anyway.
In general, if you have an old DOS machine and want to run Java on it, you are much better off putting a small Linux installation on it - Linux is a much better host for Java than DOS ever will be.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!