Re: java not working!

  • From: "black ares" <matematicianu2003@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sun, 20 Sep 2009 07:31:40 +0300

you must specify a classpath or to be in the folder with the class generated. For example we have a program named TestApp, it is formed by a single class with same name written in a sourcecode file with same name.

1. run javac TestApp.java
2. in the directory where the .class file is run java TestApp or
3. let think that our file is in c:\program\shell and it is named TestApp.class
tand we are in c:\windows than you must run:
java -cp c:\program\shell TestApp.
You don't specified how the class is called, the class with main method.
I assume that it is called also shell.

so for your case:
javac c:\prog\shell\shell.java
java -cp c:\prog\shell shell

best regards
----- Original Message ----- From: "Alex Hall" <mehgcap@xxxxxxxxx>
To: "Blind Programming List" <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, September 19, 2009 7:28 PM
Subject: java not working!


Hi all,
My class is working in java. I have the entire jdk installed, but I cannot run any class files that javac gives me; in fact, I do not even hear anything after calling javac on my java source file. I edit in edSharp, but have not yet braved the compiling from within edsharp experience. Any thoughts? The path is c:\prog\shell\shell.java, so all I do s go to the command line (Vista) and type:
javac c:\prog\shell\shell.java

Now, how do I run the resulting class file (which does not always appear)? I thought it was just java c:\prog\shell\shell, but that is not working. Any help would be great so I can start writing what I have to write.


Have a great day,
Alex
New email address: mehgcap@xxxxxxxxx
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: