javac Questions
3
Problem
I'm revisiting a maven project that I haven't touched in at least a year. I'm pretty sure it was compiling successfully when I left it (there was still a working jar in the target director...
Leninist asked 26/1, 2018 at 13:24
3
I have a myfile.jar file.
I use jd-gui to decompile all *.class in a folder in myfile.jar. I get many *.java files in many folders
After fixing some code in some *.java, now I would like to recomp...
9
Solved
Out of curiosity, why are sometimes multiple Java .class files generated for a class after compilation? For example, my application has six classes. For one class, a total of 10 .class files has be...
10
Solved
The use case is simple. I got the source files that were created using Eclipse. So, there is a deep directory structure, where any Java class could be referring to another Java class in the same, c...
Calibrate asked 21/1, 2011 at 23:4
2
Solved
I've got three modules - a main one and two dependencies. All the modules are in the same folder level and are organised in folders ./main, ./first and ./second, correspondingly.
The second module ...
Cleodel asked 1/6, 2021 at 20:24
3
When I try to compile this code
import java.util.Optional;
public class GenericTest {
public static void main(String[] args) {
Optional.empty().map(o -> getStringClass(o)).orElse(String.cla...
Drone asked 25/5, 2019 at 11:18
4
Solved
I have an IntelliJ IDEA project but the compilation stops when it does encounter more than 100 errors and I would like to increase the limit in order to figure it out how much I do have to "refacto...
Equiponderate asked 1/8, 2012 at 13:44
2
Solved
I'm working on a Java library targeting JDK 8, and I'm building it in Gradle 5 using OpenJDK 11. In order to target JDK 8, I'm javac's --release option.
However, I'd also like my library to be JPM...
Hide asked 11/3, 2019 at 11:21
2
Solved
I have a project where I am responsible for fixing some errors and another developer is responsible for other errors. The number of errors is well over a hundred, and as I'm fixing my errors, her e...
2
Complementary to this question: tell-gradle-to-use-specific-java-version
How can I determine (verify) the java version actually used in gradle build?
After a successful ./gradlew build, I looked f...
3
Solved
I'm using Notepad++ to learn Java. I have it set it up to compile and run Java from the Run menu, only that I have been coding small exercises without external libraries, I know I have to use -clas...
1
Solved
Why doesn't javac produce a warning when using a deprecated constructor of a parameterized type?
Say you have a parameterized class with a deprecated constructor, and a User class that calls this constructor. In the example below, using the diamond operator, javac (version 11.0.11) does not pr...
4
Solved
I'm writing a makefile that compiles a .java file in a different directory, and then I want to run it, without changing directories. I want to do something along the lines of:
$(SQM_JAVA_TOOL_DONE...
12
Solved
I have installed java in my CentOS release 5.5 machine using the command yum install java. But I am unable to compile a class using javac.
Do I need to install any other package?
I have tried to...
Exobiology asked 23/3, 2011 at 15:33
3
Solved
I need to specify the path to javac in my gradle project. I can do this by adding the following to my build.gradle file:
options.forkOptions.executable = '/home/mj/lib/jdk1.7.0_80/bin/javac'
The...
3
Solved
I recently installed jdk10. I was doing normal code and it is not working.
Am I doing something wrong here?
Please see the code and Exception stacktrace.
As far as I understand there should be no ...
Victimize asked 16/6, 2018 at 5:49
2
Solved
In Java 9 Oracle improved String concatenation. Now "" + someBoolean turns into invokedynamic with StringConcatFabric.makeConcat as bootstrap method. That fabric generates classes at runtime that c...
Liveryman asked 3/11, 2019 at 14:45
3
Solved
Before, I had java 8. I recently installed java 11. I moved my path Java\jdk-11.0.7\bin to the top of my environment variables. When I do javac -version it gives me version 11. But when I do java -...
3
Solved
After upgrading a Maven project to Java 9 and adding a module descriptor, javac complains about a transitive dependency for an automatic module:
[WARNING] /.../src/main/java/module-info.java:[3,...
Shiksa asked 1/4, 2018 at 17:50
6
Solved
I am trying to compile (from the command line) a java package that imports another package of my own. I was following a tutorial online but it seems that I get an error when I try to compile the fi...
Tor asked 15/10, 2013 at 13:32
7
Solved
When I try to compile a java program with javac, I get an error:
The program 'javac' can be found in the following packages:
* default-jdk
* ecj
* gcj-4.6-jdk
* gcj-4.7-jdk
* openjdk-7-jdk
*...
10
Solved
I have a program that allows a user to type java code into a rich text box and then compile it using the java compiler. Whenever I try to compile the code that I have written I get an error that sa...
2
Solved
My project consists of some third party jar files, which was compiled in different version of java.
My project is using older version of java so i am getting UnsupportedClassVersionError while exe...
1
Solved
Let's say we surround a few bytecode instructions with a try catch block, and the local types change in between the try catch block range (A previously local register used for an int type is now us...
6
Solved
Though the same code was getting to compiled successfully with JDK 1.6 version, after upgrading to JDK 1.8 it won't compile, saying java cannot access ....class file ...as class file not found thou...
© 2022 - 2024 — McMap. All rights reserved.