Loading ...
Sorry, an error occurred while loading the content.

164Re: Running Java

Expand Messages
  • petermankato
    Feb 4, 2008
    • 0 Attachment
      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"
      <michael_j_barber@...> wrote:
      > I've taken a look at the Java mode scripts, and I think I know what
      the problem is.
      > However, I don't really do any Java programming, so I can't be
      completely certain. I can tell
      > you what to try in order to get things clear, though, and then maybe
      a solution will
      > become apparent.
      > Here's my thinking. You're seeing an error at compile time, not at
      run time. The "Compile"
      > and "Compile and run" scripts do not call the compiler in the same
      way. Both use "do shell
      > script" to call out to the shell, but not using the same command
      > "Compile" switches to the directory containing the front SEE
      document, which is your
      > main(). It then compiles the document using javac. You don't really
      say, but I'm guessing
      > that "Compile" works OK?
      > "Compile and run" doesn't work that way. It just calls javac to do
      the compilation. That's
      > equivalent to something like:
      > # 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"
      <peter.johnson@> wrote:
      > >
      > > 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 class
      that is
      > > external to the class containing my main( ). Both the class with
      main( ) and
      > > the class that is called from main( ) are in the same folder.
      > >
      > > If I go into Terminal window and run the program from the command
      prompt it
      > > works perfectly so I know my code is correct. (It¹s also a very
      simple test
      > > program.)
      > >
      > > Is there a script or setting that I can change to get the Compile
      and Run
      > > button to work properly?
      > >
      > > Peter Johnson
      > >
    • Show all 4 messages in this topic