I'm trying to use IntelliJ IDEA for GWT development on Mac OS X, and checked out a project from subversion a coworker created on Windows. The Project file came with paths to GWT ("C:..."), which obviously don't work for me.
When I change the GWT facet path in the Module Settings dialog it complains that the directory i've chosen isn't a valid GWT SDK folder because it's missing gwt-dev-mac.jar
But I can't find such a file anywhere on my machine.
When I rename "gwt-dev.jar" to "gwt-dev-mac.jar" and try to run the project, I get the error: "Unknown argument: -style" when it tries to run GWTShell.
I read this link, but I'm not sure what to do about it: http://youtrack.jetbrains.net/issue/IDEA-26017
What's going on here?
I'm dumb... when I updated IntelliJ I dragged the new application into my applications folder and assumed it would replace the old one.
It appeared with the typical greyed-out look because I hadn't started it yet... so I was still using IntelliJ 8.something. and not noticing.
Problem solved with version 9 with the addition of the "Fix" and "Create Artifact" features that appear where the error used to.
Related
I wish to create a PhantomJS Project in Eclipse for which I have installed the Nodeclipse PhantomJS 0.12+ plugin. I am selecting the below project type:
The script runs fine when I arrange the project in the following way (without any folders).
But, when I place the same .js file in a folder and try to run it, I end up getting a NullPointerException (see screenshot below).
The error that I'm getting is below:
An internal error occurred during: "Launching PhantomJSTest-Test1.js".
java.lang.NullPointerException
Screenshot:
What I have tried:
I found a similar question on Stackoverflow with the same error but for Android. I have tried cleaning, building the project. But, the error occurs only when I create a folder structure in my project. If I don't, then the script runs fine. In short, I am not able to organize the project.
Questions:
I'd like to know what type of folder structure is valid / will work for a PhantomJS project?
Why is the NullPointerException occuring?
Are there any other easy alternatives to setting up a PhantomJS project?
Any help / guidance regarding the folder structure is highly appreciated.
First get the latest version, that is 0.17, see news/history at http://www.nodeclipse.org/
If the problem is still on, raise issue on https://github.com/nodeclipse/nodeclipse-1/ (and reference this question)
To the questions:
PhantomJS launcher is rather simple https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.phantomjs, and it should work for any .js file (in any project type). PhantomJS project type is for beauty sake only, as it is just JavaScript project.
NullPointerException should occur never, so it may be bug.
You can create general project as well. But with JSDT and Tern you would get some Content Assist. For new module support with Tern raise issue at https://github.com/angelozerr/tern.java/
I switched to using Enide Studio and that solved the folder structure issue for me.
Here's what is needed to setup PhantomJS Project:
PhantomJS
Enide Studio
Steps:
Download PhantomJS
Download and launch Enide Studio
Goto Window->Preferences->Nodeclipse->PhantomJS and set PhantomJS Path to 'phantomjs.exe' file path
Create a PhantomJS Project (like any normal project)
I generated several Java projects last spring. Today I opened Eclipse back up and selected the workspace I used in the spring but now all the projects have a red X on them. They all list the same problem:
**The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project.**
The build path looks ok (I think). I tried to create a new project as an experiment to see it there are differences. The new project dialog box has **Use default JRE (Currently jre7)** checked and a warning at the bottom:
**The current workspace uses a 1.4 JRE with compiler compliance level 1.7. This is not recommendes and either the JRE or the compiler level should be changed.**
Not sure what changed since last spring but something obviously has. I don't really understand what it is trying to tell me. ?Anybody have any ideas I would greatly appreciate it. Thanks.
Update: I created a new project and compared its buildpath to one of the projects from last spring. In the new project, it has: **JRE System Library [JRE7]**
In the old project that now has the problem I see: **JRE System Library [JAVASE-1.7](unbound)**.
Somehow I think the "unbound" means something bad. Still do not understand how it was ok last spring and now suddenly it isn't.
The "unbound" means that there is no JRE at the path specified in the classpath. My guess is that, since last spring, modifications were made to your java installation(s).
To bind your project back on a JRE, click on your "unbound" JRE and click on the "Edit..." button. In the Edit Library window, select a working JRE (JRE 7 would probably be a good choice in your case), then click on Finish. The "Unbound" message should disappear and your classpath should be okay afterwards.
Ok, so, using Netbeans for a small Java project. Anyway, it was working fine this morning. Then, after working on another project briefly and switching back, something changed.
Now, when I create new .java files, it says they already exist - but, they didn't, until then. That is, the filename didn't exist, and once I made it, it said it already exists, which, after it says that, it does. Which, well, the file didn't exist before, so it is a problem.
Secondly, the file it creates is blank. It is much easier to use when it creates it using the template: automatically adding the package statement, and class structure.
This persists across a restart.
Sounds similar to this: Netbeans creates file, then complains it already exists
On Windows 7. Netbeans version 7.3
Any ideas how to fix?
EDIT:
I think I may have found the cause. I had changed the default class template, or more accurately, took a few sections out of the default. Apparently the second time I did it, I also erased a bit of the template markup, and it was this syntax error that ended up making this happen. After fixing the syntax error, it seems to work.
I had similar experience:
Every time I right clicked in Netbeans 8 to get a new Class in a package I only got a empty file and a complaint about that the file already exist.
The solution was for me to go to Tools -> Templates -> expand Java folder -> select "Java Class" -> press "Revert to Default"
The solution is go to Tools -> Templates -> expand Java folder -> select "Java Class" ->
open in editor
use this code in java class file
<#if package?? && package != "">
package ${package};
public class ${name} {
}
I had the same issue once. I used Netbeans IDE 8.2v with a dedicated Java pack pre-installed. Even after reinstallation, this error couldn't be fixed for me. In a previous Netbeans version, I changed the template forms according to my way - this was the cause of the file/class already existing error for me. After another reinstallation process, I manually reverted all changed templates to the application default way. You can do it out & fixed this error. It worked for me!
PATH : Netbeans >> Tools >> Templates >> a single click on Java folder >... to your right-hand side there's a button pannel >... click on 'Revert to Default'
I had this issue and none of the previous stated solutions worked for me. I found that simply copying the created file directory i.e C:\Users\Bill\Desktop\randomjavafile.java and deleting the file and then trying again works :).
I had a problem with finding Java docs in Eclipse. I seem to have fixed the problem, but I'm posting this for two reasons: I would like to know why I had the problem in the first place and perhaps my method of fixing it might be useful to someone else having a similar problem.
I created a simple Java project in Eclipse (Helios on Windows 7) and selected the JavaSE-1.6 JRE. Then I created a source file and imported java.util.GregorianCalendar. When I hovered over GregorianCalendar, I was getting the message:
This element has no attached source and the Javadoc could not be found in the attached Javadoc
None of the methods of GregorianCalendar seemed to have any Javadoc, either. Other standard Java classes (even others in java.util, like ArrayList) didn't have this problem; only GregorianCalendar. Everything seemed set up properly in the project settings. The Javadoc location set in the Java Build Path was http://java.sun.com/javase/6/docs/api/.
I managed to restore correct behavior by temporarily switching to JavaSE-1.7 and then back. Evidently something got reset and all is well. While I'm happy that things are now working, I don't like being clueless as to how they got messed up in the first place.
Can anyone provide any insights into this?
I think general support relies on the presence of a src.zip in your JDK directory, which is detected when you autosearch a directory for Java installations. It could be missing. Not sure if online Javadocs are used.
I'm using Eclipse Juno on a Windows 7 64-bit (with a 32-bit JDK) but i think it will also apply to your Eclipse version:
Download JDK docs zip file to your Desktop folder;
Right-click on the file, choose Properties and unblock it;
Move the file to a location of your choice. I normally move it to the JDK folder;
Open Eclipse and go to Window->Preferences->Java->Installed JREs;
Select your JDK installation and press Edit;
Select the rt.jar file and click "Javadoc Location..." button;
Select the "Javadoc in archive" radio button;
Set the archive path by browsing to the JDK docs zip file;
Set the "Path within archive" to "docs/api" (without the quotes).
Enjoy! ;)
I'm serious. I installed the Blackberry web developer thing for eclipse (being stupid, and not seeing the 'web' part). Then, when I realized my mistake, I went and got the JDE for Eclipse. I went through the install process....open up Eclipse...and I'm lost. I don't know how to run code...or the simulator, or anything.
All the tutorials I'm finding are referencing an older "beta" version of the Eclipse plugin, which apparently had a "Blackberry" menu option. I'm not seeing that.
I found some sample code, which gives the helpful instructions:
"1. Extract HelloWorld_incomplete.zip
2. In the IDE, open the helloworld.jdw workspace
3. Open the helloworld.java source file.
"
...I've never seen a .jdw file before. If I try opening it in Eclipse, I get a not-very-useful text file. Since they say it's a workspace, I try the "Switch Workspace" option in Eclipse, which lets me pick a folder, rather than a file.
I'm pretty sure "Import Project" isn't right, either.
So, I figure I'll deal with that later, so I open up the source code (a standard .java file, with a main, etc). I try running it, but it asks for an Ant build file.
I can run standard Java files just fine (that is, I know Java is in my path).
I don't know if maybe I don't have the Blackberry part right...or if it's on the eclipse side where I'm failing.
Does anyone have any ideas?
-Jenny
Edit: Just to be sure, I tried downloading the plugin through eclipse with their provided link (http://www.blackberry.com/go/eclipseUpdate), but eclipse says that it got a .jar file when it was expecting a .zip file, and so it errored. Can you even unzip a jar file (like Eclipse is trying to do?)
It sounds like you have the wrong package.
I installed it yesterday from the "Download Now" button at http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp
and it had both the menu option and the Blackberry project type.
It should have an installer if you get the correct one. I would post a direct link, but RIM likes to ask for your info before allowing the download.
Try installing it to a different directory and using a new workspace. It could be that the old install is interfering somehow.
-Hope that helps
if you want to know step by step to install the jde plugin in eclipse you can visit http://learn.virtue-software.com/2011/05/quick-start-creating-blackberry-application-with-eclipse/