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

Looking for Java Clip for Compiling and Running Simple Prog. in DOS window

Expand Messages
  • dgmfield@pacbell.net
    C:Java; C: Java CoreJavaBook corejava C: Program Files Java jre1.6.0_05 bin C: Program Files Java jre6 bin I am using NoteTab Pro™ 5.6 (Full Version) to
    Message 1 of 4 , Jan 17, 2009
    • 0 Attachment
      C:Java; C:\Java\CoreJavaBook\corejava

      C:\Program Files\Java\jre1.6.0_05\bin

      C:\Program Files\Java\jre6\bin

      I am using NoteTab Pro™ 5.6 (Full Version) to write simple Java
      programs for a class. The programs are all running in a DOS terminal.

      I am looking for a Java clip that will allow me to compile and run
      these simple programs for within NotePad. I imagine that A DOS command
      terminal woudl be opened.

      I have tried the java2cide clip but I must not have it set up
      correctly. The setup files are shown below. When compiled I get no
      error meSSAGE and no class file is generated ( I assume it would be in
      the same directory as the .java file that was compiled was located).


      Anyone have an idea. The programs compile from a dos command javac
      File.Java fine.

      Classpath C:Java; C:\Java\CoreJavaBook\corejava

      C:\Program Files\Java\jre1.6.0_05\bin

      C:\Program Files\Java\jre6\bin


      Thanks,
      dave



      Java setup
      ;*****************if StdError.err is open, close it and delete
      it**********************
      ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err


      ;**********Get and Save the path to the Java bin directory*********
      ;************example: 'e:\jdk1.3.1_01\bin' ***************
      'C:\Program Files\Java\jre1.6.0_05\bin'
      ^!Set %pj2JavaPath%=^?{(T=D)Path to file=^$GetValue(%p_j2JavaPath%)$}
      ^!SaveValue %p_j2JavaPath%=^%pj2JavaPath%
      ;^!ClearVariable %pj2JavaPath%




      Classpath setup
      ;*****************if StdError.err is open, close it and delete
      it**********************
      ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err
      'C:Java; C:\Java\CoreJavaBook\corejava'

      ^!Set %pj2ClassPath%=^$GetValue(%p_j2ClassPath%)$
      ^!SaveValue %p_j2ClassPath%=^?{Set the -classpath for java command
      line=^%pj2ClassPath%}
      ^!ClearVariable %pj2ClassPath%

      ;-classpath "C:Java; C:\Java\CoreJavaBook\corejava"





      JRE setup
      ;*****************if StdError.err is open, close it and delete
      it**********************
      ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err

      'C:\Program Files\Java\jre6\bin'

      ;**********Get and Save the path to the Java bin directory*********
      ;************example: 'e:\jdk1.3.1_01\jre\bin' ***************
      ^!Set %pJrePath%=^?{(T=D)Path to file=^$GetValue(%p_JrePath%)$}
      ^!SaveValue %p_JrePath%=^%pJrePath%
      ^!ClearVariable %pJrePath%








      Compile
      ;*****************if StdError.err is open, close it and delete
      it**********************
      ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err


      ;**********Get the path to the JAVA bin directory (from Java Setup)*****
      ^!Set %j2JavaPath%=^$GetValue(%p_j2JavaPath%)$

      ;^!ShellWait ^%j2JavaPath%\javac ^**

      ;**********Get the -classpath*****
      ^!Set %j2ClassPath%=^$GetValue(%p_j2ClassPath%)$

      ;***************Get the path to the NoteTab directory*******************
      ^!Set %AppPath%=^$GetAppPath$

      ^!Set %compileOptions%=^?{Options=^%compileOptions%}


      ;***************Get the name of the current file************************
      ^!Set %CurFile%=^**


      ;**********Run the JAVA compiler in a console to get the output****
      ^$GetOutput(^%j2JavaPath%\javac ^%compileOptions% ^%j2ClassPath%
      ^%CurFile%)$

      ;***************Check for the output file********************
      ^!IfFileExist ^%AppPath%StdError.err Open ELSE END


      ;***************Open & return the OutPut file*************************
      :Open
      ^!Open ^%AppPath%StdError.err
    • Dan Gagne
      Try using one of the Integrated Development Environments (IDE) such as NetBeans or Eclipse. Either solves your problem by providing a compilation engine,
      Message 2 of 4 , Jan 17, 2009
      • 0 Attachment
        Try using one of the Integrated Development Environments (IDE) such as
        NetBeans or Eclipse. Either solves your problem by providing a
        compilation engine, excellent editor with phrase highlighting, and
        debugging capabilities; letting you concentrate on learning java
        programming, not the mechanics of compilation.

        NoteTab Pro is an excellent text editor and a great scripting engine.
        . . . . you need more.
        http://www.eclipse.org/downloads/
        http://www.netbeans.org/downloads/

        They're free.

        Dan Gagne

        --- In ntb-clips@yahoogroups.com, "dgmfield@..." <david.gillooly@...>
        wrote:
        >
        > C:Java; C:\Java\CoreJavaBook\corejava
        >
        > C:\Program Files\Java\jre1.6.0_05\bin
        >
        > C:\Program Files\Java\jre6\bin
        >
        > I am using NoteTab Pro™ 5.6 (Full Version) to write simple Java
        > programs for a class. The programs are all running in a DOS terminal.
        >
        > I am looking for a Java clip that will allow me to compile and run
        > these simple programs for within NotePad. I imagine that A DOS command
        > terminal woudl be opened.
        >
        > I have tried the java2cide clip but I must not have it set up
        > correctly. The setup files are shown below. When compiled I get no
        > error meSSAGE and no class file is generated ( I assume it would be in
        > the same directory as the .java file that was compiled was located).
        >
        >
        > Anyone have an idea. The programs compile from a dos command javac
        > File.Java fine.
        >
        > Classpath C:Java; C:\Java\CoreJavaBook\corejava
        >
        > C:\Program Files\Java\jre1.6.0_05\bin
        >
        > C:\Program Files\Java\jre6\bin
        >
        >
        > Thanks,
        > dave
        >
        >
        >
        > Java setup
        > ;*****************if StdError.err is open, close it and delete
        > it**********************
        > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err
        >
        >
        > ;**********Get and Save the path to the Java bin directory*********
        > ;************example: 'e:\jdk1.3.1_01\bin' ***************
        > 'C:\Program Files\Java\jre1.6.0_05\bin'
        > ^!Set %pj2JavaPath%=^?{(T=D)Path to file=^$GetValue(%p_j2JavaPath%)$}
        > ^!SaveValue %p_j2JavaPath%=^%pj2JavaPath%
        > ;^!ClearVariable %pj2JavaPath%
        >
        >
        >
        >
        > Classpath setup
        > ;*****************if StdError.err is open, close it and delete
        > it**********************
        > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err
        > 'C:Java; C:\Java\CoreJavaBook\corejava'
        >
        > ^!Set %pj2ClassPath%=^$GetValue(%p_j2ClassPath%)$
        > ^!SaveValue %p_j2ClassPath%=^?{Set the -classpath for java command
        > line=^%pj2ClassPath%}
        > ^!ClearVariable %pj2ClassPath%
        >
        > ;-classpath "C:Java; C:\Java\CoreJavaBook\corejava"
        >
        >
        >
        >
        >
        > JRE setup
        > ;*****************if StdError.err is open, close it and delete
        > it**********************
        > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err
        >
        > 'C:\Program Files\Java\jre6\bin'
        >
        > ;**********Get and Save the path to the Java bin directory*********
        > ;************example: 'e:\jdk1.3.1_01\jre\bin' ***************
        > ^!Set %pJrePath%=^?{(T=D)Path to file=^$GetValue(%p_JrePath%)$}
        > ^!SaveValue %p_JrePath%=^%pJrePath%
        > ^!ClearVariable %pJrePath%
        >
        >
        >
        >
        >
        >
        >
        >
        > Compile
        > ;*****************if StdError.err is open, close it and delete
        > it**********************
        > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc ^%AppPath%StdError.err
        >
        >
        > ;**********Get the path to the JAVA bin directory (from Java Setup)*****
        > ^!Set %j2JavaPath%=^$GetValue(%p_j2JavaPath%)$
        >
        > ;^!ShellWait ^%j2JavaPath%\javac ^**
        >
        > ;**********Get the -classpath*****
        > ^!Set %j2ClassPath%=^$GetValue(%p_j2ClassPath%)$
        >
        > ;***************Get the path to the NoteTab directory*******************
        > ^!Set %AppPath%=^$GetAppPath$
        >
        > ^!Set %compileOptions%=^?{Options=^%compileOptions%}
        >
        >
        > ;***************Get the name of the current file************************
        > ^!Set %CurFile%=^**
        >
        >
        > ;**********Run the JAVA compiler in a console to get the output****
        > ^$GetOutput(^%j2JavaPath%\javac ^%compileOptions% ^%j2ClassPath%
        > ^%CurFile%)$
        >
        > ;***************Check for the output file********************
        > ^!IfFileExist ^%AppPath%StdError.err Open ELSE END
        >
        >
        > ;***************Open & return the OutPut file*************************
        > :Open
        > ^!Open ^%AppPath%StdError.err
        >
      • dgmfield@pacbell.net
        Thanks for your input. Yes I have used NetBeans for some simple Ruby programs and have tried it for Java too. It is nice! My Java class is pretty basic so
        Message 3 of 4 , Jan 18, 2009
        • 0 Attachment
          Thanks for your input. Yes I have used NetBeans for some simple Ruby
          programs and have tried it for Java too. It is nice!

          My Java class is pretty basic so Notepad and the terminal window are
          all I need but I thought I would give NotePad and its capability a
          try. I like to avoid the IDEs when I learn a language basics but that
          is my own personal preference.

          I have also looked at a Windows editor called e
          (http://www.e-texteditor.com/) that is similar to TextMate. I have
          used it for Ruby work but since it was not free have not tried it for
          Java. It uses CYGWIN.

          Thanks for the help.

          Dave



          --- In ntb-clips@yahoogroups.com, "Dan Gagne" <dgagne@...> wrote:
          >
          > Try using one of the Integrated Development Environments (IDE) such as
          > NetBeans or Eclipse. Either solves your problem by providing a
          > compilation engine, excellent editor with phrase highlighting, and
          > debugging capabilities; letting you concentrate on learning java
          > programming, not the mechanics of compilation.
          >
          > NoteTab Pro is an excellent text editor and a great scripting engine.
          > . . . . you need more.
          > http://www.eclipse.org/downloads/
          > http://www.netbeans.org/downloads/
          >
          > They're free.
          >
          > Dan Gagne
          >
          > --- In ntb-clips@yahoogroups.com, "dgmfield@" <david.gillooly@>
          > wrote:
          > >
          > > C:Java; C:\Java\CoreJavaBook\corejava
          > >
          > > C:\Program Files\Java\jre1.6.0_05\bin
          > >
          > > C:\Program Files\Java\jre6\bin
          > >
          > > I am using NoteTab Pro™ 5.6 (Full Version) to write simple Java
          > > programs for a class. The programs are all running in a DOS terminal.
          > >
          > > I am looking for a Java clip that will allow me to compile and run
          > > these simple programs for within NotePad. I imagine that A DOS command
          > > terminal woudl be opened.
          > >
          > > I have tried the java2cide clip but I must not have it set up
          > > correctly. The setup files are shown below. When compiled I get no
          > > error meSSAGE and no class file is generated ( I assume it would be in
          > > the same directory as the .java file that was compiled was located).
          > >
          > >
          > > Anyone have an idea. The programs compile from a dos command javac
          > > File.Java fine.
          > >
          > > Classpath C:Java; C:\Java\CoreJavaBook\corejava
          > >
          > > C:\Program Files\Java\jre1.6.0_05\bin
          > >
          > > C:\Program Files\Java\jre6\bin
          > >
          > >
          > > Thanks,
          > > dave
          > >
          > >
          > >
          > > Java setup
          > > ;*****************if StdError.err is open, close it and delete
          > > it**********************
          > > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc
          ^%AppPath%StdError.err
          > >
          > >
          > > ;**********Get and Save the path to the Java bin directory*********
          > > ;************example: 'e:\jdk1.3.1_01\bin' ***************
          > > 'C:\Program Files\Java\jre1.6.0_05\bin'
          > > ^!Set %pj2JavaPath%=^?{(T=D)Path to file=^$GetValue(%p_j2JavaPath%)$}
          > > ^!SaveValue %p_j2JavaPath%=^%pj2JavaPath%
          > > ;^!ClearVariable %pj2JavaPath%
          > >
          > >
          > >
          > >
          > > Classpath setup
          > > ;*****************if StdError.err is open, close it and delete
          > > it**********************
          > > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc
          ^%AppPath%StdError.err
          > > 'C:Java; C:\Java\CoreJavaBook\corejava'
          > >
          > > ^!Set %pj2ClassPath%=^$GetValue(%p_j2ClassPath%)$
          > > ^!SaveValue %p_j2ClassPath%=^?{Set the -classpath for java command
          > > line=^%pj2ClassPath%}
          > > ^!ClearVariable %pj2ClassPath%
          > >
          > > ;-classpath "C:Java; C:\Java\CoreJavaBook\corejava"
          > >
          > >
          > >
          > >
          > >
          > > JRE setup
          > > ;*****************if StdError.err is open, close it and delete
          > > it**********************
          > > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc
          ^%AppPath%StdError.err
          > >
          > > 'C:\Program Files\Java\jre6\bin'
          > >
          > > ;**********Get and Save the path to the Java bin directory*********
          > > ;************example: 'e:\jdk1.3.1_01\jre\bin' ***************
          > > ^!Set %pJrePath%=^?{(T=D)Path to file=^$GetValue(%p_JrePath%)$}
          > > ^!SaveValue %p_JrePath%=^%pJrePath%
          > > ^!ClearVariable %pJrePath%
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > > Compile
          > > ;*****************if StdError.err is open, close it and delete
          > > it**********************
          > > ^!IfFileExist ^%AppPath%StdError.err ^!DestroyDoc
          ^%AppPath%StdError.err
          > >
          > >
          > > ;**********Get the path to the JAVA bin directory (from Java
          Setup)*****
          > > ^!Set %j2JavaPath%=^$GetValue(%p_j2JavaPath%)$
          > >
          > > ;^!ShellWait ^%j2JavaPath%\javac ^**
          > >
          > > ;**********Get the -classpath*****
          > > ^!Set %j2ClassPath%=^$GetValue(%p_j2ClassPath%)$
          > >
          > > ;***************Get the path to the NoteTab
          directory*******************
          > > ^!Set %AppPath%=^$GetAppPath$
          > >
          > > ^!Set %compileOptions%=^?{Options=^%compileOptions%}
          > >
          > >
          > > ;***************Get the name of the current
          file************************
          > > ^!Set %CurFile%=^**
          > >
          > >
          > > ;**********Run the JAVA compiler in a console to get the output****
          > > ^$GetOutput(^%j2JavaPath%\javac ^%compileOptions% ^%j2ClassPath%
          > > ^%CurFile%)$
          > >
          > > ;***************Check for the output file********************
          > > ^!IfFileExist ^%AppPath%StdError.err Open ELSE END
          > >
          > >
          > > ;***************Open & return the OutPut file*************************
          > > :Open
          > > ^!Open ^%AppPath%StdError.err
          > >
          >
        • Don - HtmlFixIt.com
          ... There is no doubt in my mind that you can do what you want in notetab. It is quite powerful. There are clips for perl for example, so I think it
          Message 4 of 4 , Jan 18, 2009
          • 0 Attachment
            dgmfield@... wrote:
            > Thanks for your input. Yes I have used NetBeans for some simple Ruby
            > programs and have tried it for Java too. It is nice!
            >
            > My Java class is pretty basic so Notepad and the terminal window are
            > all I need but I thought I would give NotePad and its capability a
            > try. I like to avoid the IDEs when I learn a language basics but that
            > is my own personal preference.
            >
            > I have also looked at a Windows editor called e
            > (http://www.e-texteditor.com/) that is similar to TextMate. I have
            > used it for Ruby work but since it was not free have not tried it for
            > Java. It uses CYGWIN.
            >
            > Thanks for the help.
            >
            > Dave

            There is no doubt in my mind that you can do what you want in notetab.
            It is quite powerful. There are clips for perl for example, so I think
            it definitely can be done.
          Your message has been successfully submitted and would be delivered to recipients shortly.