Can anyone help with this. I am learning Java and am getting this error message "Identifier expected"import java.util.Scanner; public class week3B { private double readtemp; private Scanner myscanner = new Scanner(System.in); //Input temperature in celsiuspublic void ...
741 byte By
vasdiaa at 2007-10-2 3:56:32
Hello i have a problem on compiling user defined classes .examplefile x.javapublic class x{...........................}file y.javaimport x;public class y{}I first compile x.java and everything is OK .Then i compile y.java and the compiler gives the folowing y.java:2: '.' expectedimport yI ...
549 byte By
PtrNa at 2007-10-2 3:58:38
Ok, for science class I told my teacher I would create a program that would take 2 ions and give the formula and name of the formula unit that they would create if they were to join.Now, after spending 8-10 hours working on it, I have finally finished and debugged it. Now I need to find out how ...
495 byte By
majstera at 2007-10-2 3:59:21
Hello,To compile my code I needed to install an additional library. Specificaly, the communcations API. It consists of 3 files:comm.jar win32com.dll javax.comm.properties If I want to run my program on another computer with only JRE intalled, do I need to install the additional library for the ...
Greetings,I have two computers with the java compiler installed. On one, the program works perfect. On the other computer, it doent.Here is the error message I get when I compile the program:symbol : class TextFileInputlocation: class Project1TextFileInput dataFile = new ...
I'm running NetBeans 4.1 with JDK 1.4.2_06 and I have a project that I've created with existing sources. I can compile everything without issues, however, when I try to run my file within the project for testing purposes, NetBeans recognizes that a main method exists, but I get the following ...
497 byte By
Inbal_oa at 2007-10-2 4:06:32
Hi all,I am tring to create h file for java native class.I am using javah -jni (it worked fine in the past) ,and i am getting an error message: (I replaced the class name with myClass)error: cannot access myClassfile myClassclass not foundjavadoc: error - Class myClassnot found.Error: No ...
Hi everybody,since java version 1.5I have to use the javac instead of jikes.Unfortunately javac takes several sec. for compilationAre there any tricks to improve the speed or is there any alternative compiler for 1.5 ?For example ist there a possibility to keep the javac instance running to ...
740 byte By
mae_14a at 2007-10-2 4:32:36
since i am new to java i have no idea how to use the do while...the program i'm trying to make is like this:choose a number:1.j's file2.f's file3.exiti've figured out how to open a number using if else... the problem is after i've chosen a number i don't want the program to end, i want it ...
how do i turn this code into an applet?// The "Pi" class.import java.io.*;import java.text.*;public class Pi{public static void main (String args []) throws IOException{System.out.println ("Welcome to Christopher Wessels's Automated Circle Area and Circumference Worker-Outer.\n\nPlease Give ...
Hello, I have a big problem. My harddisk crashed, and so I can't read any data on it. On it was the sourcecode of a tool I have written. But I forgot to make a backup of the sourcecode, I only have a jar-File.Is there a posssibility to reconstruct the java-files? I worked on this tool a lot, ...
93 byte By
Barbiea at 2007-10-2 4:45:41
HelloCan anybody pls tell me how to execute code in wsadThanku in advace
Could someone tell me how to control the optimization performed by javac? Prior to JDK 1.5, javac had a command-line optimization flag, but nothing like it is documented for 1.5.I ask because I've been using Eclipse 3.1 to debug JDK-compiled Java and Java-via-JSP classes, mostly like a dream. ...
hey,i haveString x = crd.gettoken();along with a few other pointer type things like this, around 5 of them all giving me the same messagecannot find symbolbut all the other classes can find each fine and when i take out just these terms everything compiles. just got 1.5 update 5 if that makes a ...
Hi all,I am a beginner in Java. Have been trying the whole day to find out whats the diff between javac -classpath and java -classpath? I know javac compiles and java runs, but why both we have to specify the classpath?I wrote a simple Test.java program to print something. But when i include a ...
I'm trying to write a loop program and I get the following error when compiling:C:\Documents and Settings\Family\My Documents\Beaches151.java:33: <identifier> expectedfinal int 1; ^C:\Documents and Settings\Family\My Documents\Beaches151.java:34: <identifier> expectedfinal int 2; ...
*sigh* ok.. I have fixed this problem before on another computer and i remember how hard it was to get an answer but i finally did. The problem is, I have encountered the same problem on this computer and i cant remember how to fix it. I am getting the error that says "Javac is not recognized ...
hello,i am Vishal. i use linux opearting System. till now i am using Eclipse editor for java programming. I tryed to comple java rpograme through Kansole. but i cannot. Any one can tell how to compile java programe through Kansole.Vishal
893 byte By
yael_ta at 2007-10-2 5:10:48
HelloI'm trying to compile a code i wrote but every time i try this error appears:--Configuration: targil1task3 - JDK version 1.5.0_05 <Default> - <Default>--C:\Program Files\Xinox Software\JCreatorV3LE\MyProjects\targil1task3\EquationsSystemStatistics.java:38: variable z might not ...
Im trying to compile java programs without having to change the directory in the DOS prompt. By setting up a classpath to my program directory I can run java programs from the base directory using JAVA, but JAVAC refuses to work saying "error cannot read hi.java" there is definitely a hi.java ...
568 byte By
vmvidyaa at 2007-10-2 5:12:11
helloi saved my java in my directory.i set the path to c:\jdk1.3\bin where my jjdk1.3 installed.and i set my classpath to my folder which is in D:the classpath and path are set in the autoexe.bat fileafter that when i am trying to complile my java pgm hello.java in the command prompt from my ...
I have copied the application into the JDeveloper 9i and compiled the application. when i select one of the jsp's in the application and say run, i get this message and the page woudn't run. The message it shows in the console is : THE SYSTEM CANNOT EXECUTE THE SPECIFIED PROGRAM. Please help ...
1920 byte By
mae_14a at 2007-10-2 5:20:24
import java.io.*;public class choice3{public static void main(String[]args)throws IOException{BufferedReader dataIn= new BufferedReader(new InputStreamReader(System.in));//declarationschar letter;String sss;String med;double tot;double ss;double me;//inputSystem.out.println("A. ...
HelloWhen I compile the HelloWorldApp.java program. I have this problem:I get: error: cannot read HelloworldApp.java. What can I do?In addition, How do I use the options? For example:javac -g HelloworldApp.javaI get an error saying that I did not use well the flag g. Is the command bad ...
Hi,Can any one tell me how can i get rid of this "Uknown Source".a.b.CException: d.e.f.GException: Bla bla bla blaat a.b.C.a(Unknown Source)at a.b.C.b(Unknown Source)at a.b.C.c(Unknown Source)at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)at ...
Hello I am glade to know this forum, I bet it is muche better than my instructor, any how ..I am trying to do my first java program, the progam is working properly on netbeans 4.1 with jdk1.5.0, but when I go to the command prompt on windows XP it dose not work, other programs work in the ...
1145 byte By
BRBadea at 2007-10-2 5:47:58
I have been having multiple issues trying to compile stubs/skeletons using the rmic command on a program that I wrote under both Windows 98 and XP, both with java 1.5.To simplify things, I tried using a HelloWorld example from the internet as well, but to no avail. I am generally confused about ...
170 byte By
Monoxa at 2007-10-2 5:48:34
Hi guysIn order to sell the application it needs to be in a format like and .exe (obviously) file format etc... how would i do this?Help appreciated.
Hi,When attempting to build against a class that uses runtime annotations, javac is crashing with:An exception has occurred in the compiler (1.6.0-rc). Please file a bug at the Java Developer Connection ( http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. ...
the file size is 820Kb.it was not getting compiled with a jasper compiler so i used a plain javac to try and compile and even that failed.Previously i had done the same for a 640k file and javac had worked fine but now it doesnt.Does even javac has a limit please feel free to suggest solutions ...
When I compile java using me text editor everything is as smooth as sand but when I go to my ms-dos prompt and type javac Root.javait turns out to be a bad comand. I have windows 98SE btw and don't understand what the problem is?Now my real problem is when I get my java file to compile using ...
852 byte By
aiwushia at 2007-10-2 6:09:11
the java source file wihtout package name is in d:\prj\source\testmain.java CLASSPATH =d:\prj\source;C:\eclipse-SDK-3.1.1-win32\eclipse\workspace\EMSchecker;C:\Program Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_05\jre\bin;C:\Program ...
173 byte By
DnsDMnsa at 2007-10-2 6:14:22
After tyring to set the path for javac according the tutorial directions I get an invalid path error. Please help me so I can get started!Thanks,DnsDmns
I have:public interface ActionControl<C extends ActionControl<C>> extends Control<C>{public ActionModel getModel();}public interface ValueControl<V, C extends ValueControl<V, C>> extends Control<C>{public ValueModel<V> getModel();}public interface ...
Howdy - am in the process of creating a program where a user enters the number of people in their family. The loop is suppose to loop the number of member in their family.. I got it to loop but it gives me a error stating that the int needs to be a boolean.. i am not really sure what it asking ...
can somebody help me how to set classpath from file if we have more than 10 jars Thanks
257 byte By
Falzara at 2007-10-2 6:29:25
Hi, I am new so please bear with me. I use a computer system at work and will pop open an internet browser window. Now, I cant install a popup blocker so I need a java script that will automatically close a popup for the google site. Can anyone help?
the tutorial is saying that i need to create and appropriate class path. i know wer to go to set it but what should i set it to. if that makes any sense. you see im trying to run the hello world program and ive tryed everything but setting the classpath variable so that the os will know were to ...
I'm not exactly what to even call this question.Right now, I have an application for uploading files to a special server on a network. So people can access this program on any PC on the network, I'll be putting the files on the server and then putting shortcuts to the executables. However, ...
278 byte By
Y_NOTa at 2007-10-2 6:52:48
I want to place my class files into the specified directory, i mean like my package heirarchy is com.abc.utils, then now i want to place my classes in a classes folder with proper package hierarchy. There is a command javac with -d switch, but i foeget how do i use this.
public void update (Graphics g) { Dimension d = getSize(); if ((offGraphics ==null)***(d.width ! = offDimension.width)(d.height ! = offDimension.height)) {offDimension = d;offImage = createImage(d.width, d.height);offGraphics = offImage.getGraphics(); } offGraphics.setColor(getBackground()); ...
668 byte By
prity1a at 2007-10-2 7:01:03
Hi All,I have windows XP. I have java files in following 3 directories that I want to compile.C:\spring\commands\*.javaC:\spring\controller\*.javac:\spring\service\*.javaI went in to command directory and run javac *.javaall java files successful compileI went to service directory and run javac ...
689 byte By
mzungua at 2007-10-2 7:03:12
HiI'm from UK, although I've used one for ages I am new to computing itself and very new to programming - in fact I haven't started yet because I cannot get my JDK to work!! I have downloaded it successfully, it is installed and I have verified the version from athe command prompt. I have ...
import java.awt.*;import java.awt.geom.*;import java.awt.event.*;import java.applet.*;public class javacw extends Applet implements KeyListener, Runnable{Area pandaArea;Graphics2D g2d;// Providing coordinate control for the Pandaint pandax=20, panday=50;// Animation condition. True = animate, ...
import java.awt.*;import java.awt.geom.*;import java.awt.event.*;import java.applet.*;public class javacw extends Applet implements KeyListener, Runnable{Area pandaArea;Graphics2D g2d;// Providing coordinate control for the Pandaint pandax=20, panday=50;// Animation condition. True = animate, ...
How do you compile three class files into something that a user can just double click on and run?
Can anyone help me with this. I am learning Java and am getting this error message:C:\Alltigo\MyPeer.java:7: <identifier> expectedpeerConfiguration.setPeerType(MyPeer) ^And my source code is:import com.alltigo.locationtag.sdk.Peer;import ...
12832 byte By
Hyugaa at 2007-10-2 7:19:13
I really dont know how come this doesnt work, for any reference to the french words(if needed) please do askimport java.io.*;import java.text.*; public class BernJohnTp7{ static final String MENU = "- - - - > M E N UT P 7 < - - - -\n" +"1.Ligne la plus longue\n" +"2.Statistiques\n" ...
As described in http://forums.java.sun.com/thread.jspa?threadID=686083, the above switch creates a class files that can be interpreted by java 1.4.I did a small test and it works (of course), but I can't find any official documentation that describes this switch. Can someone point me to ...
164 byte By
kojoa at 2007-10-2 7:39:43
I believe it might have been asked already; yet I'd like to know what syntax I have to type in command prompt to compile and run javadoc.Many thanks.