VS Code trying to open a website instead of a java file - java

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.

Related

Is it possible to use/open a GUI in Eclipse Che?

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.

How to connect to Matlab through Java using matlabcontrol

I need to connect to Matlab from Java using matlabcontrol.
I tried their demos and those are working fine but when I tried to connect to Matlab using a servlet I get this error (to be clear, my code succeeds in opening an instance of Matlab but afterwards the following appears in the Matlab window):
??? Undefined variable "matlabcontrol" or class "matlabcontrol.MatlabClassLoaderHelper.configureClassLoading".
And this appears in the eclipse server window:
matlabcontrol.MatlabConnectionException: MATLAB proxy could not be created in 180000 milliseconds
I saw that this exact same question was asked by someone on stack overflow but the question had been removed, I don't know why.
I tried searching for the answer and this came up: http://code.google.com/p/matlabcontrol/wiki/Compatibility
They say here that if this error comes, to run this command in Matab: java.lang.System.getProperty('java.class.version')
And if the answer is 50 or greater then matlabcontrol should work, but it doesn't for me.
I can't understand what's wrong (demo works, my code doesn't) and I'm desperately in need of an answer. This is for a project due soon and I would appreciate all the help I can get.

Netbeans Restfull tutorial test runs but result are different and can not test properly

I read the nebeans tutorial for RESTfull service (http://netbeans.org/kb/docs/websvc/rest.html) and tried to implement it. But when i'm run the test I'm not getting the screen what they say. I found that some say it is a bug on netbeans whilst some say it is bug on browser.I read some related question on this site but could not get much help
Suppose to appear as previous one
but appear as following one....
Note that navigation is not appears.
I'm unable to get the test it further.
I'm using netbeans 7.1 bundle
Can any one help me out. Thank you.
p.s : This page opens as reading a file( file:///home/xxx/xxx )
In that link you can notice the caution
Caution: For later versions of Firefox, you need to generate the test client in another Java web application than the service project.
I got the same error in firefox and chrome, then I tried test-resbeans.html in IE and its working fine as mentioned.
That tutorial dose't work on that way. When we test the restfull test we need to brows and give that restfull service. Then it will work on any browser.(I guess to test it need a service).

Java Applet doesn't work, warning/error: can't fully enable headless mode

I can't figure this one out.
I have Java code that captures Webcam, it works awesome for what I need.
Issue comes along when I am trying to make an Applet out of it. I made applet, but it simply doesn't work. It doesn't create any visible errors, doesn't complain about libraries, basically nothing I can grub on to. The only thing I can see in Console log (Mac OS 10.5) is following message:
PluginProcess[10143] Process manager already initialized -- can't fully enable headless mode.
I don't have any ideas on how to fix it. Please Advise.
Thank you.
P.S: I just want to make Java Applet out of existing code so I can dump it into machine (any) and it can stream video from webcam.
https://bugzilla.mozilla.org/show_bug.cgi?id=574904#c23 says "this message is a
red herring: You always see it (using Apple/Sun's Java Plugin2) whenever any
Java applet is displayed."

How to use JCurses in Eclipse

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

Categories

Resources