🔒 Closed compile and run java file using terminal

Status
Not open for further replies.

fireclouu

Fanatic
run your java file directly to terminal :)

dependencies to install:
  • ecj
  • dx

please note, hindi pa supported ang stitched class compilations, meaning single class lang ico-compile niya, if you can improve it, you can freely modify it.

para sa mga gusto magpractice sa java.

download script here:
You do not have permission to view the full content of this post. Log in or register now.

How to use it on terminal?
  • make sure nakuha niyo na 'yung packages sa itaas (if you use termux, just "pkg install name_ng_dependency")
  • prepare your "single" java file kasama ng script
  • then run it:
bash term_java.sh *NameOfYourFile*.java

note: compiler lang 'to

edit: for machines na walang "java/javac" dependency na galing sa oracle, refer to #4 kung may dependency kayo niyan :)
 
may tutorial ka po ba about installing jdk at jre sa linux?
alam ko provided ng oracle to sa website nila, dl mo na lang sa distro mo :) saka baka studio hanap mo, search for eclipse, intellij or kung saan ka magiging comfortable
 
All you need is this oneliner:

javac HelloWorld.java && java HelloWorld
hmm, tingin ko dapat ata itama thread ko haha, pang termux lang talaga 'to or sa mga terminal na wala pang support ng compiler ng oracle java, tho pwede naman humanap ng build, kaso may ecj naman kaya parang naging workaround lang rin to hehe :)
 
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 689
    Views
  • 3
    Participants
Last reply from:
materialsstorage01

Trending Topics

Online now

Members online
1,152
Guests online
1,753
Total visitors
2,905

Forum statistics

Threads
2,293,933
Posts
29,087,493
Members
1,208,003
Latest member
ayanex
Back
Top