Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

still having trouble  RSS feed

 
David Malott
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to run HelloWorld by typing "java java.HelloWorld" I get the following message.
Exception in thread "main" Java.Lang.SecurityException rohibited package name:java
at java.lang.ClassLoader.defineClass
<ClassLoader.java:246>
at java.security.secureClassLoader.defineClass
<SecureClassLoader.java:123>
this is only two of the 11 lines like this. If it's necessary to see them all, I can write them all out. I'm hoping someone can help me.
thanks
[ May 28, 2002: Message edited by: David Malott ]
[ May 28, 2002: Message edited by: David Malott ]
 
Robert Ziel
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ May 28, 2002: Message edited by: Robert Ziel ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's that dang "Razz" Graemlin again. Always that dang "Razz" ...
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,
Are you running Windows?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:
1. Make a directory called "temp" somewhere
2. In this directory create and edit a file called "HelloWorld.java" with these contents:

3. From the command line, from the "temp" directory you've created, compile the file like this:
javac HelloWorld.java
4. From the command line, from the "temp" directory you've created, attempt to run the file like this:
java -classpath . HelloWorld
Any success?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can duplicate your error message when I try to compile and run this:

Is this what you were attempting to do?
 
Onkar Shendge
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think here problem is that you are trying use package which is used by java for its own classes.
Try using some other package name
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!