Home » Java » How can one make an eclipse project, that uses Java FX libraries, be accessible on different computers?-Exceptionshub

How can one make an eclipse project, that uses Java FX libraries, be accessible on different computers?-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I have my eclipse installation stored in the cloud using Onedrive. My workspace and project source files, are all stored on Onedrive.

I have found that this makes it possible for me to work on the same project both when I am at home on my desktop, and when I am at school/work using my laptop.

For example, I can make changes to a project on my home desktop. Then later at school, I can run eclipse on my laptop and all the project changes that I made at home will automatically be updated on my instance of eclipse running on my laptop.

However, in order to use JavaFX libraries in any of my code I have to do the following steps:

  1. set JAVA_HOME environment variable to JDK installation directory

  2. create a new User Library in eclipse and include within it all the jar files from the Java FX SDK

  3. include the JDK as installed JREs in Eclipse -> Preferences -> Java -> Installed JREs

  4. Add VM arguments in the run configuration options of the eclipse project

This is becoming incredibly tedious because now, each time I attempt to switch from my home computer to my laptop and vice versa, I have redo all these steps.

Even though my JDK installation and my Java FX installation are also stored in Onedrive, the paths are not the same from one computer to the next because I cannot have the same user account on separate operating systems.

For example, the path

C:\Users\MyName\OneDrive\jdk-13.0.2

cannot be shared between computers since the user account “C:\Users\MyName” is unique from one operating system to the next.

This forces me to have to change all the paths, environment variables, jar files, and installed JREs, every time I want to switch from one computer to the other.

Is there any work around for this?

Would the e(fx)clipse plugin help in any way?

Any advice immensely appreciated.

How to&Answers: