I recently switched from eclipse to Intellij and hence I am new new to it. Till a day before I was successfully able to compile my java program (maven) and generate output. The program uses multiple external packages and also Rserve to connect to R. However, when I tried to compile it today, it does not recognize any of the external packages and gives multiple errors like:
Error:(25, 26) java: package org.rosuda.REngine does not exist
Error:(22, 53) java: package org.apache.commons.math3.optimization.fitting does not exist
On looking through the project structure, in the dependencies tab, it shows something like the following image. Can someone please help me finding the issue here?
Related
I am trying to install JavaFX and in particular just run this application. I've been using Java for a while and I have to compile from console since IntelliJ just won't load in my laptop. Whenever I try compiling with "javac HelloFX.java" I get a lot of errors and in particular error: package javafx.application does not exist. This is what my java folder looks like
Java Folder
I also already set up a path C:\Program Files\Java\javafx-sdk-18.0.1\lib
I really have no clue as to what I am doing wrong, and the solutions I've been able to find seem rather complex, or use IntelliJ tools. Thank you in advance.
Even if IntelliJ does not work for you, you could still use either Maven or Gradle to build your project which would already simplify things a lot. You should also have a look at the official documentation.
https://openjfx.io/openjfx-docs/
I was just looking at my java project in eclipse, compiled it, and after closing program all projects in my solution show billions of errors.
Example:
The import java.awt cannot be resolved
When i try to compile it show error:
A JNI error has occured, please check your installation and try again.
Any clues how to fix it? I had many problems with java in the past and i couldn't fin any fixes, almost like it was designed to fail. This language vexes me, but sometimes you just have to use it.
Edit
I also get this error while attempting to open it in IntelliJ (just downloaded it):
JDK jre.1.8.0_241 is missing
Edit
Its just Java being Java (aka not working, as usual). You have to create new project and just copy everything to it, it will work.
I have tried to find solution for my question but seems like no solution have worked yet.
Just to mention, im using latest jdk and jre version.
So when im making new java project then i get these 2 errors, its not matter which source i load, all of them gives same error which is weird.
The project was not built since its build path is incomplete. Cannot find the class file for java.util.function.Predicate. Fix the build path then try building this project oosbrut Unknown Java Problem
The type java.util.function.Predicate cannot be resolved. It is indirectly referenced from required .class files GlobalObjects.java /oosbrut/src/org/brutality/world/objects line 1 Java Problem
Line 1 : package org.brutality.world.objects;
PS: I have tried all , cleaning project, refreshing, re-opening eclipse etc , also i have removed all libraries and reloaded all of them again.
Would be great if someone can help me out.
I am trying to get our build machine to consistently build our Blackberry project (build using the Eclipse plugin not the JDE) on check-in. We are using Jenkins to call the project and sometimes it works but only after I've fired up the project in eclipse on the far machine but then restarting causes the error to come back.
The first error I get is (the following errors are all in the same vein):
[javac] c:\<path_to_project>\src\path\to\package\class.java:6: error: package net.rim.device.api.ui does not exist
And every other reference to a net.rim.* object. Clearly it's because it's not linking to the target net_rim_api.jar file but I can't figure out what on earth is going wrong. I've tried poking at the build.xml file but I just get more errors and other versions of this error in other threads turn out to be not the same thing.
I have tried installing and using BB-Ant (roughly following this tutorial) but it has not provided me with the solution - I'm prepared to admit that I may have made a mistake in the implementation but I followed it as closely as I could with the current project that I have.
I would appreciate any help that you can give me.
EDIT
So I've now altered the project to use <rapc> instead of <javac> which appears to do the linking to the .jar for you but it's still frustrating that you can't simply use the auto generated build.xml. Is this a known (and due to lack of information available on the internet, accepted) issue with Eclipse?
I went down the BB Ant build script road a year or so ago, got a lot of help on this site, and tried to document my progress on this site. Hopefully the links I place will help you and others.
I have marked this as "community wiki" since it doesn't directly answer the question but I do think it is useful.
Basic algorithm
My answer on this page shows the algorithm for a working build script (BlackBerry: create COD from JAR source file in Ant script). Perhaps this is more complicated than you are looking for, but it does show the relationship I found between javac and rapc.
To summarise, I wanted to include my SDK into the final build, and the steps were:
javac the SDK to create CLASS files
preverify the CLASS files
jar the SDK
Copy the SDK JAR file into the project
javac the project - use the SDK JAR as the classpath
preverify the project CLASS files (again, use the SDK JAR in the
classpath)
jar the project - add the SDK JAR as a zipfileset
jarjar this project JAR to refactor package names as required
Finally, run rapc on this JAR - it will find no duplicate COD files
& should run fine.
Please read the other answers on that page, since they offer great advice that I used in my end result.
Extra Info & Including a JAR into final output
I'd recommend this page just for the extra links that I included in it - the exact question is unrelated (BlackBerry - Ant script to include JAR in project without external dependancies).
Again, the value is in the answers that the other guys provided.
Misc
Here are a couple of links to other BB build script issues that I had - you or someone may find them useful:
BlackBerry - Ant build script for more complex apps
BlackBerry - final step of build process
Finally this one speaks to a mistake in the documentation when compiling your own code into a library for import into a different project:
BlackBerry - use own JAR file in own project
I'm using Eclipse Juno and trying to import a java project created with an earlier version of Eclipse on a different operating system. After importing the project and trying to run one of the java files, I get this error: The project: OldProj which is referenced by the classpath, does not exist.
But the file I'm trying to run is in the OldProj project, so it's saying it can't find itself.
It's a stand-alone project. It doesn't reference anything outside itself, not does anything else reference it. It is the only project in the workspace, in both versions.
I tried importing the project through the Import... command. I tried creating a new project and just copying the source files over. Both get this result. The project still runs fine on the earlier version.
This is a new install of Eclipse, so perhaps I missed a setting or two. Does anyone know what I missed?