Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 8282 - Can't do evaluation with run in package "java.util"
Summary: Can't do evaluation with run in package "java.util"
Status: RESOLVED DUPLICATE of bug 1633
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-23 15:30 EST by Joe Szurszewski CLA
Modified: 2002-01-23 15:36 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Szurszewski CLA 2002-01-23 15:30:29 EST
20020123

I know I've done this successfully in the past.  Is it now disallowed?
I set the 
scrapbook run in package to java.util, then try to run something like 
"System.out.println("hi")" and get the following walkback in the 
console:

java.lang.SecurityException: Prohibited package name: java.util
	at 
java.lang.ClassLoader.defineClass(ClassLoader.java:479)
	at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
	at 
java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
	at 
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at 
java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at 
java.security.AccessController.doPrivileged(Native Method)
	at 
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at 
java.lang.ClassLoader.loadClass(ClassLoader.java:299)
	at 
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
	at 
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
	at 
java.lang.Class.forName0(Native Method)
	at 
java.lang.Class.forName(Class.java:120)
	at 
org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1.eval(ScrapbookMain1.java:14)
	at 
java.lang.reflect.Method.invoke(Native Method)
	at 
org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.evalLoop(ScrapbookMain.java:46)
	at 
org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.main(ScrapbookMain.java:27)

If 
this is disallowed, we ought to supress the walkback and disallow selection of these packages in 
the run in package dialog.
Comment 1 Darin Wright CLA 2002-01-23 15:34:36 EST
This is a known problem. You can't run in the context of system package.
Comment 2 Darin Wright CLA 2002-01-23 15:36:11 EST

*** This bug has been marked as a duplicate of 1633 ***