LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   running/compiling homemade .java applications (https://www.linuxquestions.org/questions/linux-software-2/running-compiling-homemade-java-applications-241538/)

truthe 10-11-2004 08:47 PM

running/compiling homemade .java applications
 
Yea, so I've been taking this comp sc. course for fun. I used windows but recently have switched entirely over to linux, and i'm sure you're all aware of "textpad" editor for windows which allows you to compile and run programs with the click of a button. But my question is how do I compile .java programs and also how do i run them so I can test to see if they work correctly. I have gcc and java installed.
thank you,
Reid.

hmm by the way, these are dinky little 30 line programs with like 1 while loop an if statement and some numbers, so it's not exactly azureus... but close.

sh1ft 10-11-2004 09:08 PM

I believe to compile it you need something like drjava to compile, which you run by typing "java -jar drjava.x.x.x.x.jar", then open it up +compile it. After that you can run the class files in the terminal by doing "java whatever.class". I think at least, Im not on my linux box so I cannot doublecheck

aaa 10-11-2004 09:12 PM

Well, if you have the sun java sdk already installed...
open commandline (xterm) & :
>javac <classname>.java
>java <classname>


All times are GMT -5. The time now is 03:36 PM.