• Post Reply Bookmark Topic Watch Topic
  • New Topic

replace "javac" instead of "myname" to compile the java code  RSS feed

 
sankar manoharan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any possibility to replace "javac" instead of "myname" to compile the java code..please help
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!
Can you tell us why you want to do this? What's wrong with using "javac"?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It certainly can be done rather easily on a Unix box - you just define an alias:

alias myname="javac"

 
sankar manoharan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,i got it from my Friends ...

@echo off
title Sankar Compiler/Interpreter (c)
:start
cls
echo.*****************
echo Sankarc to compile
echo Sankar to run
echo.*****************
set path=%PATH%;C:\Program Files\Java\jdk1.7.0_04\bin
set /p option=Option:
cls
if %option%== Sc goto compile

if %option%== Sankar goto run

:compile
set /p name=Sankarc
cls
javac %name%
pause
goto start
:run
set /p name=Sankar
cls
java %name%
pause
exit
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, but why would you want to do this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!