271 byte By
jordanza at 2007-11-26 14:30:05
Sorry if this is posted somewhere else but it doesn't seem to be possible to search just the Java Compiler board...Why was the class file version incremented to 50 in Java 6? Now, if I compile with Java 6 I can't run in Java 5. Is there a way around this?
327 byte By
ace_84a at 2007-11-26 14:38:15
I am using Jbuilder 2005 and I need to create a application where I use generics. But once I create the class that implements the generics portion of the code, I get an error that says "generics are not supported in -source 1.2 (try -source 1.5 to enables generics)". Any one know what this ...
653 byte By
Szymika at 2007-11-26 14:44:20
Hi Everyone!I am looking for fast java compiler, best with embedded compilation. I would try to write application witch will be self-compiling to improve speed of showing GUI. So I would like to compile java source file or whole package with calling single fu nction instead of invoking new ...
Hello!in my Webapp I am trying to compile dynamically generated source files with the Compiler API:JavaCompiler compilerTool = ToolProvider.getSystemJavaCompiler(); StandardJavaFileManager manager = compilerTool.getStandardFileManager(null,null,null); //directory is the dir with the source ...
531 byte By
fan5389a at 2007-11-26 15:24:13
I am trying to compile these codes using jdk1.4.2_11. These codes compiled successfully with 1.3.1_17 but with 1.4.2_11, I am getting a compiler error with import IVServ and import ServeletIncompleteException statement below. Both classes are located in the same directory as the source code. Do ...
My main source of concern is how unellegant the code for handling gui events looks. At first Java came up with inner classes to support event handling, later it was anonymous inner classes. Hell, isn't it clearer writting :frame.addWindowListener(WindowClosing() );public void ...
This is not a cry for help. Rather, it is something that my coworker and I have been debating with no sane result.The question is: Why did Sun not code the javac-compiler as a pure Java-program (using bootstrap methods, of course - need to start somewhere)? After all, my coworker argues, this ...
on terminal, I was given 20 error messages...DemoVariables.java:11: cannot find symbolsymbol : variable sumlocation: class DemoVariablessum = value1 + value2;^DemoVariables.java:11: cannot find symbolsymbol : variable value1location: class DemoVariablessum = value1 + ...
WHEN I COMPILE I GET MANY PROBLEMS. HERE ARE MY PROBLEMS WHEN I COMPILEjavac: invalid flag: javac:Usage: javac <options> <source files>where possible options include:it says all thses things and thens saysexception in thread "main" java.lang.noclassdefFoundError: serverpress any key ...
Hi been having similar problem as some of the othersThis is the objective of my lesson: Develop a class to represents a human. The head, arms and legs should be properties of the human and should be represented by separate objects. All of your objects should have at least three properties and ...
543 byte By
LuckY7a at 2007-11-26 16:21:00
Hi,I have been using TextPad, and it has been working perfectly. I just recently installed Eclipse to try something new and I went back to TextPad today to run a script and I do not have the 'compile Java' button under tools anymore. I don't know how to compile my scripts in TextPad now. ...
Hi I have this simple methodpublic void test(int i,float f){i/f;// divide integer by float}Compile javac says that it is not statement .Modify the method to say thispublic void test(int i,float f){Math.sqrt(i/f);// divide integer by float and invoke sqrt fn using Math class}javac does not ...
391 byte By
Nibura at 2007-11-26 16:40:29
hi i have been programing in java for a while i know the basics but just moved to netbeans and found there is an "ant" function. can some on explain what ant is and how to implement it.... some good links i searched the forum and found no resultsed googled it and didnt really find out what it ...
Hi!I am using the new compiler api to compile dynamically generated classes.To get the compiler tool i call:JavaCompiler compilerTool = ToolProvider.getSystemJavaCompiler(); when I run this from eclipse with the integrated tomcat everyhing works fine but if I deploy the application on the ...
i got 1 error. but cant figure what is wrong after i compile. help me please. )=import java.util.Scanner;public class NumberCounter {public static void main(String [] args){ Scanner sc = new Scanner(System.in); final int MAX = 50; final int MIN = 0; int i = 0; int user; int counter=0; int [] ...
306 byte By
Ezhil_Ca at 2007-11-26 17:34:37
hi alli am a final year student doing project in java environment. in my project i want to convert a java program to an exe file.. i have seen some of the replies from the forum but i am not clear with that.. i need the steps in detail and the way how to do...?thanks in ...
i always have the same problem when i run my classes event if it runs on another computer:init:deps-jar:Compiling 1 source file to C:\Documents and Settings\Ha Thi Nga\exercite\build\classescompile-single:run-single:java.lang.NoClassDefFoundError: exercite/HomeWorkException in thread "main" ...
Hi, I'm fairly new to java, and I just screened for an internship at a local software development company.My first task is to create a collection, probably an array of directories and to use a hashmap to store 10 of the directories. And to read the 10 names from a file in your temp directory. ...
i have writen a simple code but in which during compilation i get error as <identifier> expectedpackage com.mycompany.messages.action;import java.io.IOException;import java.io.*;//import com.mycompany.message.bean.sambean;public class samaction{//BeanName obj = (BeanName) form // here ...
684 byte By
falc1a at 2007-11-26 17:51:26
I need to write some simple doclets and found some beginner code on the Sun website. The first line of the sample app is:import com.sun.javadoc.*;However, I get a compile error:C:\JavaDoc\Doclet\ListClass.java:1: package com.sun.javadoc does not existimport com.sun.javadoc.*;I found the ...
225 byte By
jajaa at 2007-11-26 18:04:38
hi, i wrote an application that meant for 5.0 and i need to make it backward compatible for 1.4 compiler is there any tool that does this conversion or i have to do it my self ?thanks Jaimon
401 byte By
vogte30a at 2007-11-26 18:13:35
I have to make a program that will take a sentence and make it plural. For example, "The cookie is good" would change to "The cookies are good". A box would have to pop up, where you could type the sentence in, then after you hit "ok", the sentence would change. I am new to writing code so I am ...
Hello, I have been browsing web for a while but haven't found any solution of my problem (or any similar problem at all :( ). Imagine following classes in "Experiment.java" file:public class Experiment {public static void main(String[] args) {A a = new A();}}class A {public A(int... a) ...
Is tools.jar portable across different platforms or is each tools.jar specific to an OS and architecture?Thanks!
Hi Iam a beginner working with ant...When I run the script I get the following error...let me know if you have any suggestions....build:[javac] Compiling 28 source files to C:\finaltrial\classes[javac] Note: Some input files use unchecked or unsafe operations.[javac] Note: Recompile with ...
779 byte By
03kJq14a at 2007-11-26 19:29:28
I don't know in which forum topic I'm supposed to post this but you guys can tell me.okay, here's the problem. I use Eclipse to program java applications.Where all of the buttons are supposed to be on the screen there are black squares. The buttons still work, they just look like black ...
Hi fellows. Recently I formatted my system & installed 'JDK 5.0 Update 11'. I suppose that is a full JDK, not just an update? Anyway, I'm using a program called DrJava to write some small programs, & using this new JDK, DrJava can't find the compiler! I suppose it is a file named ...
995 byte By
adamcuza at 2007-11-26 19:52:31
helloIm in the middle of writing code to generate a java class file containing the bytecode etc from the result of compiling a small programming language I created for a project, with the intent on getting the JVM to execute the generated class file. I've already created all the necessary data ...
522 byte By
BCBCBCa at 2007-11-26 20:08:42
hi all,i edit a jar file full of java applets for several years with jbuilder 5, the jdk path is still on jdk 1.3...a few days ago, i compiled the applets with eclipse and exported them as an jar file - eclipse jdk path is 1.5....the problem is:the with jbuilder (jdk 1.3) builded classes / jar ...
1373 byte By
adamcuza at 2007-11-26 20:17:13
Hello,I'm in the process of writing the bytes to generate a class file for a small programming language Ive developed for a project.I'm putting all the data from the various structures storing the class file data into a ByteBuffer, in the order specified in the Class File Format ...
76 byte By
MCA134a at 2007-11-26 20:43:10
Hello friends,Can any one list down the eclipse shout cut keys
I'm new to java, obviously. I downloaded the environment and the SDK. Now how do I compile and then run my work.
I would like to use the javax.tools API in jdk 6.0 to obtain the AST from a Java source file and then visit the AST. I'm pretty sure the class JavaCompiler and ClassTree can help me, but I have not been able to find any information (or examples) on how to do this, or work it out myself.If ...
4471 byte By
cstork9a at 2007-11-26 21:45:25
Like most C++ compilers, Java is not able to take full advantage of the SSE capabilities on the Intel/AMD CPUs. Other CPUs (PowerPC, Cell) have similar features. Future CPUs are likely to take advantage of these special instructions even more. The current difference in floating point ...
In order to make a jar file you have to run a command in the "jar utility." Which it sounded like was just the command prompt. Yeah it's not. if you try the command prompt will just say "jar" is not recognized as an internal or external command. I thought it was gonna say that but it was worth ...
It Just will not Compile!!! All of the files necessary to run my program are in the folder C:\Vocab\ and if i run this in the command prompt:java -cp C:\Vocab\MyJar.jar VocabMy application will run just fine but i guess when Excelsior Jet runs the EXACT same command (and when i say exact i mean ...
Dears,I'm deploying my target application on HP non-stop Tandem server which is using 1.4.1_5 and I can't upgrade for some technical issues and other application using this specific version.My development environment, I'm using jdk 1.4.2_12 on Windows.My question -as I couldn't find any ...
Hi,I have converted my DELPHI 5 program (which copies data from Lotus Notesdatabases into Oracle tables) into a Java program, developed in Eclipse 3.1.I am TOTALLY new to Java, but the program is now running inside of Eclipse.The PROBLEM IS that my DELPHI program can read a Lotus Notes dbof ...
536 byte By
pmarcha at 2007-11-26 23:37:10
I am generating the content of a .java file ( as a String ). I have been successful in using an extension of SimpleJavaFileObject to pass this String to the JavaCompiler.getTask() method. Playing with the options, I am able to control the compiler behavior, too. What I really want, though, is ...
435 byte By
byte008a at 2007-11-26 23:37:59
Dependency-checking works fine with javac (e.g. you only need to specify x.java as the argument and y.java, if referenced by x.java, is automatically compiled).However, when y.java is updated and there is already a file called y.class, y.java is not recompiled.Why is that? Wouldn't it be ...
769 byte By
L.a.r.sa at 2007-11-27 0:20:58
Hi,the java compiler javac of jdk1.6.0 suddenly stopped producing class files for all my .java files. I had compiled my main .java file, received 10 errors and fixed one of them. Then I compiled again and javac didn't give any error messages anymore and didn't produce class files for every ...
131 byte By
ray_coxa at 2007-11-27 0:36:38
Just a quick question: Does including debug information in class files degrade runtime performance in any way?Thanks!
Hi,This is the code i have so far my only question is why is my printf not working, it is returning an error. I need to print a (string, double) and a (string, double, int), but i dont know what to use. Thx Here is par of the code...System.out.print("What annual income do you require for ...
Hi everybody,I am trying to use the new compiler API in javax.tools but get a null reference back from ToolProvider.getSystemJavaCompiler().If I add tools.jar to the classpath the program runs fine. However, since my app is commerical and I don't think I can distribute tools.jar with it, this ...
277 byte By
Airwolfa at 2007-11-27 1:32:12
i'm using sun's javac, but several classmates told me Eclipse compiler generates small class files.i tried it on my last homework assignment, and Eclipse does generate small class files.do people also find this? what can we do to improve sun's compiler?
HiI am using the brand new javax.tools.JavaCompiler feature to compile on the fly some source code. However using the library under web start becomes cery tricky.1) The compiler tries to read the java.endorsed.dirs system property and it fails. The only solution I have found so far is to grant ...
Hi,From the answer to a previous post I understand that I must have a jdk installed to use the javax.tools API, which I need for a commercial application I am developing. Reading license texts makes my eyes bleed, but I think it says I am allowed to use the jdk to run my programs. With the ...
221 byte By
Shalakaa at 2007-11-27 1:59:30
hey yai'm doing an assignment and i am stuck on the lastcdr (lastcdr(quote (a b c)))the reply for this is meant to be (a b c)but i keep getting it(A B C)please help
159 byte By
digit-xa at 2007-11-27 2:01:28
Hi!Is it necessary to compile an originally 32 bit web application with 64 bit compiler to get it up and running onto 64 bit OS (Linux)thx
I have some class files that I open up in Note pad, but can not view them to know what they mean. What program do I use to view these .class in Java? Thanks.