Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JNI error and JAVA exception(Problems during compilation of JAVA classes in Eclipse on 2nd PC )
JNI error and JAVA exception [message #1808497] Tue, 25 June 2019 18:41 Go to next message
Klaus Bangert is currently offline Klaus BangertFriend
Messages: 5
Registered: June 2019
Junior Member
Dear all,

I am a JAVA and ECLIPSE newcomer and operate two PCs (Windows 10) with identical ECLIPSE and JDK as installed with a difference of only one week via Ninite. The JAVA files (see attached snap shot)are all stored in the default workspace located in DROPBOX to alllow access via PC1 or PC2. Files all are executable on PC 1 but not on PC2, that generates the failure picture in Eclipse as attached. Meanwhile the Exclipse on PC2 is not able to compile a simple SRC like "Hello world" . I would guess settings in the biuld path or compiler vectors to libaries are wrong. Can I reset both of the Exclipes packages to default? Which parameters do I need to check and how can I understand their meening with the aim to fix rapidly as I want to understand JAVA programming and EXCIPSE as the tool only to the minimum extent. Thanks for any feedback to a stupid old fellow ;-).

Remark:
I have different folders in Dropbox and had quite severe problems to start it anyhow. The complex structure is a historical result
Re: JNI error and JAVA exception [message #1808510 is a reply to message #1808497] Wed, 26 June 2019 04:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
All of your projects have a red exclamation mark on the them. This indeed suggests there is a problem with the classpath. In both cases you are showing the IDE with the debug perspective selected (bug icon in upper right corner). In the Java perspective (icon with the J on in before the bug icon in the upper right), there is a Problems view (tab in the same area as the Console view) and there will you will error messages.

Also I notice that some of your Java files are not in a source folder; such files will have a J icon but the J will be a transparent outline of a J rather than like the ones in a source folder (where the root source folder has a little package icon in the upper left of the folder icon). Below a source folder, the folder structure must match the Java package declared in the Java file. So in your first picture, your Hallo.java is in a folder named Prog1Tools (under a source folder named src) so you must that it is in package Prog1Tools. Note that by convention package names should be lower case. In your second picture, it looks like you've compiled to produce byte code that will not run with Java 8. From the context menu of one of your Java projects using the last menu item, Properties, and use that to look at things like the Java Build Path and the Java Compiler properties. Or globally look at Window -> Preferences... -> Java -> Compiler and make sure that's set appropriately; likely have this set to something higher than Java 8 but only have a Java 8 JRE specified in the Java -> Installed JREs section of the preferences.

I'd suggest you Google for "eclipse java tutorial" and follow/read some of the basics...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Multiple Comment start and end tags are not working properly in Eclipse SQL Scrapbook Editor
Next Topic:Eclipse Installer error
Goto Forum:
  


Current Time: Fri Apr 26 01:40:08 GMT 2024

Powered by FUDForum. Page generated in 0.08039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top