Has anyone had any issues with the tab key in Java 1.5? We are using scoansi and in Java 1.5 it is printing unknown esape character to the console. It works fine under Java 1.4
Thanks,
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The unkown escape was not the real problem. That message was coming from something else.
We did some digging through the code today and found the problem. The problem lies in jta.de.mud.terminal.SwingTerminal
This code was in the constructor:
if (version.startsWith("1.4")) {
try {
Class params[] = new Class[]{boolean.class};
SwingTerminal.class.getMethod("setFocusable", params).invoke(this, new Object[]{new Boolean(true)});
SwingTerminal.class.getMethod("setFocusTraversalKeysEnabled", params).invoke(this, new Object[]{new Boolean(false)});
} catch (Exception e) {
System.err.println("vt320: unable to reset focus handling for java version " + version);
e.printStackTrace();
}
}
It needs to be changed to say 1.4 > on the version instead of just looking at 1.4. We are going to make an attempt to parse the version as a double and do the comparison.
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is due to the problem which is outlined in my 2nd post. We changed the code to the following:
/* we have to make sure the tab key stays within the component */
String version = System.getProperty("java.version");
String versionStart = version.substring(0,3);
double ver = Double.parseDouble(versionStart);
if (ver >= 1.4) {
//if (version.startsWith("1.5")) {
try {
Class params[] = new Class[]{boolean.class};
SwingTerminal.class.getMethod("setFocusable", params).invoke(this, new Object[]{new Boolean(true)});
SwingTerminal.class.getMethod("setFocusTraversalKeysEnabled", params).invoke(this, new Object[]{new Boolean(false)});
} catch (Exception e) {
System.err.println("vt320: unable to reset focus handling for java version " + version);
e.printStackTrace();
}
}
I will add a patch for it in the project.
If you need to get it to work in the mean time, 1.4 will solve your problem.
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has anyone had any issues with the tab key in Java 1.5? We are using scoansi and in Java 1.5 it is printing unknown esape character to the console. It works fine under Java 1.4
Thanks,
Paul
The unkown escape was not the real problem. That message was coming from something else.
We did some digging through the code today and found the problem. The problem lies in jta.de.mud.terminal.SwingTerminal
This code was in the constructor:
if (version.startsWith("1.4")) {
try {
Class params[] = new Class[]{boolean.class};
SwingTerminal.class.getMethod("setFocusable", params).invoke(this, new Object[]{new Boolean(true)});
SwingTerminal.class.getMethod("setFocusTraversalKeysEnabled", params).invoke(this, new Object[]{new Boolean(false)});
} catch (Exception e) {
System.err.println("vt320: unable to reset focus handling for java version " + version);
e.printStackTrace();
}
}
It needs to be changed to say 1.4 > on the version instead of just looking at 1.4. We are going to make an attempt to parse the version as a double and do the comparison.
Paul
TAB key does not seem to work in JTA. In other Telnet client, using TAB will complete the commmand but it JTA, it does not have any effect.
I am using jta26(latest with copy/paste patch) on Java java 1.5 too.
It is due to the problem which is outlined in my 2nd post. We changed the code to the following:
/* we have to make sure the tab key stays within the component */
String version = System.getProperty("java.version");
String versionStart = version.substring(0,3);
double ver = Double.parseDouble(versionStart);
if (ver >= 1.4) {
//if (version.startsWith("1.5")) {
try {
Class params[] = new Class[]{boolean.class};
SwingTerminal.class.getMethod("setFocusable", params).invoke(this, new Object[]{new Boolean(true)});
SwingTerminal.class.getMethod("setFocusTraversalKeysEnabled", params).invoke(this, new Object[]{new Boolean(false)});
} catch (Exception e) {
System.err.println("vt320: unable to reset focus handling for java version " + version);
e.printStackTrace();
}
}
I will add a patch for it in the project.
If you need to get it to work in the mean time, 1.4 will solve your problem.
Paul
Paul,
Does it work now under 1.5 with your patch?
regards,
Bee Hock.
Yes
- Paul