Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Using Java Compiler

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Java Compiler

    Make sure you use the correct case. Java is case sensitive. The name of the source file should be "CommandServerJSK.java" not "CommandserverJSk.java". If you happened to have renamed the source file when you downloaded it, just rename it to "CommandServerJSK.java", then try to compile it again.

  • #2
    Using Java Compiler

    Thanks Shannon but still the same result. I think I did try that before.

    Comment


    • #3
      Using Java Compiler

      That error, " error: Can't read: CommandserverJSk.java " only occurs when you are trying to compile a java program and the name you are using on the javac command does not match the name in the java source file itself. That is, the name of the java program (any java program) is specified on the line of java code (in the source) that starts out Public class and that name must match both the name of the source file itself and the name you use on the javac command. That's one of the many pains of java programming, but it's not too bad once you get used to it. For the CommandServerJSK.java program, the public class line reads: public class CommandServerJSK extends Frame So edit that source file (use the edit command in DOS Or NOTEPAD.EXE in Windows) and check out what name is used there on that line. (it'll match what you see here). Then, use DOS (it's easier in DOS) and display the directory where you have that source file and check out the name there. It should match, EXACTLY, the name on the Public class line in the source file (including case). Also, the source file should have the file extension ".java". Then compile the class using the javac command, ensuring that the name you use matches the name of the class exactly. Also, make sure you put the .java extension on the file name when you compile it. If you do all this, then that example should compile without a problem. Let me know...

      Comment


      • #4
        Using Java Compiler

        I think you said any program you try gets the same message. Have you compiled and run a simple Hello, World program to confirm that your environment, path settings, etc. are working before trying more complex programs? Also, I believe (it's been more than a year) I put a -verbose setting on the javac command to get disgnostics of what it was trying and seeing. I piped the output to a file and then viewed the file. My limited experience was on a PC, though. Ralph

        Comment


        • #5
          Using Java Compiler

          Okay now I feel stupid. It turned out to be my path settings. Shannon and Ralph thanks for your help. You might hear from me again as I work my way through this.

          Comment


          • #6
            Using Java Compiler

            I never did get much Java written, Larry. I kept getting bogged down with all the permutations of applet/application, AWT/Swing, 1.1/1.2, JDK/JRE, class/jar, default/package, and "set path =" versus the path directive. I got them all to work, but at a cost. Ralph

            Comment


            • #7
              Using Java Compiler

              Can anybody help me find the link to the CommandServerJSK.java and the AS/400 command, EXPCCMD, and the RPG IV program PCCMD0R1 on the AS/400. thanx in advance.

              Comment


              • #8
                Using Java Compiler

                hi Shannon I'm unable to find the AS/400 Program listings on the site. Could you let me know how to get them ? Many thanks Sean Cronin

                Comment


                • #9
                  Using Java Compiler

                  Could you send them to me and maybe between us we could get it solved . thanks Sean

                  Comment


                  • #10
                    Using Java Compiler

                    "Can anybody help me find the link to the CommandServerJSK.java and the AS/400 command, EXPCCMD, and the RPG IV program PCCMD0R1 on the AS/400. thanx in advance." Yeah, what he said. This is the perfect solution to a problem I'm having, and I'd really like the code for it. It would certainly save me from having to write it myself. Keith

                    Comment


                    • #11
                      Using Java Compiler

                      I have the source code, but won't be able to post it until tonight. When MC announced 2 years ago that the magazine was shutting down, I spent a lot of time downloading code the following weekend! I thought this website was going away. Chris

                      Comment


                      • #12
                        Using Java Compiler

                        Excellent, thank you!

                        Comment


                        • #13
                          Using Java Compiler

                          Got the code I was looking for via a member of another bulletin board. If anyone is still looking for this, feel free to let me know.

                          Comment


                          • #14
                            Using Java Compiler

                            Java is new to me so please be kind. I am trying to use CommandserverJSk a java application written by Shannon O'Donnell. This is from an article he wrote in the Oct. 2000 issue of Midrange Computing about PC commands from the AS/400. When I try to compile this I get a message back error: Can't read: CommandserverJSk.java I get this when I try to compile any java source file on my PC. What am I doing wrong? Thanks in advance for any help.

                            Comment


                            • #15
                              Using Java Compiler

                              When i tried to run the command from as400, pc socket access denied some machiens has this problem what's the problem Please help me

                              Comment

                              Working...
                              X