Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

java tricks

Thread view: 
raski - 09 May 2006 13:36 GMT
i was wondering if any of you guys would know any trick i could
pull on some of my friends on a java based chat room. nothing harmful, only
for playing around...

www.iskon.hr/chat/chat.jsp

that's the link. i would be thankful if you could mail me some...

Thanx in advance
Stefan Ram - 09 May 2006 15:53 GMT
>i was wondering if any of you guys would know any trick i could
>pull on some of my friends on a java based chat room. nothing
>harmful, only for playing around...

 The following program will print »Hello!«.

public class Hello
{ public static void main( final java.lang.String[] args )  
 { java.lang.System.out.println( "Hello!" ); }}

 This trick works by exploiting the JLS and the Java-API,
 forcing the JVM to print »Hello!«. Both the Java Security
 manager and the Java "sandbox" usually will not prevent this
 to be actually executed!

 But be careful: The text will be printed /immediatly/ as soon
 as the program is started, there will not be a prior warning
 or a an inquiry. So, you might not try this at home. But
 possibly you could fool your friends in the chat room into
 compiling and running it? That would be fun! I'd like to see
 the baffled look on their faces when suddenly out of the blue
 the text »Hello!« appears on their screen.

 Even more cool: The text »Hello!« can be replaced by any other
 text, in order to print that other text. So it is great for
 playing around. Just give it a try!
James McGill - 09 May 2006 16:12 GMT
> public class Hello
> { public static void main( final java.lang.String[] args )  
>   { java.lang.System.out.println( "Hello!" ); }}

Do you realize that causes the JVM to exit as soon as the static
function completes?!
Bart Rider - 09 May 2006 16:14 GMT
>>i was wondering if any of you guys would know any trick i could
>>pull on some of my friends on a java based chat room. nothing
[quoted text clipped - 22 lines]
>   text, in order to print that other text. So it is great for
>   playing around. Just give it a try!

*lol*
:P


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.