LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-02-2003, 06:18 PM   #1
blacbastard
LQ Newbie
 
Registered: Mar 2003
Posts: 17

Rep: Reputation: 0
compiling in emacs


i am writing a program in java using emacs. i was wondering if someone could give specific instructions on how to compile my program. (by the way i am running slackware 9.0)
 
Old 07-02-2003, 07:02 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Open a terminal (xterm) and type:

javac yourfile.java

Or, if you want to do it from within emacs:

M-x compile

Type in the minibuffer: "javac yourfile.java"
(there's "make -k" as a default)
 
Old 07-02-2003, 07:10 PM   #3
blacbastard
LQ Newbie
 
Registered: Mar 2003
Posts: 17

Original Poster
Rep: Reputation: 0
ok thanks. how do i run the program
 
Old 07-03-2003, 04:19 PM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Depends if your program is an applet or an application...

Applet?

Then you need a html file (say "myapplet.html") that contains something like:
Code:
<HTML><HEAD><TITLE>My Applet</TITLE></HEAD><BODY>
<APPLET CODE="YourProgram.class" WIDTH=400 HEIGHT=300>
</APPLET></BODY></HTML>
Then type:

appletviewer myapplet.html

Application?

Type:

java YourProgram
 
Old 07-03-2003, 09:01 PM   #5
blacbastard
LQ Newbie
 
Registered: Mar 2003
Posts: 17

Original Poster
Rep: Reputation: 0
im trying to write an application. i did what you said from the command line. but i got something basically saying that the system didn't reconigze the command. so my next question is how do i set the enviorment variables if that's what i need to do.
 
Old 07-03-2003, 09:25 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Which version of java have you downloaded
and installed, and where to?

Cheers,
Tink
 
Old 07-03-2003, 10:52 PM   #7
blacbastard
LQ Newbie
 
Registered: Mar 2003
Posts: 17

Original Poster
Rep: Reputation: 0
i have slackware 9.0 i am assuming that it is already installed on my system because i typed whereis java and it told responded "usr/include/java"
 
Old 07-04-2003, 12:10 AM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Must be the one from the gcc, then.
Never installed or used that, so: sorry,
no idea how you call it...

Everyone else on Linux is probably
using sun's version, or the modified
module from blackdown.

Cheers,
Tink
 
  


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
programming c++ in emacs , compiling NL-Stitch General 11 01-27-2005 07:41 PM
Compiling C with Emacs sdpeelejr Programming 9 04-07-2004 11:47 PM
compiling in emacs blacbastard Linux - Software 1 07-02-2003 09:59 PM
Compiling in emacs blacbastard Linux - Software 0 07-02-2003 07:53 AM
Compiling emacs aizkorri Programming 2 03-16-2002 08:24 AM


All times are GMT -5. The time now is 02:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration