164Re: Running Java
- Feb 4, 2008Michael,
Thanks for the details. The problem seems to be when Java is called to
run the compiled program. I did a quick video (using Jing) to show
what happens: http://screencast.com/t/BJh2c1cSu
I know that this is not good form, using a class directly
(Keyboard.readDouble( )) but this is the second program my students
write for Java I and I build off of this experience as the semester
Thanks for your help in figuring out how to change the script so I can
use the Compile and Run button.
--- In SubEthaEdit@yahoogroups.com, "michael_j_barber"
>the problem is.
> I've taken a look at the Java mode scripts, and I think I know what
> However, I don't really do any Java programming, so I can't becompletely certain. I can tell
> you what to try in order to get things clear, though, and then maybea solution will
> become apparent.run time. The "Compile"
> Here's my thinking. You're seeing an error at compile time, not at
> and "Compile and run" scripts do not call the compiler in the sameway. Both use "do shell
> script" to call out to the shell, but not using the same commandstring.
>document, which is your
> "Compile" switches to the directory containing the front SEE
> main(). It then compiles the document using javac. You don't reallysay, but I'm guessing
> that "Compile" works OK?the compilation. That's
> "Compile and run" doesn't work that way. It just calls javac to do
> equivalent to something like:<peter.johnson@> wrote:
> # cd /
> # javac -encoding UTF8 path/to/your/mainfile.java
> Would that give the error you're seeing from "Compile and run"?
> --- In SubEthaEdit@yahoogroups.com, "Peter K. Johnson"
> > When I use the Compile and Run button on the menu bar SubEthaEdit
> > my classes okay but gives me an error that it can¹t find a classthat is
> > external to the class containing my main( ). Both the class withmain( ) and
> > the class that is called from main( ) are in the same folder.prompt it
> > If I go into Terminal window and run the program from the command
> > works perfectly so I know my code is correct. (It¹s also a verysimple test
> > program.)and Run
> > Is there a script or setting that I can change to get the Compile
> > button to work properly?
> > Peter Johnson
- << Previous post in topic Next post in topic >>