LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 05: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, 06:02 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
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, 06: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, 03:19 PM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
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, 08: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, 08:25 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

Cheers,
Tink
 
Old 07-03-2003, 09: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-03-2003, 11:10 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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



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 06:41 PM
Compiling C with Emacs sdpeelejr Programming 9 04-07-2004 10:47 PM
compiling in emacs blacbastard Linux - Software 1 07-02-2003 08:59 PM
Compiling in emacs blacbastard Linux - Software 0 07-02-2003 06:53 AM
Compiling emacs aizkorri Programming 2 03-16-2002 07:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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