Zapadlo Posted August 8, 2009 Share Posted August 8, 2009 Hopefully just a quick question, I'm trying to set-up JDK on my system and trying to add the bin location to the path in environment variables. However the button to 'Edit' the path is greyed out. I can create my own environment variables but not edit the Path. Advice? Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/ Share on other sites More sharing options...
+allan MVC Posted August 8, 2009 MVC Share Posted August 8, 2009 Are you logged in as admin? Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/#findComment-591401856 Share on other sites More sharing options...
Zapadlo Posted August 8, 2009 Author Share Posted August 8, 2009 Yep Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/#findComment-591401870 Share on other sites More sharing options...
KZWings Posted August 8, 2009 Share Posted August 8, 2009 EDIT: Nevermind. Won't work. Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/#findComment-591401886 Share on other sites More sharing options...
Zapadlo Posted August 8, 2009 Author Share Posted August 8, 2009 I disregarded this solution as I assumed that will overwrite my current PATH value. However if someone confirms this as a valid solution I will give it a go EDIT: :) Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/#findComment-591401894 Share on other sites More sharing options...
franzon Posted August 9, 2009 Share Posted August 9, 2009 (edited) Are you logged in as admin? You don't need to be logged in as admin. UAC allows you to elevate privileges on the fly: Open the start menu -> right click on Computer then select Properties -> Click on "Advanced system settings" (the UAC elevation prompt will appear) -> click on Environment variables button Edited August 9, 2009 by franzon Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/#findComment-591404156 Share on other sites More sharing options...
Zapadlo Posted August 9, 2009 Author Share Posted August 9, 2009 Ah, excellent. That worked, thank you very much. If I may, another question. Now javac is being found but: 'java <classname>' returns class not found: C:\Users\Zapadlo\workspace\Test\src\test_1>javac Sample.java C:\Users\Zapadlo\workspace\Test\src\test_1>java Sample Exception in thread "main" java.lang.NoClassDefFoundError: Sample Caused by: java.lang.ClassNotFoundException: Sample at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) Could not find the main class: Sample. Program will exit. This is Sample Class: package test_1; public class Sample { public static void main (String[] Args) { System.out.println("Hello World?"); int i, j; i = 5; j = 6; System.out.println("i + j = " + (i+j)); } } Link to comment https://www.neowin.net/forum/topic/808516-editing-path-variable/#findComment-591404320 Share on other sites More sharing options...
Recommended Posts