Javac

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Javac

 
0
  #1
Feb 14th, 2007
Hello:

I have recently been studying Java; I have followed a few tutorials and building some simple apps.

I am wanting to try applets. I read about them tonight and followed an included tutorial in order to get an introductory feel for doing so.

My questions do not pertain to code or syntax but compiling the text file(s).
  1. Javac: the tutorial refers to Javac. I assumed I could code and run the applet in JBuilder (2005 Foundation). Is this possible? When I open Javac it runs lines and closes. Honestly, I am not very practiced with command-line.
  2. Naming and titling Java text files for applets: I read references to "*.java"; I assume that this would be, for example, something such as "Test*.java" -- is this correct? I have never dealt with this before.
I want to become more clear on these issues before I proceed. Any help or push in the right direction would be greatly appreciated.

Thank-you in advance.
MattyD
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,192
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Javac

 
0
  #2
Feb 15th, 2007
Javac is what is called when you hit the button for compiling in your IDE and like in IDE if you have errors it will output them for you if no errors you simple get empty command line to execute another command
Applet is java file, just instead of using main method you call init to start applet and stop to stop it
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Javac

 
0
  #3
Feb 15th, 2007
Originally Posted by peter_budo View Post
Javac is what is called when you hit the button for compiling in your IDE and like in IDE if you have errors it will output them for you if no errors you simple get empty command line to execute another command
Applet is java file, just instead of using main method you call init to start applet and stop to stop it
Peter:

Thank-you for your reply.

[html]The source for that class must live in a plain text file with the same name (including case), with a *.java extension.[/html]

Code for Tutorial
[php]public class MyApplet extends java.applet.Applet {
public MyApplet( ) { //create applet
System.out.println("In ctor");
}
public void init( ) { // initialize
System.out.println("In init");
}
public void start( ) { // display page
System.out.println("In start");
}
public void stop( ) { // leave page
System.out.println("In stop");
}
public void destroy( ) {// clean up
System.out.println("In destroy");
}
}[/php] I am bit confused still about the use of "*":

[html]Create a Panorama Applet class and HTML file. Override the init method and print outa trace message. Test and verify the message is printed.Here are the steps:
1. Create Panorama.java using a text editor.
*In the file, add a public Panorama class and have it inherit from
java.applet.Applet.
*In the class, add an init method that takes no arguments and returns void.
*In init, issue System.out.println of "In Panorama.init". This provides amessage when the method is invoked that traces the flow through the applet.Continue to add trace output to all methods you add to the applet.
*Save the file and exit the editor.[/html]
Any input would be appreciated.
Thank-you,
MattyD
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,192
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Javac

 
1
  #4
Feb 15th, 2007
Originally Posted by mattyd View Post
The source for that class must live in a plain text file with the same name (including case), with a *.java extension.
I am bit confused still about the use of "*":
Asterix "*" stands for any, it this case they just try to say put there a name you want like myApplet.java. Also "plain text file" is little distracting but take it that this way, they expect you to type your code in notepad and when saving give it java extention. Not everybody start with IDE's, I did my first few months of coding in notepad and compiled all in command prompt :cheesy:

To the rest of your question about applet and Panorama.init I can't comment, I did only requered part of applet coding at university and never returned back to it again. It didn't impress me :rolleyes:
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Javac

 
0
  #5
Feb 15th, 2007
Originally Posted by peter_budo View Post
Asterix "*" stands for any, it this case they just try to say put there a name you want like myApplet.java. Also "plain text file" is little distracting but take it that this way, they expect you to type your code in notepad and when saving give it java extention. Not everybody start with IDE's, I did my first few months of coding in notepad and compiled all in command prompt :cheesy:

To the rest of your question about applet and Panorama.init I can't comment, I did only requered part of applet coding at university and never returned back to it again. It didn't impress me :rolleyes:
Thank-you for your help.
Much appreciated.

Kind Regards,
Matty D
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC