I recently pasted an ellipsis character (…) into comments in my (Mac) Java code in the Eclipse editor; it compiled fine and complained not at all. Unfortunately when I checked the code in, the compiler on the (linux) build server was not happy. How can I configure Eclipse to warn me about such errors? I saw nothing relevant in Preferences > Java > Compiler > Errors/Warnings.
What encoding is the build server expecting the files to be using? It might not be a case of compiler warnings and errors but of setting the encoding that Eclipse is using to save the files.
Update
This one's been bugging me so I ended up searching around for an answer. It would seem that because Eclipse uses its own compiler rather than a stock javac you cannot pass arguments to it. There's a -encoding option or javac which allows you to specify the encoding of the files to be compiled (without it, the platform default is used).
If the build server is running Linux it's likely defaulting to UTF-8. I know nothing about the Mac's default encoding, but it could be something else entirely. It might be worth creating an ant build task in your project which specifies the character encoding and using that to double check before checking in code. It's a manual process, but might save some pain in the long run.
Related
Eclipse keeps showing the splash screen and then closing immediately after...I just downloaded it so I haven't had the opportunity to make a work space. I've tried uninstalling and reinstalling, the file has already been unzipped at this point I have no idea as to what I should do about this.
Make sure that you have installed Java JDK properly
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Whenever it (Eclipse) encounters a problem that does not warrant launching a dialog, Eclipse saves a report in the workspace log file. The log file can be looked at in four alternative ways.
Locate the file yourself, see workspace/.metadata/.log.
Start Eclipse using -consoleLog. This will print the messages
that normally go to the .log file in the enclosing shell/command window. When the Java VM suffers a hard crash, it produces a separate logging file named something like hs_err_pidXXXXX.log. These files are also helpful for diagnosing
problems.
(Other two might not be useful in your case)
Window > Show View > PDE Runtime > Error Log. This gives you a view
with the contents of the .log file.
Help > About Eclipse Platform > Configuration Details. This
prints out a great number of details about the environment and
also concatenates the .log file. Great for including in a bug
report.
Source
Make sure that Java installed properly..
Uninstall Java and install again, this worked for me
I just downloaded the scala ide 4.0 release candidate 1 on my windows machine. I setup a basic play scala project and tried opening the the index.scala.html file with the New Play Editor and the file doesn't open.it looks like this:
So then I tried opening the file in the regular play editor and when i type, the characters are typed in reverse:
Anybody know how to go about fixing this?
This might be a problem with your installation, if you are on Windows and you installed it under Program Files. Try moving it somewhere else (preferably without spaces in the path, though this is a permission issue). See this long thread on the Scala IDE mailing list.
I am working with c++ and it got type __uint128_t in the code. The code compiles fine on g++ (GCC) 4.8.3, but Eclipse/CDT always show error on "__uint128_t". The actual error message is "Type '__uint128_t' could not be resolved".
I tried several things already, including re-index, adding -std=c++11 to compiler's setting. Does anybody know how to make the error message disappear?
I am running Eclipse Luna Release (4.4.0) and CDT 8.4.0.
Eclipse will be able to correctly "parse" this type only if it's defined in some header of your toolchain. If it is a builtin type in compiler (just like "int", "char" and so on) - and I guess it is - then Eclipse would need to have special code to handle that type. So unless someone implements handling of this token in Eclipse, your only option is to disable this particular code analysis check for the files that use this type...
unchecking "Use global provider shared between projects" and adding -std=c++11 to the command line for the compiler specified in the "CDT GCC Built-in Compiler Settings", which can be found by opening project properties and going to "C/C++ General", "Preprocessor Include Paths", "Providers" tab.
then rebuilding the index: right-click the project, "Index", "Rebuild".
for detail please refer to the answer by davmac in post: Type 'uint32_t' could not be resolved
I had similar difficulties with Eclipse Oxygen.3 (with CDT 9.4 on Debian 7.10 64-bit, and GCC 4.7.2). I tried everything mentioned on StackOverflow as of March 30, 2018 to no avail.
Several headers in my project were being included by multiple source files. These headers were protected by #ifdef guards, but Eclipse CDT's CODAN code analysis system didn't seem to permit these guarded headers to apply to more than one .cpp source file. So numerous types and functions which returned those types were not recognized.
But after setting Window > Preferences > C/C++ > Indexer > Index all header variants, and then Rebuilding the index for the project, subsequent code analysis runs succeeded.
See a related answer from me if trying to utilize workspace-level settings.
I am working on a simple project in Eclipse in Scala-IDE. The project makes use of someone else's library (which comes in *.java source files, not in a .jar). The library source files contain numerous comments in Japaneese. I cannot compile the Scala project since for every such file I get an error like this one:
IO error while decoding
D:\path\FileName.java
with windows-1252 Please try specifying another one using the
-encoding option
Seems like I did not have this problem when the project was in Java. Now I am migrating to Scala and that is what I am getting.. I do not want to delete all these comments, is there any way to make the compiler handle them? I have tried all kinds of encoding fixes starting from Preferences->Resources->Text file encoding and ending with eclipse.ini file encoding parameters...
I had a similar issue after I switched from linux to macosx
Eclipse default text file encoding was set to US-ASCII, to fix this:
(Eclipse Juno)
Open the preferences
General - Workspace
Switch "text file encoding" to "UTF-8"
I have resolved the issue. The Scala compiler has a different set of options that likely does not subdue to the global Eclipse options. So by going to Preferences->Scala->Compiler and adding -Dfile.encoding=UTF-8 to the Additional command line parameters field I have fixed the error.
I'm a Visual Studio .NET developer who's trying to switch to Eclipse/SpringSource Tool Suite, so I get stuck on probably simple problems. Please bear with me.
I'm working on a Spring MVC project associated with an Apache Tomcat server. If I right-click the server and choose Start (alternatively Package Explorer->right-click project->Run As->Run on Server), my project is compiled and started. Compiler output is shown in Console window. Fine.
But if I simply want to compile the project without running it, I try selecting Project->Build All, Project->Build Project, or Project->Build Working Set. Nothing happens, no screen output, nothing -- despite having non-compiling code.
I expected to see the compiler errors on screen, preferably with the errors highlighted in the code. For what it's worth, I have deselected Project->Build Automatically. Anybody knows what I should do?
Eclipse and STS use incremental compilation. So, every time a file is saved, it is automatically compiled (as well as all files dependent on it). When you deselect Build Automatically, then yes, you will need to explicitly build, but this will still be an incremental build (ie- only the changed files and dependencies).
See here for a bit of a discussion on how incremental building works in Eclipse: http://www.eclipse.org/articles/Article-Builders/builders.html