I've been trying for the last several days to get either an instance of a class (or an
applet which does the same thing) to run in an application I have written. It's a pretty robust piece of software, which may be why I'm not able to implement it successfully. I posted about this yesterday but sadly didn't end up with a working solution.
My IDEAL would be to run this plugin in a frame, I assume. The applet was, I had hoped, the easier of the two solutions but after spending about 20 hours trying to get this to work I may have been mistaken. I'm very new to
Java, sort of learning by trial-by-fire, and up until now, it was going OK. I'm probably missing something very simple. I'll try to explain it as best I can:
The plugin is called JTA. It's an SSH terminal that can run as an applet or independantly.
From the website,
http://javassh.org/space/Installing+as+a+local+Telnet/SSH+Application:
There are two ways to operate the program. One is to simply start it and to configure everything within the application or to give arguments, like host and port, on the command line. The first way may be the least complicated as the menu entries are self descriptive. End users may find the application mode interesting as it provides a fast and reliable telnet implementation to login to other workstations or text-based online games, such as MUDs.
Regarding MAIN, the class I am attempting to run in my frame:
The Application (Main)
There are two ways to operate the program. One is to simply start it and to configure everything within the application or to give arguments, like host and port, on the command line. The first way may be the least complicated as the menu entries are self descriptive. You need to have installed a java runtime environment or java development kit to run the application. On Microsoft Windows systems an installed Internet Explorer with Java support should suffice though.
Quickstart
Make sure either the program java (JRE, JDK) or jview (Windows IE) is in your path. Optionally you may set the environment variable CLASSPATH to point to the file jta20.jar (see the box to the right for more information). Then try the following command:
JRE or JDK on UNIX or Windows (for Windows and IE installed, use jview instead)
java de.mud.jta.Main
alternative:
java -jar jta20.jar
Now
you should see the following output:
** JTA - Telnet/SSH for the JAVA(tm) platformn
** Version 2.0 for Java 1.1.x and Java 2
** Copyright (c) 1996-2000 Matthias L. Jugel, Marcus Meissner
** Build: 20000627-1208
jta: loading plugin 'Status' ...
jta: loading plugin 'Socket' ...
jta: loading plugin 'Telnet' ...
jta: loading plugin 'Terminal' ...
Some other messages might appear, but unless you see an Exception a window should appear on your screen and prompt you for login into your local host. If you are running on windows you will probably see an error message and should append the target host you want to connect to to the command line above.
Command Line Options
The application understand several command line arguments to configure the way it looks and where to initially connect to. The following command line arguments are possible:
de.mud.jta.Main [-plugins pluginlist]
[-addplugin plugin]
[-config file]
[host [port]]
(Options enclosed in brackets are optional and may be left out.)
I have attempted to use this is a JInternalFrame and also in a new
test application. For the sake of simplicity I'll post my test application:
and Main:
It seems I can't figure out how to run it correctly. The error I'm getting is NO SUITABLE METHOD FOUND FOR ADD.
Full disclosure, I posted about this in applets yesterday when I was trying the applet approach!