简体   繁体   中英

java.io in debian

i try to compile a java program but in the import section of the code fails:

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?. 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. Not for your compiling java-files.

Being more specific, you're incorrectly using JavaCC , when what you probably want to use is javac . 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!)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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