1

I am running Eclipse Mars.2 Release (4.5.2) and executing against Java JRE 1.8. I don't have admin rights on my machine so I am unable to set the ClassPath Environment Varibale. I was doing some reading on the Java Docs help page (https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html#BEHJBHCD) and it says that you can use a command switch to specificy the classpath which is actually there prefered method.

Example:

java -classpath C:\java\MyClasses;C:\java\OtherClasses ...

However, I am still relaivily newer to Java and I am running the application from eclipse directly.

My question is how do I go about setting this up while using Eclipse?

Josh
  • 569
  • 1
  • 11
  • 35

1 Answers1

0

In Eclipse open Window -> Preferences from menu and search for classpath. Should be Java -> Build Path -> Classpath Variables. There you add / edit / remove classpath variables as needed.

In your launch configuration open tab Classpath and add the variable by clicking on Advanced.

Please note, however, that you should be able to define environment variables for your operating system even without admin rights on user level.

Würgspaß
  • 4,660
  • 2
  • 25
  • 41