Compiler failing, but no error lines detected - jgrasp

I use jgrasp, but when I try to run a project it says "Compilation failed, but no error lines were detected. Check for non-clickable errors in compilation output." I have the JDK, not just the JRE. What should I do?

As it says, check the compiler output for non-clickable errors. Most likely there is some message in the output that will tell you what went wrong. Clickable errors are compilation errors in the format that javac uses.
Occasionally javac spits out a non-standard-format error for some unusual condition. For example, recent versions of javac do not properly handle OneDrive on-demand files, and will report "javac: not a file ...". If that is what is happening, you will need to change the OneDrive settings to turn on-demand off, or copy the files to a local folder to work on them then back to the OneDrive folder when you are done.
Other possibilities are that javac is crashing due to a bug, or that you have some other "javac" that is running instead of the actual Java compiler. You can turn on "Settings" > "Verbose Messages" in jGRASP and compile to verify that the correct "javac" is being invoked.

Related

Why does my IDE say stdlib files are "not found" when my code compiles and runs just fine?

I am getting errors all over my CLion IDE saying that stdlib files like 'fstream' and 'iostream' are not found. As a result, I'm getting many "Use of undeclared identifer 'std'" errors and more (see photo: ). Also, all variables I make of a type from these stdlib files, like a string or set for example, are reported as an error in the IDE.
I'm pretty sure the CLion IDE is the only issue here because my code compiles and runs just fine. So I've thought it's something the IDE is failing to recognize somewhere. I've tried clearing my caches and completely reinstalling the software. None of these attempts have solved the issue.
I've been trying to ignore this weird glitch-y type error for a while, but it's gotten to the point now where I can't find my real errors until I build my code because they're hiding in all of the falsely-reported errors.
How do I fix this IDE problem?

Why are Java binaries necessary in Sonar?

I'm trying to check if there are any difference between an analysis with only source code and with source code and the .jar generated after compiling.
If I delete the '-Dsonar.java.binaries' property I get this error:
ERROR: Error during SonarQube Scanner execution
ERROR: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The command I'm using:
sonar-scanner '-Dsonar.host.url=http://192.168.1.25' '-Dsonar.projectKey=org.javaProject:myProject' '-Dsonar.projectName=myProject' '-Dsonar.sourceEncoding=UTF-8' '-Dsonar.sources=src' '-Djavax.net.ssl.trustStore=/certs'
Do you know if it is possible only to analyze source code without any binary file?
For SonarQube to be of any significant value, it should be run as part of a build, after the code is compiled and unit tests are run. I frankly don't know if it's possible to run a scan without class files, but I don't suggest you try to pursue that.
If you really only want to look at static analysis issues, I believe there is a "Sonar Lint" tool that runs in Eclipse or possibly other desktop tools.

In CLion, can you start a build on a specific file?

I'm doing some refactoring (more than what CLion can do automatically) and making lots of changes. When I change a header file, it prompts a significant fraction of my project to rebuild, but I know the error messages will always come from the same spot (which unfortunately starts with "w").
Is there any way to control where CLion will start building so I don't have to wait 30s+ to get the next error message?
I've been typing make src/workflow.o in a console (I tried using the CLion console, but that doesn't make links from errors), but I'd rather have the direct links to the error location.
You can add another cmake target to build only the stuff you need.
See e.g. here:
https://www.jetbrains.com/help/clion/2016.1/creating-and-editing-run-debug-configurations.html?origin=old_help

IntelliJ doesn't work [duplicate]

I'm trying to run my android application on IntelliJ. I created a project from existing source, and I've attached the SDK correctly, everything runs ok until there, but when I try to run, it logs messages saying:
Error: MyClass.class (No such file or directory)
And this happens with all classes I've created.
Any idea of what might be happening? Maybe some settings I must set in the IDE.
Thanks.
Solved it! In intelliJ go in Settings > Compiler > Java Compiler and in the Use Compiler choose javac in-process (Java6+ only).

Msbuild command line: MSB3021 error in CopyWebApplicationLegacy task

I've seen several questions on here about this error, but all of them seem to be related to the "Access is Denied" flavor of this error, can't find any that deal with the message I'm getting:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(177,5): error MSB3021: Unable to copy file "bin\MyApp.MyLib.dll" to "C:\Temp\Publish\staging\MyApp\MyApp_1478_5\bin\MyApp.MyLib.dll". Could not find a part of the path 'bin\MyApp.MyLib.dll'. [C:\Temp\Tags\MyApp\2011-10-27-00-NoBuildVs\src\MyApp.com\MyAppn.csproj]
I get 30 of these errors when I build my proj. I'm building my csproj file from the command line. The proj compiles fine, it's only when it gets to the CopyWebApplicationLegacy task that things screw up. The odd thing: the app runs fine and the dlls that it is trying to copy are present in the target dir in the end. So these errors seem to have no bearing on whether the files end up where they should be or whether the app will behave correctly.
I'd consider just suppressing them, but that seems like it'll bite me later.
My command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "C:\Temp\Tags\MyApp\2011-10-27-00-NoBuildVs\src\MyApp.com\MyApp.csproj" /p:OutDir="C:\Temp\Publish\binOutput\" /p:WebProjectOutputDir="C:\Temp\Publish\staging\MyApp\MyApp_1478" /p:Configuration=Debug
Tried building the solution instead of the csproj and that got the same error.
I'm stumped here. The files aren't being locked (unless they are being locked during the build somehow and released later, but it seems like I'd get a different error). What could be causing this error? I need to get this going so my automated publish can work.
What I see from the error log: source file "bin\Debug\MyApp.MyLib.dll" should be used instead of "bin\MyApp.MyLib.dll" for Debug configuration, IMO.