362 byte By
harriia at 2007-10-3 6:30:15
haii want to run a war file on tomcat serverbut is giving error:--JAVA_HOME does not point to JDKi have done folloing settings in environmental settings of windows xp professional as environmental variablesJAVA_HOME:C:/ jsdk1.4path=c:/jsdk1.4/binclasspath= c:/jsdk1.2/libplz help ...
Hi!I am trying to compile the mysql++ libraries on Solaris 8 using the Sun C++ compiler CC 5.3 version.but I get an error:"../../../../tools/mysql++/lib//resiter.h", line 53: Error: Invalid template parameter default.Can anyone let me know what can be the problem and whats the solution for the ...
1014 byte By
abc4616a at 2007-10-3 6:47:01
I have a question about this part of the program:if (!editErrorFound){ if (hrs > 0 && rt > 0)staff = new Employee (fn, ln, pos, rt, hrs );elsestaff = new Employee (ln,fn,pos);}This part of the code would not compile. What should I do? Here is the error message:C:\Documents and ...
467 byte By
wf7777a at 2007-10-3 6:50:15
I've made a java program that processes text files with given extension. If the user click this kind file, it can be opened by the program. but the program can only be compiled into .class file or packed as .jar file, so the text file can not opened by .jar program. The user must run .jar ...
2952 byte By
DirkBWa at 2007-10-3 6:54:49
Hello,apt is indeed a powerful tool. As long as it's working as expected :PMy problem here is that I wrote a new Visitor that also checks for Package annotations. As you may already know: package annotations have to be used in a file called package-info.java which may look like this:/**My ...
146 byte By
darksssa at 2007-10-3 6:55:41
could I use cmd to compile and run a java program?so instead of using jcreator, or eclipes could i type it into cmdif so how?
HI,I'm working on a linux based system and I need java for programming projects but when i want to compile a project, I get the error:-1. WARNING in Og05_08.java (at line 8)public class Og05_08 extends Applet implements ActionListener ^^^^^^^The serializable class Og05_08 does not declare a ...
I've read a ton on this topic but none seem to fit my needs. I continue to get the "cannot be referenced from a static context" error. I understand that it is because I am referencing a method that is not static in another class, with a static main method of another class but from my ...
Does anyone have any experience with unit-testing annotation processors? I'm working on an annotation processor that checks various constrains on declarations and issues warnings if something's wrong. Is is possible to test something like that short of "brute force", running APT and then ...
648 byte By
SHIFTERa at 2007-10-3 7:27:47
I cannot see what is wrong with this code but i can't get it to compile. when i try to compile it i get the "Exception in thread "main" java.lang.NoClassDefFoundError:Is this a problem with compiling or is it a code error?Here is my codepublic class IntCalc{int value;public IntCalc(){value = ...
Hello,I am developing a Java decompiler and Bytecode debugger for my MEng dissertation project.I have written a very short (< 1 min) questionnaire which i have already distributed to students at my university, however I would like to have individual and industry developers (such as ...
2067 byte By
anh000a at 2007-10-3 7:50:15
i have create 2 class this is the first classpublic class Book{private String BookTitle;private String BookAuthor;private int yearPublished;public Book(String Title, String Author, int yr){BookTitle = Title;BookAuthor = Author;yearPublished = yr;}public String getTitle(){return ...
I'm trying to Install Neatbeans IDE on my school network. The problem I'm running into is the IDE is looking for the JDK in the local DIR "C:\program files\Java\(JDK version)".I was wondering if there's a way I can tell Neatbeans to look in the correct DIR.
Hi all!I don't know if that question involves that forum. I'm developing an application. I execute code like this in java se 6 beta version:public class MyApplication{public static void main(String Args[]){MyMatrix foo;for(int i = 100; i <100000; i += 100){foo = new MyMatrix(i, ...
Hello I am new to JavaWhen I compile my codes I have the following errorCould someone please help me out?Thanks<identifier> expected public FamilyTree(int numPerson, numChild, numParents)Here are my codesimport java.io.*;public class FamilyTree implements Serializable{private static final ...
Hello,I am learning to write servlet using J2EE 5SDK. But for some reason, the compiler (javac) keeps telling me that the following packages do not exist:javax.servletjavax.servelet.httpWithout the "javax" packages, the codes get compiled. I did everything in the instruction on how to set the ...
Hi, did you all see this error before?error: unsupported encoding: SJIS_i
hi,i use linux and i have to compile my project with shell files... the compiler read my file (Applet1.java) but there is one error.... i don't know which one but i can't make the class file.where is the problem?/Applet1.java read: . 1 error ==> is the error messagemy file has all rights ...
1252 byte By
DannyKa at 2007-10-3 9:22:05
Hello,I have a problem with my compiler.I have installed jdk-1_5_0_09-windows-i586-p-iftw.exe I have set the Path to the bin directory.But if I do javac Test.java in the cmd I get the following error msgThe programm code is ok I have tested it on an other PC with Java.An exception has occurred ...
348 byte By
darksssa at 2007-10-3 9:22:43
when i run a .java program using cmd, it seems I can only run it if there is a .class with the file.How do i create that .class file which corresponds with the .java program, without using jcreator which automatically creates it for me?Also whats the difference between typing:java *.javajavac ...
7893 byte By
SHIFTERa at 2007-10-3 9:22:52
Hi i have created a calculator and i am trying to add buttons like 1,2,3,4,5,6,7,8,9,0 like the microsoft calculator. The problem i am having is when adding a number in for example button one. If i press it more than once it will simply add it up.if i press btn1 four times total would be 4. I ...
HiThis seemed a bit wierd to me.The first code snippet makes sense but not the second one...This code snippet doesnt compile because of error "single-type import"import java.util.Iterator;import java.util.Vector; import mypkg.Vector;class t12 {}[t12.java: java.util.Vector is already defined in ...
How does javac decide what language it displays? It suddenly starts to display Chinese.
398 byte By
Ravillaa at 2007-10-3 9:26:28
Hi,I'm trying to call a method in class X from a jsp.I'm using weblogic. i.e jsp is deployed in weblogic.some methods in the class X are working fine, but some methods are throwing the error java.lang.nosuchmethoderror.kindly suggest some solution. regards,RVMessage was edited by: ...
I'm learning Java by myself using a book by Deitel and Deitel.I was doing this one://programa de sumaimport java.awt.*; //importar paquete java.awtimport java.applet.Applet;public class Addition extends java.applet.Applet {Label prompt; //solicta entrada al usuarioTextField input; //introducir ...
424 byte By
brad13a at 2007-10-3 9:51:20
import TurtleGraphics.StandardPen;public class test {public static void main(String args[]) {Standard pen=new StandardPen();pen.up();pen.move(25);pen.turn(90); pen.move(25);pen.down();}}IT SAYS THE FOLLOWING:package TurtleGraphics does not exist.*Someone please help me, i have to do homework, ...
1325 byte By
asefa at 2007-10-3 9:56:58
I have a method in a JSF backing bean that looks something like this: public void clickButton(ActionEvent ae) {// do the same thing every time } and since "ae" is not used, I get a warning from javac to that effect.I realize that I can do this: @SuppressWarnings("unused") public void ...
The J2SE 6 RC have an tool : javax.tools.JavaComplier. I can use it to compile the source code in memory( I implemented an JavaFileObject).But the compiler aways put the output file(.class) to file system. It;s not my want to do . I am writing an IDE ,I use javac to determine the code error ...
233 byte By
MacPCa at 2007-10-3 10:15:16
I am new to Eclipse, I found it very annoying that when I type the name of a method. a pop up will give me a list of all methods and it slows down my typing. I tried to turn this feature but where do I turn it off?MacPC
I'm new in Java, and I encountered a problemThe codes are belowimport javax.mail.*;import alertregister.*;import arutility.*;public class GetConnection{public final String STRMAILSERVER = "www.hi.com";public final String STRUSERNAME = "abc";public final String STRPASSWORD = "abc";private int ...
785 byte By
Bassmana at 2007-10-3 10:28:18
I am trying to compile code which was last compiled under JDK 1.2 (!). The code consistst of 2 packages - one is dependent upon the other.The low-level package (aka Utils) builds without error. However, the other lib generates an error when it reaches an import statement of the 1st package. See ...
public class Bank {Bank (){List Accounts = new LinkedList();Accounts.add(5000);Accounts.add(15000);int size = Accounts.size();System.out.println(size);}public void ShowAccounts (List list){int size = list.size();System.out.println("THere are :" + size + "elements in the list");}int ShowMenu ...
545 byte By
cinsaa at 2007-10-3 11:13:58
Hi -I am trying to compile my HelloApp.java program and I get this message: 'javac' is not recognized as an internal or external command, operable program or batch fileI know to go into the system and change my Environment Variable, but I'm not sure what to change it to. Right now I have it ...
8217 byte By
Fauxa at 2007-10-3 11:27:04
Example session:C:\Java\sandbox>lsJavaxTest.java JavaxTestInA.java JavaxTestInB.javaC:\Java\sandbox>head -n 999 *==> JavaxTest.java <==import java.util.List;import java.util.ArrayList;import java.io.File;import java.io.PrintWriter;import javax.tools.*;class JavaxTest{public static ...
1530 byte By
ardmorea at 2007-10-3 11:39:46
a lot of compiling errorsUnresolved compilation problems: The constructor GroupLayout(JPanel) is undefinedThe method setLayout(LayoutManager) in the type Container is not applicable for the arguments (GroupLayout)org.jdesktop.layout.GroupLayout.LEADING cannot be resolvedcode is ...
1367 byte By
klitwaka at 2007-10-3 11:49:22
I have been building an application using ant on jdk 1.4.2 for about 2.5 years. No problem. Today I'm getting the error during compilation[javac] java.lang.OutOfMemoryErrorI compiled just yesterday afternoon and did not get this error. Here's what I did differently.1. The application requires ...
I have some code that is dynamically generating Java classes and compiling them based on reflection against existing, but arbitrary, classes.My code is:com.sun.tools.javac.Main.compile(new String[] { "-d", classDirectory, src.getAbsolutePath() });And it works just fine under Orion.Under Tomcat, ...
236 byte By
a35176a at 2007-10-3 12:00:25
hi, hi..I am using java studio enterprise 8 to work on a program.I want to increase the java heap size by using flag like "-Xms256m"But the IDE can't recognize such command...know why?thanks...
hi All,i generated a parser using javacc parser generator and i want to use this parser for parsing java programs , fine till now everything is ok. i could generate the parser and it is parsing my code very well...and is also generating errors when it encounters them....but the problem is if it ...
Hi, i'm new to java. Can anybody tell me where can i find j2sdk 1.5 or latest version for download? cause i found jdk 1.5 but not j2sdk 1.5.. is there any difference b/w those two?
297 byte By
kechme at 2007-11-26 12:03:26
I recently installed JDK 5.0. I am unable to run javac under cmd. Whenever I compile, I get a "class not found" exception: com/sun/tools/Main. I can compile in TextPad and in the NetBeans IDE, but not the command line. I can also run java class files in cmd. Ideas on how to fix this?
7877 byte By
Psy at 2007-11-26 12:04:10
Hello. I'm new at all this, and am attempting to recreate a sample code out of my book (Teach Yourself XML in 24 Hours), and I keep getting an error. I appriciate any help.This is the Error that I get: DocumentPrinter is not abstract and does not override abstract method ...
i have installed java 1.4.2 in Mac and set the path to a location.likeexport JAVA_HOME={some path} in the .bashrc file But when ever i run the following command from the terminal$which javait shows the default java path instead of one put in .bashrc filepls help ...
6350 byte By
Cavitya at 2007-11-26 12:46:14
I am reading a book Java 6 Platform Revealed which describes using of Compiler API. Unfortunately Compiler API was changed during development of Mustang. This sample stopped to work although I renamed names of classes into new ones.I am able to compile the source of HelloWorld class, but I ...
720 byte By
yogsmaa at 2007-11-26 13:23:05
Hi AllI am doing exercise of book "Modern Compiler Implementation in JAVA" by Andrew Appel. It is first exercise and have to develop two functions maxargs to find the maximum number of arguments for print statements ..I am not able to understand the logic to use for recursive print ...
I'm trying to cross-compile to 1.3 using my 1.5 compiler on Linspire Linux. No matter what I do, I always get a class version of 49.0. I'm expecting an earlier class version to be produced.Compiler command:/swift/jdk1.5.0_09/bin/javac -verbose -extdirs '' -bootclasspath ...
317 byte By
chitalea at 2007-11-26 13:41:30
I am trying to fully understand the terms like type variable, type parameter and type argument as they apply to generics. Can anyone please give the exact definition and example of each of these terms. Also how these terms relate to the classes/interfaces in language model APIs of Java ...
Iam using English locale for standards and formats on Reginal options tab tab and system locale as polish on "Language for non-unicode programs on Advanced tab of Win 2003 machine.I have to retrieve a value using JVM , according to the system locale which is on advanced tab of win2003 or win ...
What is the most convenient way to specify multiple jar files on the classpath? If I have a lib directory with many jar files, it seems like I should be able to specify that directory on the classpath and all jars will be used. But, as I understand the documentaiton of the javac tool, you must ...
Hello, guys! I really need your help.I have a tusk in my college to make a compiller in COCO/R. You know, it is a compiller of compillers, the best of the best)Coco/r for java is a program writen on Java to make another program on ...