[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /home/kali/Desktop/shiroexploit/src/main/java/com/shiroexploit/gui/StartPane.java:[258,45] lambda expressions are not supported in -source 7 (use -source 8 or higher to enable lambda expressions) [ERROR] /home/kali/Desktop/shiroexploit/src/main/java/com/shiroexploit/gui/Console.java:[18,30] lambda expressions are not supported in -source 7 (use -source 8 or higher to enable lambda expressions) [ERROR] /home/kali/Desktop/shiroexploit/src/main/java/com/shiroexploit/server/BasicHTTPServer.java:[32,47] method references are not supported in -source 7
时间: 2023-06-13 16:08:32 浏览: 139
这是一个编译错误,提示你需要使用更高版本的 Java(至少是 Java 8)来支持 lambda 表达式和方法引用。你可以升级你的 JDK 版本,或者在编译时指定更高版本的源代码。你可以在 pom.xml 文件中添加以下配置来指定 Java 版本:
```xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
```
这将指定源代码和目标代码的版本都是 Java 8。你也可以根据需要更改版本号。
相关问题
ora-24344: success with compilation error
ORA-24344是Oracle数据库中的错误代码,表示编译成功但存在错误。这通常意味着在编译过程中发现了语法错误或其他问题,需要进一步检查和修复代码。建议查看相关日志和错误信息,以便更好地理解和解决问题。
cython recompile with -fPIC
To recompile a Cython module with the `-fPIC` flag, you can follow these steps:
1. Open your Cython source file (with the `.pyx` extension) in a text editor.
2. Add the following line at the top of your file to include the necessary Cython directives:
```python
# cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True
```
3. Next, compile your Cython module using the following command:
```
cython --cplus -3 -f -w --fast-fail your_module.pyx
```
Here, `your_module.pyx` should be replaced with the name of your Cython source file.
The options used in this command are as follows:
- `--cplus`: Generate C++ code instead of C code.
- `-3`: Enable Python 3 syntax.
- `-f`: Include the `-fPIC` flag during compilation.
- `-w`: Disable all warning messages.
- `--fast-fail`: Abort compilation on the first error encountered.
4. After compilation, you can build the shared object file (`.so`) using a C++ compiler. For example, if you have `g++` installed, you can use the following command:
```
g++ -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python3.8 -o your_module.so your_module.cpp
```
Make sure to replace `your_module.so` with the desired name for your shared object file.
Now you should have a recompiled Cython module with the `-fPIC` flag enabled.