简体   繁体   English

Debian中的java.io

[英]java.io in debian

i try to compile a java program but in the import section of the code fails: 我尝试编译一个Java程序,但是在代码的导入部分失败:

import java.net.*;
import java.io.*;
import java.util.*;
import java.text.*;
import java.awt.*;
//import java.awt.image.*;
import java.awt.event.*;
//import java.awt.image.renderable.*;
import javax.swing.*;
import javax.swing.border.*;
//import javax.swing.border.EtchedBorder;
//import javax.media.jai.*;
//import javax.media.jai.operator.*;
//import com.sun.media.jai.codec.*;
//import java.lang.reflect.*;

how can i fix the problem in a linux debian machine?. 我该如何在Linux Debian机器上解决此问题? Thanks 谢谢

Java Compiler Compiler Version 4.1d1 (Parser Generator) 
(type "javacc" with no arguments for help) 
Reading from file SAVE.JSigpac.java . . . 
org.javacc.parser.ParseException: Encountered " "import" "import "" at line 443, column 1. Was expecting: "PARSER_BEGIN" ... 
Detected 1 errors and 0 warnings.

javacc不适用于编译Java源文件,请使用javac

JavaCC is a framework if you want to build your own compiler and runtime for a language. 如果要构建自己的语言编译器和运行时,则JavaCC是一个框架。 Not for your compiling java-files. 不适用于您编译Java文件。

Being more specific, you're incorrectly using JavaCC , when what you probably want to use is javac . 更具体地说,当您可能想使用javac时,您错误地使用了JavaCC Give the latter a try and report back? 试一试后者并报告? If you don't have javac, you'll need to install an SDK (not just the JRE!) 如果没有javac,则需要安装SDK(而不仅仅是JRE!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM