I'm trying to develop a program that simulates the Terminal in Linux. My problem is that I can't clear the screen in the default Eclipse console.
After a lot of searching, I've found a library called JCurses that can do the task. But I can't get it working in Eclipse.
I've searched for a tutorial, but it seems there is not.
Can any one help me how to use it?
OK, I found it.
I have used an external Java console. It's called Eric:
http://cs.roosevelt.edu/eric/console.html
It's very easy to use. It could be run flawlessly on Eclipse although it's said to be for Netbeans only.
Thanks guys very much
Related
I'm using VSCode to make a Java game with my friend. We are using the java.awt libraries. We are using live share so we can both work on the code, but when we compile the game window only shows up for me (the host) and not him. How do we go about working on this game together?
If it's not clear what I'm asking, please ask.
I'd suggest looking into GitHub.
You can upload your code from VSCode to a repository on GitHub that you and your friend can both access.
It's a version control system, so you can both work separately without worrying about overwriting each other's work.\GitHub and VSC both have lots of good tutorials to get you started.
Hello, I am getting this error when trying to run my java app in VS Code. I am trying to run an app that works with an instantiable class. This seems to only have started happening today for some reason.
I am a noob and will need some dumbed-down help, please.
I have tried the below links but they haven't helped:
Problem to run chrome debugger in VS Code (This does not work for me)
https://support.apple.com/en-gb/HT208050 (I did this and it doesn't change anything)
This comes up in my VS Code terminal:
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
It is working now after powering off and back on. One of the above two links must have done the job. Sorry, lol.
In this video, Venkat Subramaniam is running simple java file and he is able to see the result on screen as the given below image. Does anybody know which tool he is using ?
Its actually a wonderful feature, but unfortunately this only work for Textmate.
Here you could find how to set it up for Textmate: https://www.ivonet.nl/2017/11/07/textmate-get-run-output-as-tooltip/
For IntelliJ IDEA there no such thing. But, a one guy has tried to do it in InteliJ Idea with a plugin which is available at https://github.com/jcraane/intellij-tooltip-runner. But, it is outdated and not working in recent releases.
I am an average ImageJ user who learnt to write IJ.macro and Groovy by trial and error. I did this mainly using the plain a simple script editor within ImageJ. I recently came up with IntelliJ, an amazing IDE with auto-completion and debugger. With the help of google, I was able to include the ImageJ jars, and pluggings accessible as external libraries/modules so that I can use the mentioned functionalities [by adding the path in File>Project Structure>Libraries>"+">Java>... here I selected the folders with the Jars and plugins of ImageJ].
I am, therefore, optimistic that I could achieve the last step. Rather than writing the code in IntelliJ and run with the ImageJ script tool, I was wondering if it could be possible to run a script (say with Groovy or Jython) directly from IntelliJ. Somethin like calling ImageJ when I click run. Maybe changing the Java Run Environment, or using it as VM.
Before finishing, sorry if I am saying something really odd or non-sense. I am an average Joe learning by trying.
Kind regards,
You might want to have a look at this GitHub project:
https://github.com/haesleinhuepf/run_jython_scripts_from_ide
It explains the steps required to run a script from within the IDE by starting up and using ImageJ. The tutorial focuses on Jython, but is applicable to all supported scripting languages.
In general, questions about ImageJ usage and script development are best asked on the Image.sc forum instead of here on StackOverflow.
I've never used ImageJ, but I guess your question is independent of ImageJ :-)
I you use ImageJ from java, you will have a class with a main method. Just right-click on the class and then "run" on the menu which appeared.
After your program has finished, there is a "run"-icon in the upper left corner of the small window which appeared.
I guess that's already close to running a script.
Groovy would be a better starting point for scripting (since it is partly a scripting language). You can code Groovy with the IntelliJ community edition, but for full support you need the ultimate edition. So I guess the groovy console is only available in the ultimate edition...
All other options I am aware of will not give you the auto-completion and only a poor-man's debugger (println)
Hope that helps
I don't know if people still struggle with this, it is now 3.5 years later, but if you start a script with this:
//# ImagePlus myImp
import ij.ImagePlus
ImagePlus myImp = myImp
You can use both the autocomplete of IntelliJ and the SciJava script parameters. I keep the same script file open in both ImageJ and IntelliJ. After a change in IntelliJ, I go to the script editor to run it. It automatically detects something has changed and will ask to update.
This is a bit of a hassle, but I haven't found how to get IntelliJ to execute the script in a running instance of ImageJ.
I'm recently working with Eclipse Che and have the task to import a Java Project that opens a GUI in it (like a simple Swing/SWT Calculator).
I am using the Java CentOS Stack, importing the .jar files, etc. is no problem but I get the "No X11 DISPLAY variable was set, but this program performed an operation which requires it." error.
Obviously, I found many threads about that Error, but I just wanted to ask if it is even possible to open a GUI in a web based IDE like Eclipse Che before wasting hours trying to fix that error when it's not even possible.
Maybe some of you already tried that and have a solution/tip or smth for me.
edit: found a video that answered my question. https://www.youtube.com/watch?v=AjgSp0dkxxU
Thanks anyway.
This will help you out - https://eclipse-che.readme.io/docs/che-and-swing
You need to use the right stack
You need to set the display variable. The way I did this was modify the run command to set it just before the other commands.
The command I used is:
export DISPLAY=:0.0
Also note that this worked for a while for me but randomly stop working a few days back so please tell if you manage to get it working.