eclipse questions

C

cmk128

Hi
I am new to eclipse, how can i do the followings?
1) In borland, i can create a execute jar, or a native execute (.exe),
in esclipse, i found the way to create an execute but not native exe,
how to?

2) Esclipse can export an execute jar but how to rebuild that execute
jar? i can export it again, but it is stupid because i have to press
several buttons. In jbuilder, after i press the "build" button, i can
make it.

3) If i open the .project file, it will not open the project. So how to
open a project which is not in your workspace?

thanks a lot!!
from Peter ([email protected])
 
I

Ingo R. Homann

Hi Peter,

Hi
I am new to eclipse, how can i do the followings?
1) In borland, i can create a execute jar, or a native execute (.exe),
in esclipse, i found the way to create an execute but not native exe,
how to?

Impossible. (Perhaps with some commercial/expensive plugin?)
2) Esclipse can export an execute jar but how to rebuild that execute
jar? i can export it again, but it is stupid because i have to press
several buttons. In jbuilder, after i press the "build" button, i can
make it.

Yes, that's stupid! The only way I know is to use the ant-integration of
Eclipse to achieve this. (I admit that setting this up/configuring this
is also hard to do...)
3) If i open the .project file, it will not open the project. So how to
open a project which is not in your workspace?

The same: impossible.

(Of course: AFAIK!)

Ciao,
Ingo
 
J

James McGill

Impossible. (Perhaps with some commercial/expensive plugin?)

Ant exec task, or custom task.

Eclipse's built-in runner can only run Java apps. "External Tools" can
run ant, and this is meant for integrating builders. Eclipse is not a
general-purpose shell. If you want to run a windows binary, double
click on it in an explorer window...

File -> Export -> Jar File -> "Export generated class files and
resources" is checked -> select your Main class

What could be easier?

Or the Ant way:


File->New->Project->Java Project->"Create project from existing source."

It's better to put your existing project in your workspace dir, and then
New Project as though you are creating it -- Eclipse will find it during
that dialog.

Eclipse really works quite differently from JBuilder, especially in
terms of how it manages the workspace. The view and the model of the
workspace are distinct.
 
T

Timo Stamm

2) Esclipse can export an execute jar but how to rebuild that execute
jar? i can export it again, but it is stupid because i have to press
several buttons.

You can create a "jardesc" file somewhere in the jar exporter.

If you right-click on the jardesc, the context menu will allow you to
rebuild the jar.

Or use ant to automatically build the jar, as Ingo suggests.


Timo
 
J

James McGill

Or use ant to automatically build the jar, as Ingo suggests.

It's much easier than that. Just right click on your project and export
jar.

Be sure to check "Export generated class files" and then you'll be able
to browse to the main Class to execute.

I'm not sure, but I think there also might be a way to save that
operation as an ant task when you do it from the wizard as well.
 
H

Hendrik Maryns

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(e-mail address removed) schreef:
Hi
I am new to eclipse, how can i do the followings?
1) In borland, i can create a execute jar, or a native execute (.exe),
in esclipse, i found the way to create an execute but not native exe,
how to?

2) Esclipse can export an execute jar but how to rebuild that execute
jar? i can export it again, but it is stupid because i have to press
several buttons. In jbuilder, after i press the "build" button, i can
make it.

3) If i open the .project file, it will not open the project. So how to
open a project which is not in your workspace?

Apart from the useful answers you already got, I want to add that there
is a dedicated newsgroup for Eclipse beginners:
news://news.eclipse.org:119/eclipse.newcomer

HTH, H.

- --
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFENiM3e+7xMGD3itQRAmt1AJ9rScXcuddUuEbyVLeZJxcwNfWDJACfZqNL
SmH5mblzzrwfUz0vzhdyhcE=
=4B1X
-----END PGP SIGNATURE-----
 
I

Ingo R. Homann

Hi,

James said:
It's much easier than that. Just right click on your project and export
jar.

Peter said that he knew this, but it is no option for him:

"i can export it again, but it is stupid because i have to press
several buttons. In jbuilder, after i press the "build" button, i can
make it."

BTW: As for your other post:
Ant exec task, or custom task.

Eclipse's built-in runner can only run Java apps....
If you want to run a windows binary,

I think, you misunderstood Peter here: He did not want to start an
executable from Eclispe, but he said that he wants to create an
executable from Eclipse. (And I think, that my answer to that
("Impossible...") is correct.)

Ciao,
Ingo
 
J

James McGill

Peter said that he knew this, but it is no option for him:

There's a language barrier at work, and I apologize for
misunderstanding.

You can save the JAR Description at the end of that wizard dialog, and
then all you have to do is click that description file, "Create Jar",
and voila. Not only "possible", but extremely easy, a single click, and
a confirmation to overwrite if the file exists.

Still, I prefer Ant. A newbie to Eclipse might need to be shown the
"Ant View".


What was the other thing you said was impossible?
 
J

James McGill

I think, you misunderstood Peter here: He did not want to start an
executable from Eclispe, but he said that he wants to create an
executable from Eclipse. (And I think, that my answer to that
("Impossible...") is correct.)

How does JBuilder do it? AOT or wrapper? I'm guessing it does nothing
more than wrap a call to the java runtime against a jar that's stored as
data in the executable file.

I know that JET does a good job of AOT.
I'm sure whatever AOT or runtime wrapper you'd care to use could be
deployed as an ant task.

Hopefully, this is one of the last steps in the OP's project, and by the
time he gets there he won't be an Eclipse newbie anymore :) Maybe he
will even see the questionable wisdom of making "exe's" from Java, and
will discover JWS, or merely realize that Windows can "run .jars"
without much help.
 
T

Timo Stamm

James said:
You can save the JAR Description at the end of that wizard dialog, and
then all you have to do is click that description file, "Create Jar",
and voila.

And how is this solution different from the one I posted 4 hours ago?
 
O

Oliver Wong

File -> Export -> Jar File -> "Export generated class files and
resources" is checked -> select your Main class

What could be easier?

As the OP said, "click build" would be easier.

- Oliver
 
J

James McGill

As the OP said, "click build" would be easier.

After the first time you tell Eclipse what you want, you just click the
JarDesc file and it's one step.

If the purpose of this thread is to praise the superiority of JBuilder
to Eclipse, I'm not going to respond to it. Been there, done that, and
(literally) have the t-shirt.
 
F

Ferenc Hechler

2) Esclipse can export an execute jar but how to rebuild that execute
jar? i can export it again, but it is stupid because i have to press
several buttons. In jbuilder, after i press the "build" button, i can
make it.

You can try the Fat-Jar Eclipse Plugin http://fjep.sourceforge.net/
It has a quick-build option (Right-Click on the java-project and select
the Menu Quick-Build.

The Eclipse exporter can not handle referenced jars. Fat-Jar supports
the one-jar http://one-jar.sourceforge.net/ option to include jars in jars.

Another option supported by jbuilder is to include only needed files
into the jar. The beta-preview of Fat-Jar includes Auto-Jar
http://autojar.sourceforge.net/


Best regards,

feri
 
C

cmk128

James McGill 寫é“:
After the first time you tell Eclipse what you want, you just click the
JarDesc file and it's one step.

If the purpose of this thread is to praise the superiority of JBuilder
to Eclipse, I'm not going to respond to it. Been there, done that, and
(literally) have the t-shirt.

Thanks james
the jar description file really work.
 
C

cmk128

therer is a "native executable builder" in jbuilder, it can create
native exe in windows platform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top