Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Compiling Error

Have Programming Question? Ask it here!
 
 
 


Gangadharan
Compiling Error
2 Answer(s)      3 years and 10 months ago
Posted in : Java Beginners


cant able to compile java servlet file in the command prompt? WHY?
but i can compile normal java file

give me answer to fix my problem.

Advertisement
View Answers

February 2, 2012 at 10:35 PM


import java.awt.*;
import javax.swing.*;

public class TextFonts extends JApplet
{
   public void paint ( Graphics g )
   {
       super.paint( g );
       g.drawString ("Hello World", 0, 10);
       Font small = new Font( "Serif", Font.PLAIN, 8 );
       g.setFont( small );
       g.drawString (*Java rocks", 0, 50 );
       g.drawstring ("Hiya", 60, 15 );
                    // font stays the same until we call setFont again
       Font big = new Font( "SansSerif", Font.BOLD + Font.ITALIC, 36 );
       g.setFont( big );
       g.drawString ( "Skiing is fun", 50, 50 );
   {
{


February 2, 2012 at 10:36 PM


public class TextFonts extends JApplet {
public void paint ( Graphics g ) { 
super.paint( g ); 
g.drawString ("Hello World", 0, 10);
Font small = new Font( "Serif", Font.PLAIN, 8 ); 
g.setFont( small );
g.drawString (*Java rocks", 0, 50 );
g.drawstring ("Hiya", 60, 15 ); 
// font stays the same until we call setFont again Font big = new Font( "SansSerif", Font.BOLD + Font.ITALIC, 36 );
g.setFont( big );
g.drawString ( "Skiing is fun", 50, 50 );

{ {


Related Tutorials/Questions & Answers:
Compiling Error - Java Beginners
Compiling Error  cant able to compile java servlet file in the command prompt? WHY? but i can compile normal java file give me answer to fix my problem
Compiling Error - Java Beginners
Compiling Error  cant able to compile java servlet file in the command prompt? WHY? but i can compile normal java file give me answer to fix my problem.  Hi Friend, Do you have servlet-api.jar in the lib folder
Advertisements
error while compiling - Java Beginners
error while compiling  i am facing problem with compiling and running a simple java program, can any one help me, the error i am getting is javac is not recognised as internal or external command  Check if you JAVA_HOME
Error While Compiling - Java Beginners
Error While Compiling  Hi All I Am a beginner and i face the following problem while compiling can anyone help me. C:\javatutorial\example> javac HelloWorld.java 'javac' is not recognized as an internal or external
error in compiling j2me apllication - Applet
error in compiling j2me apllication  hi, in my j2me application for video,m getting only the audio.i ll send the code. package src.video_streaming; import javax.microedition.media.Manager; import
i have got error while compiling simple tag handler
i have got error while compiling simple tag handler   javac.servlet.jsp not found! tell me what are the jar files required to run simple tag handler...;it is : javax.servlet.jsp only but getting error wt is reason
program not compiling
program not compiling  Hello can you help me with this program,I am trying to add a loop at the end of the program but it is not compiling,thank you. import java.util.*; import java.text.*; class HardwareItems { String code
compiling .class files
compiling .class files  how do i compile .class files using eclipse
Compiling package in command line
Compiling package in command line  Hi friends, i am totally new to java programming, i am basic learner in java. My query is, How to compile java... how to compile it. Thanks & Regards, Sham   Compiling Java
error
error  while iam compiling iam getting expected error
Compiling a Servlet - JSP-Servlet
Compiling a Servlet  Respected sir, I just want to know how to compile a servlet coding? I need it in a sequential way so that I can understand it at the very first time as I am new to this technology
compiling programme IJVM
compiling programme IJVM  I TRY AND COMPILE THE PROGRAMME BELOW BUT HAS ERROR APPEAR ALL THE TIME,,CAN ANYONE CORRECT THE CODE AND WRITE UP THE NEXT METHOD FOR POWER IN THE PROGRAME AS WELL...URGENT // Program to read two single
process of compiling and running java program
process of compiling and running java program  Explain the process of compiling and running java program. Also Explain type casting
compiling a uploaed java file - JSP-Servlet
compiling a uploaed java file  How a uploaded java source file is automatically compiled(i.e converted to .class file) in server using jsp/servlet
Compiling and Interpreting Applications in Java
Welcome to Java tutorial series. In this lesson, you will learn about following topics: Compiling Java Program Interpreting Java Program Compiling Java Program For compiling Java program, first your code must write
Compiling and Running Java program from command line
Compiling and Running Java program from command line - Video tutorial... of compiling and running java program from command line. We have also video... the process of compiling and running the Java program from command prompt
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version. This type error also comes when java file
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
JAVA Annotation Error
JAVA Annotation Error  while compiling simple java program i get annotation error i.e class will only be accepted if annotation processing is explicitly requested..how to solve
compilation error
compilation error  Hi my program below is not compiling,when I try to compile it i'm getting the error message "tool completed with exit code 1".The loop has to be at the end of the program can you help me. Blockquoteimport
error message
error message  Sir i make one form facility with insert,update,delete.i want to error msg if any type of the data is missing and display in error msg which of the data is misssing
Permgen error
Permgen error  hi how can i solve permgen error
installation error
installation error  hi, m getting an error like " semicolon found in the selected path".how to resolve this error? during installation of jdk 1.6
error log
error log  hi my requirement is validate xml and xsd in java.If there is an errors then i will log error and store into error table. so plz if any one knows send code urgent. error table details-------------- Table
MAin error
MAin error  Error while running hello program in another dir rather in bin. path is already set. java -version jdk1.6.0_24 no error while compilation but @ d tym of runnin error in main class is generated Exception in thread
JSF error
JSF error  some of the users are not able to update the db. getting the error "An Error Occurred: Error calling action method of component with id CreateorManageOffer:jidjsp134312524923 Caused by: java.lang.NullPointerException
404 error
into jboss->server-> default->deploy folder it doesn't shows any error. but when i run this application by using localhost:8080/webapp ,it shows 404 error how should i slove this error
404 error
404 error  struts application having 404 error while hosting to a online server.it works fine in my local machine but dont work in virtual host.showing 404 error
Error display
Error display  I want to give a message on the screen that an error has occured...but I dont want to use alert and give pop up box...any other solution for the problem
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
LOGIN ERROR
LOGIN ERROR  ERROR SCRIPT: LOGIN FAILED", $_SESSION['login fail']='0',}?> Ty Team
run time error
saved your class with HelloWorld. Check it out. Even then if error occurs, post the error.   Here it works and showing output. Have you save the file... to compile the code?: javac HelloWorld.java Actually if you are compiling the class
error in driver
error in driver  i have done connection settings for oraclethin driver in netbeans ide 6.9.1. and i was able to view tables of my database.but when i am trying to access tables from my java class i was getting error
programming error
programming error  I got an error when i did the following program the prg. is to "select the name from database when the age is given for the respective name" error i got is:SQL exception please give me the solution by providing
 

 

 

DMCA.com