Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest release not running properly on Eclipse? #115

Closed
IshaqIdris opened this issue Apr 25, 2018 · 22 comments
Closed

Latest release not running properly on Eclipse? #115

IshaqIdris opened this issue Apr 25, 2018 · 22 comments

Comments

@IshaqIdris
Copy link

Subject of the issue

Ran JTerm.java as Java application in Eclipse. Got error on line 142 of JTerm.java. Commented out the line and the program ran but no commands worked or were recognised in the terminal.

Your environment

  • Mac OS High SIerra
  • Java 1.8
  • JTerm v0.70

Steps to reproduce

Created new project in Eclipse by downloading source code zip, and ran JTerm.java as java application.

Expected behaviour

Program should have run with commands, as the runnable JAR works fine.

Actual behaviour

With line 142 in JTerm.java the program crashes with a index out of bound error.
When commented out the program runs but no commands are recognised in the terminal application.

@IshaqIdris IshaqIdris changed the title Latest release not running on Eclipse? Latest release not running properly on Eclipse? Apr 25, 2018
@nanoandrew4
Copy link
Contributor

Seems like the command classes aren't being found, and the crash is caused by trying to remove an item from an empty list. @Sergix @DataSecs I have no idea how the classes get loaded, any ideas? May just have to do with using the wrong path to load them or something... There is a note on line 141 that says there is a similar issue on a Linux distro.

@Sergix
Copy link
Owner

Sergix commented Apr 25, 2018

@lshaqldris Try working off of the dev branch rather than the master to see if it runs there. Also, can you post a stacktrace of the error so I can look at it in more detail?

@Sergix
Copy link
Owner

Sergix commented Apr 25, 2018

From what I can tell, that specific line has been changed/removed since the last push to master.

@jakers1776
Copy link

is there any news as to how to make it run?

@Sergix
Copy link
Owner

Sergix commented Apr 30, 2018

Do you have the same issue as @lshaqldris , @jakers821?

@jakers1776
Copy link

I am getting this error:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.remove(ArrayList.java:492)
at jterm.JTerm.initCommands(JTerm.java:142)
at jterm.JTerm.main(JTerm.java:66)

@Sergix
Copy link
Owner

Sergix commented May 1, 2018

Yeah, that’s basically the same issue. This means you’re working off of the master branch currently. To run it, switch to the dev branch and everything should be good. If this doesn’t work, please provide another stacktrace. Thanks, and reply back with your result! 😄

@jakers1776
Copy link

Thanks that worked!

@IshaqIdris
Copy link
Author

I moved to the dev branch, the terminal opens now but the commands don't appear to work still?
This is what happens: https://pasteboard.co/Hj6RKYb.png
And theres no error in the console

@jakers1776
Copy link

Same issue here.

@Sergix
Copy link
Owner

Sergix commented May 2, 2018

@IshaqIdris @jakers821 Try the following command from your systems terminal: java -jar [jterm jar file] headless, replacing the [jterm jar file] with the path to where JTerm built on your computer. This will launch JTerm in non-GUI mode. If this successfully works then we will know that your issue is GUI-only, which is what I’m trying to narrow down.

@IshaqIdris
Copy link
Author

@Sergix here's what happens when I run the build in headless mode https://pasteboard.co/HjnLWMk.png , is this the expected behaviour?

@Sergix
Copy link
Owner

Sergix commented May 2, 2018

No, sadly it’s not haha. It does seem to load correctly, but I suppose command input as a whole is somewhat broken. I’ll look around and see what I can find. I’ll reply back soon, and if at all possible you could perhaps test a couple things for me since I don’t have a Mac. @jakers821 , what OS are you on?

@IshaqIdris
Copy link
Author

@Sergix just running the build JAR appears to work https://pasteboard.co/HjnPbyq.png , and yea I don't mind testing some things for you

@Sergix
Copy link
Owner

Sergix commented May 3, 2018

Hm ok, that’s odd...

@Sergix
Copy link
Owner

Sergix commented May 3, 2018

@IshaqIdris Ok, I just pushed a commit on the dev branch with a couple testing lines. I need you to build and run the program in headless mode. Right under the Licensing information, there should be a TEST LINE (OS): with a true/false value beside it, which I need to know. Then run a command, it can be anything, I just need to see the output of it. If possible a screenshot of the terminal window would be best as you have been doing.

@IshaqIdris
Copy link
Author

@Sergix I ran the new commit, the test line prints out true as shown by this screenshot https://pasteboard.co/HjyzlzR.png and also shows the output when I run a command

@Sergix
Copy link
Owner

Sergix commented May 4, 2018

Ok, thank you. So I’m trying to figure out, when you enter a command, are you entering ls and then 7?

@IshaqIdris
Copy link
Author

@Sergix Nope just ls then enter and the 7 just pops up after that.

@Sergix
Copy link
Owner

Sergix commented May 4, 2018

Hm. Ok, well I just pushed another commit for a little more testing. Just run the jar as you have been, in headless mode. Now, when you are typing in the input there will be some output that will appear as you are typing. Try to ignore this and enter the command as usual. Probably best just to type ls and hit enter as you have been doing. Then you can send me the results!

@IshaqIdris
Copy link
Author

@Sergix this is the result of running your latest commit https://pasteboard.co/HjHypSq.png

@Sergix
Copy link
Owner

Sergix commented May 5, 2018

Huh... Well it seems command input is totally broken on Mac haha. Would you like an invite to our Slack channel? It would make communication easier with fixing this rather than filling up a GitHub issue conversation. All I need to do is send you an email, if that's fine.

@Sergix Sergix closed this as completed Oct 8, 2018
nanoandrew4 pushed a commit to nanoandrew4/JTerm that referenced this issue Aug 3, 2019
Thanks @lbenedetto! View changelog entry Sergix#115 for details.
nanoandrew4 pushed a commit to nanoandrew4/JTerm that referenced this issue Aug 3, 2019
View changelog entry Sergix#115 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants