Import

Status
Nicht offen für weitere Antworten.

pat270881

Bekanntes Mitglied
Hello,

I develop java programs with eclipse and now I have to use some packages of symantec. I already downloaded the jar.zip and extracted it in the plugins folder of the eclipse directory. But can anybody explain me how I can use these packages in the eclipse environment? - What actions I have to do etc.?

Thanks in Advance.

Regards

patrick

PS: you could also answer in german
 

KSG9|sebastian

Top Contributor
hey pat,

are there anne .jar archives in the zip file? if yes, extract them to a folder.

then you have to add the extracted jar/zip file to your project.

open the properties of your project, go to "java build path", go to the "library"-tab and click "import external jars". then select the zip/jar file.

in your programm, you have to import the classes with

import this.is.the.class.in.the.jar.file

greetz seb
 

pat270881

Bekanntes Mitglied
Hello,

Thank you very much now it works. But unfortunately one more problem occured. I need to use JFrames, JTextArea, JScrollPane, etc. in my application. How and from where can I import the corresponding jar file to use this elements? - I search with google after that but I haven't found anything useful.

thanks

patrick
 

Wildcard

Top Contributor
You don't need a jar file, its just the Swing package:

Code:
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

you should think about using an IDE that organizes your imports for you. :wink:
 

pat270881

Bekanntes Mitglied
But the problem is that the application uses an import statement something like this:

import com.sun.java.swing.JFrame;

and when I compile the application an error occurs, that it is not possible to resolve this statement.

Have you got any advice?

patrick
 

Dreezard

Bekanntes Mitglied
Acutally I don't know what that import[...] is supposed to mean, but do as Wildcard said. You are also able to import every class from swing by writing
Code:
import javax.swing.*;
 
G

Gast

Gast
Hello,

The problem is that I do not know what java version this is. We got this application in the context of a lecture at school. The application has some mistakes and we have to fix these errors to get the application running again without problems. This application uses the previous mentioned package and I do not know from where I can get this package...?

The classes like com.sun.java.swing.JFrame does exists. I read about it here
http://euler.aero.iitb.ac.in/docs/P.../swing/JScrollPane.AccessibleJScrollPane.html

The problem is I do not know where I can get the corresponding package to use these classes. Have you got any further help?

patrick
 

Griffin

Bekanntes Mitglied
Normally eclipse detects where your java is and which version you have. The JFrame, J... classes are in the standard JRE. So you do not have to do anything else.

Code:
import javax.swing.JFrame;
import javax.swing.JButton;
If you cannot use these imports, check if eclipse has found a correct java version. (Window->Preferences->Java->Installed JREs)
Maybe just try the "search"-button.
 

Wildcard

Top Contributor
The application has some mistakes and we have to fix these errors to get the application running again without problems.
Maybe one of the Problems you have to fix :D
Try to remove those import statements and press ctrl+shift+o to organize your imports.
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
P Selenium Scriipt zeigt Fehler beim Import Allgemeine Java-Themen 3
F Reason: Missing Constraint: Import-Package: okhttp3.internal.http; version="0.0.0" Allgemeine Java-Themen 0
bueseb84 Fehler beim Import von Maven Dependencies aus lokalem artifactory Allgemeine Java-Themen 2
G Langtexte - Cellformat import in Excel Allgemeine Java-Themen 3
S Auto-Import generierte Java-Klasse ? Allgemeine Java-Themen 4
M import Fehler Allgemeine Java-Themen 2
S import meine.eigenes.import Allgemeine Java-Themen 6
S Problem mit CSV-Import in OpenOffice Allgemeine Java-Themen 8
J "unused"-Warnungen für import-Anweisungen unterdrücken Allgemeine Java-Themen 9
X CATIA Konstuktionsdaten Import- Darstellung Allgemeine Java-Themen 4
R import von Jasper (für SICStus Prolog) klappt nicht Allgemeine Java-Themen 2
T Class Not Found Exception beim import von Paket Allgemeine Java-Themen 2
K import- Anweisung fehlerhaft und andere Fehler (eclipse) Allgemeine Java-Themen 2
N import com.sun.tools.javac.Main; Allgemeine Java-Themen 1
Developer_X Import Java3D in der Eingabeaufforderung Allgemeine Java-Themen 12
D Hilfe bei ZIP-import benötigt Allgemeine Java-Themen 13
P Import Fehler Allgemeine Java-Themen 5
G Import von HTML-Dateien Allgemeine Java-Themen 5
E (einfaches) Problem mit import und package (export) Allgemeine Java-Themen 4
E Warum kein Import? Allgemeine Java-Themen 3
M Import findet das Projekt nicht. Allgemeine Java-Themen 5
@ [Eclipse] Fehlermeldung bei import-Anweisung Allgemeine Java-Themen 3
E import mittels Eclipse Allgemeine Java-Themen 3
R import Klassen Allgemeine Java-Themen 3
D Problem mit import von jdic Systemtray Allgemeine Java-Themen 2
V Verständnisproblem Eclipse BuildPath <-> Import Jar Fi Allgemeine Java-Themen 1
S Enums - statischer import Allgemeine Java-Themen 2
K Import von jar-Dateien Allgemeine Java-Themen 2
K bitte um hilfe bei file import Allgemeine Java-Themen 7
S import vs. extends Allgemeine Java-Themen 2
B Static Import: Syntaxfrage Allgemeine Java-Themen 2
G Classpath, Packages und Import Allgemeine Java-Themen 3

Ähnliche Java Themen

Neue Themen


Oben