Menu

Compiling under JDK1.5

Help
Gavi Narra
2005-03-15
2013-04-29
  • Gavi Narra

    Gavi Narra - 2005-03-15

    Hi I got compile errors under JDK 1.5.0. Looks like enum was used as a variable name, once i fixed those in the source code, i still get an error

    the details are below

        [javac] C:\work\j2ssh\src\com\sshtools\daemon\session\SessionChannelServer.j
    ava:564: getState() in com.sshtools.daemon.session.SessionChannelServer.ProcessM
    onitorThread cannot override getState() in java.lang.Thread; attempting to use i
    ncompatible return type
        [javac] found   : com.sshtools.j2ssh.util.StartStopState
        [javac] required: java.lang.Thread.State
        [javac]         public StartStopState getState() {
        [javac]                               ^
        [javac] Note: * uses or overrides a deprecated API.
        [javac] Note: Recompile with -Xlint:deprecation for details.
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 1 error
        [javac] 1 warning

     
    • david buchmann

      david buchmann - 2005-03-22

      looks like you tried to compile j2ssh from the sshtools project: http://sourceforge.net/projects/sshtools/
      i would ask there.

      i do not know if there is any relation of this project with the sshtools project, which provides an ssh implementation named j2ssh. clarification by the project founder would be nice...

      @boardsonair: if you did not know the sshtools project yet, it seems mostly dead. a continuation of their work would be just great. bug fixing and completion of the javadoc etc...

       
    • Kurt Risser

      Kurt Risser - 2007-03-06

      Hi
      I also had this problem.  Java 1.5 added getState() to it's Thread class, so the compiler doesn't allow it to be overrriden.  I got around this problem by renaming the variable 'state' in class SubsystemServer, then changing all references to it and it's setter/getters throughout the sources.  You could call it anything; I called it ssState, and changed it's getter and setter methods to getSsState(), setSsState().  Once these are changed, the code will compile and work.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.