Questions tagged [javac]

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.

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.

The compiler accepts source code conforming to the Java language specification (JLS) and produces bytecode conforming to the Java Virtual Machine Specification (JVMS). javac is itself written in Java. The compiler can also be invoked programmatically.

2467 questions
1
vote
1 answer

Getting an environment variable in a Java annotation processor

I'm trying to open an http socket in an annotation processor on Windows, and am getting the following stacktrace: java.net.SocketException: Unrecognized Windows Sockets error: 10106: create at java.net.Socket.createImpl(Socket.java:397) at…
1
vote
2 answers

Include jar file in source code and during compile

I have made my custom jar file and compiled it using path C:\Program Files\Java\jdk1.7.0_04\bin;%path% javac *.java jar cvf QLibrary.jar *.class Then I took that jar file and put it in the same directory where my Main.java is located Main.java is…
Quillion
  • 6,346
  • 11
  • 60
  • 97
1
vote
5 answers

Concurrency: Cache Coherence Issue or Compiler Optimization?

From my understanding, if Hardware supports Cache coherence on a multi-processor system, then writes to a shared variable will be visible to threads running on other processors. In order to test this, I wrote a simple program in Java and pThreads to…
vikky.rk
  • 3,989
  • 5
  • 29
  • 32
1
vote
2 answers

warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List

I am getting warning warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List [javac] listbox.getChildren().add(listaMenu); where listaMenu is declared as UISelectItems listaMenu = new…
Jacob
  • 14,463
  • 65
  • 207
  • 320
1
vote
1 answer

Autoconf Force Java compiler version and vendor

I'm using autoconf for a build. I'd like my configure script to check for presence of a Java Compiler and ensure that the version is atleast 1.6 and it is Oracle's Java Compilter. What do I need to put in my configure.ac script?
sharjeel
  • 5,825
  • 7
  • 34
  • 49
1
vote
3 answers

javac error inconvertible types java.lang.Double

I found very similar questions to mine here, but I cannot work my problem out with the other posts. Sorry for the double posting maybe... I am trying to run my code in my terminal but I am getting a javac error, even though my code seems to be fine…
Bipa
  • 189
  • 2
  • 3
  • 14
1
vote
1 answer

javac compile files from folder A to folder B ( linux )

I have a small java project. And i want to keep a structure in how the files are organized in my project folder. There are 3 folders: bin/, res/ and src/. In src are all source files. In res are some resources like textfiles to be printed are files…
a2r
  • 45
  • 5
1
vote
2 answers

executing java program from command line in windows fails

I'm trying to run a very simple one class "Hello World" program from the command line in Windows. The .java file is located at "C:\Users\UserName\Desktop\direcName". The package is deem and the class name is test. I can cd to the directory and…
1
vote
2 answers

JOGL program does not compile - javac with classpath

I want to run a HelloWorld JOGL programm on the commandline. I downloaded the .jars from jogamp.org and put the gluegen-rt.jar , jogl.all.jar , gluegen-java-src.zip , jogl-java-src.zip , gluegen-rt-natives-macosx-universal.jar ,…
Jonas Kemper
  • 3,745
  • 3
  • 14
  • 21
1
vote
0 answers

Transform position of point form one perspective into another

I'm trying to convert the position of a point which was filmed with a freely moving camera (local space) into the position in a image of the same scene (global space). The position of the point is given in local space and I need to calculate it in…
Averius
  • 165
  • 1
  • 2
  • 13
1
vote
2 answers

Exception in thread "main" error when trying to run a java program with objectdraw

Primer: I'm starting a Java class at UCSD next week and our textbook has us download a library called objectdraw.jar which we will be using for the first two chapters. I downloaded the library and placed it in a folder called java_libraries in my…
user1114264
1
vote
1 answer

UnsupportedClassVersionError on JDBC Java Tutorial

I am having a common issue the known UnsupportedClassVersionError, i am running the JDBC Tutorial of http://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html , using Ant Apache, which is already configurated. I am aware of the nature…
CarlosJavier
  • 1,005
  • 1
  • 16
  • 29
1
vote
2 answers

javac fork mode

I am working on a project and saw the following configuration with a comment in a properties file. # Forking just invokes the JVM externally, and doesn't exhibit any performance benefit. javac.fork.mode=no I am curious about what this means. After…
ZZZ
  • 3,574
  • 10
  • 34
  • 37
1
vote
3 answers

JCreator IDE: Program will compile but not run, works in command prompt

Recently purchased a new computer, trying to resume developing Java. One of the IDEs I use, JCreator, has started spitting out errors at me. I uninstalled and reinstalled Java a few times on the new machine to get everything working. I have a…
brandonsbarber
  • 384
  • 1
  • 3
  • 11
1
vote
5 answers

Can't correctly setup classpath

I'm trying to compile the following code: package week1; public class ThreeSum { public static int count(int[] a) { // count triples that sum to 0 int count = 0; for (int i = 0; i
4lex1v
  • 21,367
  • 6
  • 52
  • 86