java does not run with j-grasp on my iMac - jgrasp

I am getting this error when I try to run Java with j-grasp:
----jGRASP wedge: exit code for process is 1.
----jGRASP: operation complete.
----jGRASP exec: javac -g Palindrome.java
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac.
Please visit http://www.java.com for information on installing Java.
----jGRASP wedge: exit code for process is 1.
----jGRASP: operation complete.

The simplest solution is to download and install one of the "bundled" versions of jGRASP, which comes with Java and will prefer that java and javac over all others.
If you are unable to do that, you can turn on "Settings" > "Verbose Messages" in jGRASP then compile to see what "javac" is actually running ("actual command sent" in the verbose output). Most likely it is not a "normal" javac, since the error message doesn't look like I would expect - I don't know what this "java.com" website is. If you do have a normal Java installation, deleting that rogue "javac" may fix the problem.

Related

CLion/PyCharm/PHPStorm/IntelliJ won't start, says "IDE has not been initialized yet"

When I try to start my CLion IDE (or another JetBrains IDE, like PyCharm, IntelliJ IDEA, PHP Storm etc), it fails, and I get the following message on the console:
IDE has not been initialized yet
(after the usual JVM warning I always get before and didn't prevent the IDE from starting up.)
Why is this happening? What can I do about it?
Notes:
I have a valid license.
May be related to this (resolved) issue for IntelliJ Idea.
Another instance of the IDE may be running
While you might not see it for some reason, there is another instance of your IDE already running (probably for your own user). The error message is somewhat misleading.
Let's assume you're running CLion for example. The executable's name is clion. Look for it with the ps command: ps aux | grep -i clion, or with pgrep: pgrep clion. Then terminate it (e.g. using kill with the process ID), and re-run.
Caveat: There may not be the only scenario in which you get the same error message.

Unable to install Selenium::WebDriver in perl6

I'm doing this:
zef install Selenium::WebDriver
And I'm getting it stuck at:
===> Searching for: Selenium::WebDriver
===> Testing: Selenium::WebDriver:ver('0.0.1')
Cannot obtain a session after 10 attempts
in submethod BUILD at /home/user123/.zef/store/perl6-selenium-webdriver.git/5e3ff320d2f392e44df1433f0544201c154f2590/lib/Selenium/WebDriver/Wire.pm6 (Selenium::WebDriver::Wire) line 66
in block <unit> at t/05-firefox.t line 45
# Looks like you planned 91 tests, but ran 1
JavaScript error: , line 0: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIAppStartup.trackStartupCrashEnd]
My OS -- arch linux -- is up to date.
Summary
Like all Perl 5 or Perl 6 packages, the Selenium::WebDriver package includes a suite of tests that check that it appears to work properly on your system.1 This test suite gets run at the end of installation, i.e. the installer downloads the package, runs its builder code and only then runs its test suite. If there's an error, then (by default2) the installer displays error information and exits immediately. That's what it's done in your case.
The current Selenium::WebDriver package was successfully installing 2 months ago complete with the message showing success on an Ubuntu for the same test that is a fail on your system. Then again, a search of the #perl6 logs for 'selenium' suggests that there may be an intermittent error with one of the modules that Selenium::WebDriver uses; this may indeed be the root of the problem.
The README of the repo for Selenium::WebDriver begins with a link to a document that says the protocol it describes is "obsolete". The most recent item in the issue queue of the Selenium::WebDriver repo is titled "Add support for Firefox Marionette WebDriver". Please consider adding a comment to that issue pointing to this SO question if you think it's relevant.
If you look at the error messages you'll see a Firefox test failed. One possibility is that there's an error in Firefox, or some related software, beyond official latest arch linux.
Some plausibly simple responses to the Firefox error message:
Try manually loading Firefox before trying to install the Perl 6 package. Does that fix the problem?
I don't know what options you have for making the Selenium::WebDriver package not see your Firefox other than completely uninstalling it, but maybe you can do that? Then try installing again (and the package will presumably then test/use, say, Chrome instead of Firefox).
If that doesn't work, consider posting a new Selenium::WebDriver repo issue (and link to this SO question).
The top level error message is "Cannot obtain a session after 10 attempts". It's generated by line 66 of the package's lib/Selenium/WebDriver/Wire.pm6 file. I don't think that line helps much in this case but imo it's always worth taking at least a quick glance at the source code corresponding to error messages.
Looking at the next level down we see the error comes from "t/05-firefox.t line 45" which is my $driver = Selenium::WebDriver::Firefox.new;. It looks like it's trying to connect to Firefox and failing. Looking further up in that test script one can see that it thinks it found Firefox on your system (because the code block in unless which('firefox') { ... } clearly didn't trigger).
The deepest part of the error information shows that a "Javascript error" has been encountered, something to do with nsIAppStartup.trackStartupCrashEnd.
Often a problem is specific to the versions of software involved. The Selenium::WebDriver package version is clearly 0.0.1 but it would be nice to see the version info from the other main pieces involved including your Perl 6 compiler (perl 6 -V iirc), the installer (zef -V iirc), and your OS and Firefox. In this particular case I'm pretty sure the problem is not in your Perl 6 compiler (Rakudo) nor in the installer (zef) but I might be wrong and I still recommend you always consider including generous version info when you post your first version of a question.
1 The test suite for the Selenium::WebDriver package work as per Perl 6 testing guidelines in general and per the Testing section of the Selenium::WebDriver's repo README in particular.
2 You can usually force Perl installers to continue regardless if you know an error doesn't matter in your case. I think it's -force-test to force zef to continue testing rather than stop after the first error and -force-install to complete the install despite errors.

"Compilation failed but no error lines" on working java program (jGRASP)

I'm an amateur programmer. I use jGRASP.
I made a lot of functional, running, zero-error programs and copied them to a new computer. Now, when I try to run them, I get that message: "compilation failed but no error lines."
What's going on here? I'd like any help as soon as possible, I have an assignment due.
Do you have the JDK installed (not just JRE)?
What is the compiler output? Any general messages there (not related to your code, but something like a missing javac or javac crashing)?
Is the source code in the correct package structure?
Are the source files in a directory where your login account does not have write access?

Cannot auto configure pydev in eclipse

I have installed PyDev successfully, I have python 3.4.0 installed successfully and the folder containing python.exe is in my path and I can run it from the command line.
However, when I go to window\preferences\pydev\interpreters\python interpreter and select 'quick auto-config' to configure it using normal python I get an error saying 'auto configurator could not find a valid interpreter... Note the system environment variables used for Jython are PATH and PYTHONHOME.'
Unless this is a bug in the text I am not selecting Jython (I get a different error if I select IronPython, btw, so this is not a generic error message).
The trace is as follows:
Errors getting info on discovered interpreter(s).
See error log for details.
java.lang.RuntimeException: java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
As I say, python.exe is in my path.
You have to install the actual python package separately from here https://www.python.org/download
Close LiClipse/Eclipse => Download Python Here: https://www.python.org/download
=> reopen LiClipse => Auto Config for the interpreter Will WORK!
I found the answer, but I'll leave this up in case anyone else gets it. It's a pretty stupid auto config option if you ask me ;)
In the higher level window\preferences\pydev\interpreters\ preference you need to untick jython and ironpython.
No idea why given I selected the Python sub-preference specifically.

Eclipse JUNO not starting

I tried to start Eclipse, it just shows loading eclipse and then stops/crashes after a while, I haven't changed anything from before.
even I tried to replace it with other version but some thing happens, when I open it with terminal I get this error:
-- ERROR: RebelPlugin.getDefault() retured null!! Likely cause: plugin not started properly!
logout
[Process completed]
It seems like the RebelPlugin is causing issues. The simplest option is to install a new Eclipse and run that instead. You can reuse your previous workspace and the code will be untouched, so you will just loose some time.
There are other alternatives to try, but they may be a bit more advanced. From commandline you can try to uninstall the RebelPlugin and see if that makes a difference, and then reinstalling.
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command uninstall
-featureId <feature_id of rebelplugin>
-version <version>
See the Eclipse manual for more information