954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

How to execute a .class file by RightClick

0
By NormR1 on Sep 10th, 2010 2:38 am

For those that want to directly execute a .class file in a command prompt window. Here is a way:
Create the following batch file.
Use the Windows Explorer Tools to add a commandline for the .class file:
C:\BatchFiles\ExecClass.bat "%1"

Give it a name like: Execute class file

The batch file ExecuteClass.bat:

REM Execute a java class file - need to strip extension
echo filename is %~n1
java %~n1
MORE

REM Execute a java class file - need to strip extension
echo filename is %~n1
java %~n1
MORE

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You