I guess you could create a on-line .bat file containing that command, but that hardly seems worth the bother, and doesn't lead on to anything useful. As you build your java skills you will start using some kind of IDE to compile and test code, and you will start packaging your applications into .jar files which can be double-clicked to run them by default.
The trick with making a batch file to execute a single java class file is to use the right variable name in the batch file that picks up only the file name.
I think it is something like: %~n1
This would allow you to set the RightClick context menu to call the batch file when you click on a class file and execute the class file with the java command.
Here is the contents of a batchfile I use:
@REM Execute a java class file
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...