Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Why to generate a Jar File / Library out of Eclipse
Why to generate a Jar File / Library out of Eclipse [message #1065017] Sun, 23 June 2013 12:43 Go to next message
Thomas Lahme is currently offline Thomas LahmeFriend
Messages: 5
Registered: May 2013
Junior Member
Hey Community,
Very Happy I love Eclipse, to generate my working Code out of it. But to give other People my code I should generate a Jar-File / Library. Very Happy Shocked The Problem is it will not work.
Evil or Very Mad I'm a Judas and a pig precher but I will use this Jar Entity to use this code in a NetBeans Project. Evil or Very Mad
Embarrassed New it can be that I'm be to silly or the System has a great Bug. Embarrassed

There the last Post is:

Das ist jetzt aber nicht wirklich die Library? Es ist eine einzige Klasse im globalen Package, was auf jeden Fall zu vermeiden ist. Außerdem ist es eine Java-Quelldatei und kein Bytecode (class-Datei). Benenne deine Packages nach dem Schema "organizationurl-right-to-left.project.structure", z.B. "de.mueller_bernd.paintapp.view" oder "de.uni-hamburg.satelliteview.model" und platziere darin deine Klassen.

Diese Klasse hat eine einzige Methode mit großem Buchstaben am Namensanfang namens "Test()", wobei auch das gegen die Java-Namenskonvention ist, die besagt, dass Methodennamen mit einem kleinen Buchstaben beginnen. Dann ist die Methode package private (ohne "public" access modifier). Falls sie nicht angeboten wird, ist das konsequent, da nur Klassen im gleichen Package package private-Methoden aufrufen dürfen.

Falls du mit NetBeans ein neues Projekt des Typs "Java > Java Class Library" erzeugst, erhälts du JARs, die keine Probleme bereiten. Dass NetBeans diese erzeugt, ist keine Voraussetzung (nur Komfort), mit anderen JARs, die den Richtlinien entsprechen, hatte ich noch nie Probleme, seien es Datenbanken wie HSQLDB, Derby oder zahlreiche andere Projekte.


And I give you the first try what I would have produce but still it will not work.
Re: Why to generate a Jar File / Library out of Eclipse [message #1065040 is a reply to message #1065017] Mon, 24 June 2013 03:30 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

In what way does it not work? Which wizard are you using? What error message or other indication are you getting?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Unable to install jBoss Tools
Next Topic:Get Plugins and Updates from Artifactory
Goto Forum:
  


Current Time: Fri Apr 19 21:38:49 GMT 2024

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

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

Back to the top