Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java
class ExtensionClassLoader
{
	public static void main(String[] args)
	{
		String i=null;
		System.out.println("hello");
		i=System.getProperty(i);
	}
}


What I have tried:

Actually, I am trying to know about extension classloader. I am getting Nullpointer exception when i type (java -Di=10 ExtensionClassLoader) in command prompt.
Any information about this classloader or link to where can I find information will be highly appreciated.
Posted
Updated 22-Nov-16 21:59pm

1 solution

Java
String i=null;
System.out.println("hello");
i=System.getProperty(i);

What information do you think getProperty will return when you send it a value of null?
You need to pass the actual name of the property you wish to retrieve.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900