LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-11-2004, 08:47 PM   #1
truthe
Member
 
Registered: Sep 2004
Distribution: arch linux .7
Posts: 30

Rep: Reputation: 15
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.

Last edited by truthe; 10-11-2004 at 08:52 PM.
 
Old 10-11-2004, 09:08 PM   #2
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 32
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

Last edited by sh1ft; 10-11-2004 at 09:11 PM.
 
Old 10-11-2004, 09:12 PM   #3
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using default applications from java? german Programming 2 06-21-2005 11:26 PM
compiling & running java using gcc kiran_kondru17 Linux - Newbie 1 01-04-2005 11:49 AM
java applications repository dukeinlondon Linux - Software 3 12-25-2004 11:14 AM
Compiling applications into the kernel? lrt2003 Linux - General 3 05-13-2004 10:32 AM
Having trouble compiling/running java on linux nejiron Linux - Software 12 11-11-2003 12:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration