Eclipse with EclipseLink: How? - java

I am using ubuntu. I want to build a JPA project with eclipse. According to that tutorial I need to have EclipseLink.
Therefore I went to EclipseLink download page, got .zip achive and tried to follow instuctions - set the paths.
JAVA_HOME - Set JAVA_HOME to where you installed your Java SDK home >directory
UNIX example: JAVA_HOME = ...:/usr/java/jdk
PATH - Set PATH to include JDK/bin directory.
UNIX example: PATH = ...:/usr/java/jdk/bin
okay. My SDK Eclipse, and it is located in /usr/lib/eclipse. Though I also have /usr/lib/java/swt-gtk-3.8.jar. What should I use here?
Next. Then I take unziped eclipselink folder. It is written, that I should make path to it:
UNIX example: ECLIPSELINK_HOME = ...:/usr/el/INSTALL_DIR/eclipselink
So, for example, I place it like this:
ECLIPSELINK_HOME=/home/laura/lib/eclipselink
Please, help me. Are my steps correct? What I need to do after set all paths?

So, here you are. The answer qas quite simple: I should have had installed the newest version of Eclipse, where I would have an option to make a JPA project. Then goes an option to choose a platform, EclipseLink, for example.

Related

The specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_71\\bin\javac.exe" is invalid

Ok im wondering where does xamarin get this path from?
Severity Code Description Project File Line Source Suppression State
Error The specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_71\\bin\javac.exe" is invalid.
So I can go and change it to the new jdk1.8. I have the new JDK set up I just need to know where to change the path at.
I had the same problem and solution is.
Remove all jdk and install jdk 1.8
Change reference java location in Visual Studio Tool > Options > Xamarin
Clean and Rebuild Project
I've just solved this exact problem for me.
I don't know why you wouldn't have a JDK_HOME variable. Completely remove the JDK and install it again maybe?
The Environment Variables for java were set to my previously installed path. I guess Oracle screwed up here.
As I had the same error, here's what I did:
I went to C:\Program Files\Java\ and checked what the jdk folder is called. For me it's jdk1.8.0_102.
For users who don't know where to find System Variables:
Go to System Properties and on the left hand side, click Advanced System Settings. Switch to the Advanced tab, click Environment Variables. Under System Variables there should be two variables in the list called JAVA_HOME and JDK_HOME.
I edited those values and change the path to what I found in the java folder. In my case this would be C:\Program Files\Java\jdk1.8.0_102.
No need to close VS, just build your app and it should get passed the annoying error.
Hope this helps :)
I had exactly the same problem. I got it to go away (which is not the same thing as fixing it).
Un-install every bit of JAVA you have. Delete both JAVA folders (Program Files and Program Files (x86)).
Install the latest version of the Java (x32) SDK.
Clean and Rebuild your project(s).
Since my Solution is multi-platform, I changed the Startup Project to the .iOS one, built it, ran it in an emulator, and set the Startup Project back to the .Droid project.
Somewhere in all this, the problem went away.
And remember kids! If it can go away all by itself, it can come back again all by itself!
I had this issue as well, I downloaded 32 bit Java but VS was still looking for the 64 bit one.
To solve it all I had to do was change the JAVA_HOME and the variable in my Path, clean my project and rebuild it.
Just set JAVA_HOME and JDK_HOME ambient variables, clean your solution and build again. For me worked fine.
Don't forget to clean your solution.

Eclipse RCP: application specific folder

I have an RCP application in Eclipse 4.x for a cross-platform software. I would like to place the osgi.instance.area in the application specific folder. For example on Windows it generally is C:\Users[Username]\AppData[Name]. Something similar to the directories outlined here - http://www.chromium.org/user-experience/user-data-directory.
I have seen the solution here - https://bugs.eclipse.org/bugs/show_bug.cgi?id=241192 but I haven't understood it really well. I use the product editor on Eclipse and under the Configuration tab, I have added the osgi.instance.area property in the Properties section with another directory at the moment.
Then I tried the solution from the bug - $APPDATA$/COMPANY/PROGRAM/instance but I couldn't find the directory anywhere at the expected location. Also, how does this work for Linux and Mac OS X?
In Windows 7 and 8 $APPDATA$ is C:\Users[Username]\AppData\Roaming. In Linux $APPDATA$ is undefined. You should use #none, #noDefault, #user.home, #user.dir, filepath or url
I think it is the osgi.instance.area.default property that you should set. The value migght be something like #user.home/Documents/workspace

Trying to set up WebLogic Server but can't locate the JDK

I am trying to set up the WebLogic Server for a class and since I had to download the jar file (because that's what is provided for mac), it doesn't come with a JDK. We are supposed to use our own. My problem is that I can't get it to "see" my JDK.
I have, after searching long and hard, found my JDK folders in Mac>Library>Java> After that there are a few options(Extensions, JavaConfig.plist, JavaVirtualMachines, Support). Within each of these are more and more options…where is the actual "file" that I can point WLS to? Has anyone else had this problem?
Thanks in advance...
Haven't worked with MAC. But in linux installation the JDK is primarily referenced in the following files:
#$MIDDLEWARE_HOME/registry.xml
#$MIDDLEWARE_HOME/user_projects/domains/base_domain/bin/setDomainEnv.sh
#$MIDDLEWARE_HOME/user_projects/domains/base_domain/init-info/domain-info.xml
#$MIDDLEWARE_HOME/user_projects/domains/base_domain/init-info/startscript.xml
#$MIDDLEWARE_HOME/user_projects/domains/base_domain/init-info/tokenValue.properties
Assuming my domain name is "base_domain".
Change the refernce to your JDK in those files. The 2nd file though, is the key.

RCP's exec launcher can't find companion shared library on launch, but starts with click on org.eclipse.equinox.launcher_1.2.0.v20110502.jar

I'm building an Eclipse RCP application against Eclipse 3.7.1 and Java 1.6.
I'm also using Tycho to build, and have set up my RCP according to the Tycho tutorial from the EclipseCon 2011, to which I've stuck slavishly, apart from project names.
The application builds fine up until I get to Step 5 (adding a p2 repo, then adding a .product file. Well, it still builds fine, and everything is where it should be, but I cannot start the RCP by clicking on the .exe file from the repository in the workspace.
All I get is the old dreaded "The [RCP] executable launcher was unable to locate its companion shared library" error popup.
First of all I thought I might have set up the CLASS PATH incorrectly, but when I open a console and type javaw or java -version anywhere, it all works.
Also, when I go to the pluginsfolder in the p2 repository for the RCP in the workspace, and double-click on org.eclipse.equinox.launcher_1.2.0.v20110502.jar, the RCP starts, albeit without the splash screen.
This must surely mean my Java set up is correct, and it's not a class path problem?
I'm not sure where this problem might lie (I have a plugin, a feature, a product, a repository, and a parent package with the main pom), so if you let me know your suspicions where the error might come from, I'll be more than happy to post respective XML, build.properties, screenshots and what have you. Unless this is a common error with a common solution.
Many thanks in advance!
Oh yea: Windows 7 (64-bit), JDK and JRE both 64-bit as well, Eclipse EE 3.7.1 (I chose that because it contains the most plugins I'll need later by default).
UPDATE
I'm attaching my CLASS PATH Settings for reference.
User variables
CLASS PATH: C:\Program Files\Java\jdk1.6.0_30;.;
System variables
JAVA_HOME: C:\Program Files\Java\jdk1.6.0_30
Path: %JAVA_HOME%\bin;
UPDATE 2
When I let Tycho create a ZIP file in the p2 repository, and copy that from the repo to another location, unzip it and run the .exe, the application starts without problems. So I guess this query is partially solved, but I'd still be interested to hear why I wouldn't be able to start the application from the repository...
Today I came across the same issue. I guess you could find the solution here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176084
In short, the problem in my case was, that the org.eclipse.equinox.launcher_1.2.0.v20110502.jar must be unpacked in the plugins folder under the folder name: org.eclipse.equinox.launcher_1.2.0.v20110502
... hope that helps!
In my case the error The [RCP] executable launcher was unable to locate its companion shared library was because my path was too long.
Same issue I was facing from yesterday. Today, I have changed path of project(git clone) and build it and able to run RCP executable.
I think this issue was because of path too long.

Eclipse Can't find default Java Classes on Mac OS X

I have done Android and C development in my copy of Eclipse, but have never actually done Java strictly. When I add code that compiles using "javac codename.java" to an eclipse project, eclipse gives me errors and can't recognize statements like import java.io.* . I believe this is due to a problem with my class path and I have tried adding some paths like library/system/java but have not had any success. Any ideas for a solution?
If Eclipse is having troubles with classes delivered by JDK, I would suggest checking out if it (thus - JDK) is properly installed. You may do that by going to menu Window > Preferences and started typing "jdk" in search input. It should point You to Java > Installed JREs. Check if there is proper JDK installed (if not - You may add it there).
After that try to clean Your project - menu Project > Clean....
Hope this helps, regards.
If you go into the preferences dialog and go to Java/Installed JREs, make sure those paths are correct.
In order for Eclipse to recognize source files as Java and compile them, your project has to be a Java project. Putting a .java file in a project that wasn't created via New / Java Project won't work.
Please try creating a Java project and put your .java file in it.
On os x the default location (right now anyway) is /System/Library/Java/JavaVirtualMachines/[VERSION].jdk/Contents/Home
The default location is available from /usr/libexec/java_home.
That said, I've never had any problems with eclipse not finding the jdk, usually it's all
automatic.

Categories

Resources