Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Java Class replacing STRPCCMD

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

  • Java Class replacing STRPCCMD

    Not built in, but you can write a utility using sockets or data queues to execute PC commands. Or you can take advantage of the fact that someone has already done so. First, check out this article: http://www.mcpressonline.com/mc/.214...onID=.5bfbae57 The source that it mentions is no longer on the MC website, but a kind soul just emailed it to me, and I'd be happy to send it to you if you think it would do what you want.

  • #2
    Java Class replacing STRPCCMD

    Hi Kengle, My name is Jeffreehy and I'm looking for the source code of the two Java source codes: 1.CommandServerJSK.java 2.CommandServerJDQ if you like to share with me, I will appreciate very much, Thank you in advance, my e-mail address is: jeffreehy@ingenieriagerencial.com Regards.

    Comment


    • #3
      Java Class replacing STRPCCMD

      Here you go! Victoria Mack, Editor, MC Mag Online

      Donnell--PC Commands--Oct2000.zip

      Comment


      • #4
        Java Class replacing STRPCCMD

        Nice! I already emailed Jeff a similar zip file, with a warning that I will now post here: There's a bug or two in the code for CommandServerJSK that kept it from compiling for me. Here are the changes I had to make, developing in Eclipse:[*]On the Import statements in CommandServerJSK change import CloseWindowAndExit; to import CloseWindowAndExit.*;[*]The code I had didn't have a constructor for InputThread; however, the .zip file posted here does.[*]there's a block of code that looks like this: setVisible( true ); commandWindow.setEditable(false); commandWindow.append("Listening on Port " + Port); commandWindow.setVisible(false); I don't know why the setVisible(false) is there, as it prevents anything from showing in the window. I removed the line commandWindow.setVisible(false); and the code works fine. Don't know why it was there in the first place. Victoria, do you? So now here's a question of my own. Is it possible for the CommandServerJSK class to be referenced on an APPLET tag in HTML? That is, if the class resides on the local machine, would applet security issues prevent PC commands from running? If not, what changes need to be made to the code to run it? What about if the class is stored on the AS400 IFS? Currently, when I attempt to call the class as an applet on the local machine, the window appears and says "Listening on port 4050", then disappears. The browser window which calls the applet has the error message "java.lang.IllegalArgumentException: adding a window to a container". Alternatively, is there a way for the JVM used by the web browser to be accessed other than on an applet call? Basically, I'm trying to avoid installing the JRE on upwards of 250 PC's spread up and down the east coast if I can avoid it. Thanks for any answers, Keith

        Comment


        • #5
          Java Class replacing STRPCCMD

          The "wjview" command in place of the "java" command does the trick. Parameters are slightly different than the "java" command is all.

          Comment


          • #6
            Java Class replacing STRPCCMD

            I have downloaded both utilities and have been running into some problems. Please be patient as I am new to java and not so experienced in bound programs. First, I was able to compile the CommandServerJSK (with the import CommandWindowandExit statement). Seemed to work/run fine. I have both the command and RPG program compiled, and when I run the program, nothing happens. I can tell that the RPG program is getting to my pc IP address, just the java window stays open with nothing inside. Any thoughts??? Second on the CommandServerJDQ java program, I can't seem to get this compiled. The first error is "package com.ibm.as400.access does not exist". This path is available and I can see the objects required later in the java program within the folder. I've tried compiling from a number of folders, changed both path and classpath settings and still nothing. Any help? Thanks for any help, Jim

            Comment


            • #7
              Java Class replacing STRPCCMD

              Is there somewhere on my iSeries a Java Class replacing the STRPCCMD command?

              Comment


              • #8
                Java Class replacing STRPCCMD

                Is there a way that I can run this in the background when a PC starts up?...perhaps without having the windows visible?... Shane

                Comment

                Working...
                X