javac is the primary Java compiler, included in the Java Development Kit (JDK) from Sun Microsystems (now Oracle), and also in versions from other vendors.
0
votes
0answers
25 views
Find location of .class file from “import string”
Imagine I have a file that contains the following import statement:
import a.b.c.D;
We can assume this class (a.b.c.D) has already been compiled. How can I find (programmatically) the location of ...
2
votes
1answer
19 views
Javac error when creating GCM demo app (Google App Engine Java/Windows 7)
I'm trying to create a GCM Demo Application for Android on Windows 7 following the "official" tutorial (http://developer.android.com/google/gcm/demo.html).
In particular, I am trying to create a ...
0
votes
2answers
37 views
Error while oprating javac -d: invalid flag? If I correct it, another package-not-found error appeared instead
I'm a newbie in Java EE. And I was following the steps of the book Head First Servlets and JSP to create a simple web application.
I wrote a simple servlet in Java. Now, I am planning to compile it ...
0
votes
1answer
12 views
Ant script fails to find javac compiler
I want to build my project in Eclipse using Ant. When running the XML script, I get the following error:
BUILD FAILED
C:\thesis\100GreatP\eclipse_ws\test\build.xml:82: Unable to find a javac ...
0
votes
2answers
40 views
importing ant build.xml to eclipse says “javac” task not found in target “compile”
I have jdk 6 installed on Mac OSX Mountain Lion and I am able to create new java projects directly from eclipse.
I am trying to modify the code written by alex holmes at json-mapreduce ...
1
vote
1answer
12 views
How to suppress bootstrap class path warning when targetting Java 6 and using JDK 7 compiler
Our open source app targets the Java 6 platform so we compile with the -source 1.6 and -target 1.6 options but when using JDK 7, we get this warning message, e.g.
For example:
$ javac -source 1.6 ...
0
votes
1answer
23 views
Compiling Junit on windows 8 command line error
I created a Junit test case using Eclipse and it works fine. I am trying to compile it using command line but can't seem to do it.
I was able to "compile" it fine..but now when I try to run it I get ...
10
votes
2answers
109 views
Equality comparison of `boolean` and `Object` allowed?
The following code
public class TestComparison {
public static void main(String[] args) throws Exception {
boolean b = true;
Object o = new Boolean(true);
...
0
votes
0answers
11 views
Netbeans project compilation traditionally
I wrote a java application in netbeans. contains simpke math function like simple interest, addition etc. I previously had set java to compile using javac which i do in cmd.Now i go to netbeans ...
0
votes
1answer
13 views
Ant: javac task: path versus pathelement
I would like to know the difference between the
following javac Ant tasks.
<!-- Task 1 -->
<javac destdir="${build}" classpath="classes.jar" debug="on">
<src path="${src}"/>
...
6
votes
2answers
173 views
Java class constant pool duplicates?
I have decompiled a class with javap and I'm seeing some duplicates in the Constant Pool section, like this:
#19 = Class #350 // java/lang/StringBuilder
... Some other class ...
3
votes
1answer
52 views
adding methods to existing java class and recompile with my project
I'm trying to do something that should be pretty easy but some how I keep failing...
the idea is to take existing java class from java repository (in our case java sun)
modify it a bit.. recompile ...
0
votes
1answer
44 views
Unable to compile MaxTemperatureMapper.java for Hadoop examples: package org.apache.hadoop.mapreduce does not exist
I have been trying for quite a while to compile the first example from the book on my school's lab computer, playing with the HADOOP_CLASSPATH variable and the -classpath flag with javac, to no avail.
...
-1
votes
0answers
62 views
'javac' is not recognized as an internal or external command, operable program or batch file
I get the below error while executing batch file from command prompt, though I have already set the environment variable path for 'javac'.
'javac' is recognized when I type only 'javac' in the command ...
0
votes
2answers
53 views
package java.nio.file does not exist
I'm working out how to compile java from command line at the moment. Here's what I've got:
Here's what I've got:
/myjava/compile.cmd
/myjava/src/a_pack/HelloWorld.java
/myjava/src/b_pack/Inner.java
...