Archived
This forum has been archived. Please start a new discussion on GitHub.
Eclipse Setup for Ice
Hi all,
I'm new to Eclipse, and I had a few teething issues to work out before I got Ice compiled and working. I was installing on Windows, but I think these comments apply to Linux as well.
Here is my quick and dirty Eclipse setup guide, which covers the issues I ran into.
1. Install ICE to your desired location.
2. Install the JDK (not the JRE) to your desired location (JRE does not have tools.jar, which Ant apparently needs).
3. Run Eclipse and add the installed JDK root folder (Windows->Preferences->Java->Installed JREs). Again, make sure this is a JDK folder not a JRE foler or tools.jar will not be found.
4. Go to Windows->Preferences->Java->Compiler and on the Compliances an Classfiles tab, set Compiler compliance level, Generated .class files compatability, and Source compatability all to 1.4. This is required or else the assert()s that Ice adds to the generated source code will not compile.
5. Create a new Java Project (File->New Project->Java Project). Click Next.
6. Give the new project a name, and then select "Create project at external location" and use the Browse button to locate the top level folder for the project.
For the Hello World demo, this would be something like C:\Ice-2.1.0\demoj\book\printer
For the file system demo, this would be something like C:\Ice-2.1.0\demoj\book\simple_filesystem
If you select the wrong directory (for example just C:\Ice-2.1.0\demoj), then the classpaths will not work and the Demo package will not be found.
7. Click Next in the New Project Wizard.
8. Under the Libraries tab, add db.jar and ice.jar using the Add External JARs button.
9. Click Finish to create the project.
10. To configure Javadoc, right click on the root project node in the Package Explorer and select Export... Then select Javadoc and accept the default folder (or change it if you prefer). Configure any other Javadoc settings you desire and click Finish. You can rebuild the Javadoc at any time using the Project->Generate Javadoc... menu item.
After getting things working, it all makes sense, but it was a bit confusing for a total Eclipse newbie. I hope this is helpful for others who are new to Eclipse.
Regards,
Ken
I'm new to Eclipse, and I had a few teething issues to work out before I got Ice compiled and working. I was installing on Windows, but I think these comments apply to Linux as well.
Here is my quick and dirty Eclipse setup guide, which covers the issues I ran into.
1. Install ICE to your desired location.
2. Install the JDK (not the JRE) to your desired location (JRE does not have tools.jar, which Ant apparently needs).
3. Run Eclipse and add the installed JDK root folder (Windows->Preferences->Java->Installed JREs). Again, make sure this is a JDK folder not a JRE foler or tools.jar will not be found.
4. Go to Windows->Preferences->Java->Compiler and on the Compliances an Classfiles tab, set Compiler compliance level, Generated .class files compatability, and Source compatability all to 1.4. This is required or else the assert()s that Ice adds to the generated source code will not compile.
5. Create a new Java Project (File->New Project->Java Project). Click Next.
6. Give the new project a name, and then select "Create project at external location" and use the Browse button to locate the top level folder for the project.
For the Hello World demo, this would be something like C:\Ice-2.1.0\demoj\book\printer
For the file system demo, this would be something like C:\Ice-2.1.0\demoj\book\simple_filesystem
If you select the wrong directory (for example just C:\Ice-2.1.0\demoj), then the classpaths will not work and the Demo package will not be found.
7. Click Next in the New Project Wizard.
8. Under the Libraries tab, add db.jar and ice.jar using the Add External JARs button.
9. Click Finish to create the project.
10. To configure Javadoc, right click on the root project node in the Package Explorer and select Export... Then select Javadoc and accept the default folder (or change it if you prefer). Configure any other Javadoc settings you desire and click Finish. You can rebuild the Javadoc at any time using the Project->Generate Javadoc... menu item.
After getting things working, it all makes sense, but it was a bit confusing for a total Eclipse newbie. I hope this is helpful for others who are new to Eclipse.
Regards,
Ken
0
Comments
-
Thanks for posting that info! I'm sure people will appreciate it.
Cheers,
Michi.0 -
Not that I'm aware of -- we haven't had any enquiries regarding Eclipse.
Cheers,
Michi.0 -
*.ice files and Eclipse
Hello,
at first thanks for your Eclipse guide!!
I've a question about Eclipse and *.ice files:
In Eclipse in the demoj\book\printer\Client.java,
Demo is underlined red cause of the Eclipse unknowing
file type Printer.ice with the module Demo.
Are there any possibilities to make Eclipse the *.ice files knowing?
Alternative:
What kind of editor is a good decision for ICE to get some useful hints like Eclipse ?
Thanks
surfer0 -
Eclipse configuration 2
Hello,
I’ve allowed me to extend the ICE-Eclipse configuration from Bytenik:
ICE Windows installation with Java and Eclipse:
1. Install Java jdk-1_5_0-windows-i586.exe
to c:\Programme\Java
Path configuration of the java bin directory
2. Install / Unzip Eclipse eclipse-SDK-I20040901-win32_3_1.zip
to c:\programme\eclipse
3. Run Eclipse and add the installed JDK root folder
(Windows->Preferences->Java->Installed JREs). Again, make sure this is a JDK
folder not a JRE foler or tools.jar will not be found.
4. Go to Windows->Preferences->Java->Compiler and on the Compliances an Classfiles tab,
set Compiler compliance level, Generated .class files compatability, and Source
compatability all to 1.4. This is required or else the assert()s that Ice adds to
the generated source code will not compile.
5. Install ICE Ice-2.1.1-VC71.msi
to default folder C:\ICE-2.1.1\
6. Creat the environment variables:
CLASSPATH
%ICEJ_HOME%\lib;%ICEJ_HOME%\lib\Ice.jar;%ICEJ_HOME%\lib\db.jar;classes;
C:\Programme\Java\jdk1.5.0
ICEJ_HOME
C:\Ice-2.1.1\
JAVA_HOME
C:\Programme\Java\jdk1.5.0
Path
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
C:\Programme\Java\jdk1.5.0\bin;%ICEJ_HOME%\bin;%PATH%;
C:\Ice-2.1.1\bin;C:\Programme\apache-ant-1.6.5\bin
7. Download the Apache 'Ant'
http://ftp.uni-erlangen.de/pub/mirrors/apache/ant/binaries/apache-ant-1.6.5-bin.zip
8. Add to Path from the environment variables:
c:\apache-ant-1.6.5\bin
9. Test it without Eclipse:
cmd> ->cd C:\ICE-2.1.1\demoj\book\printer\
C:\ICE-2.1.1\demoj\book\printer>ant
....
BUILD SUCCESSFUL
....
--> everything is ok !!!
10. Start the Server:
C:\ICE-2.1.1\demoj\book\printer>start java Server
11. Start the Client:
C:\ICE-2.1.1\demoj\book\printer>start java Client
type t
and in the Server console appears "Hello World!"
12. Eclipse:
Create a new Java Project (File->New Project->Java Project). Click Next.
13. Give the new project a name, and then select "Create project at external location"
and use the Browse button to locate the top level folder for the project.
For the Hello World demo, this would be something like C:\Ice-2.1.0\demoj\book\printer
For the file system demo, this would be something like C:\Ice-2.1.0\demoj\book\simple_filesystem
If you select the wrong directory (for example just C:\Ice-2.1.0\demoj), then the classpaths
will not work and the Demo package will not be found.
14. Click Next in the New Project Wizard.
15. Under the Libraries tab, add db.jar and ice.jar from C:\ice-2.2.2\lib using the Add External JARs button.
16. Click Finish to create the project.
17. To configure Javadoc, right click on the root project node in the Package Explorer and select Export... Then select
Javadoc and accept the default folder (or change it if you prefer). Configure any other Javadoc settings
you desire and click Finish. You can rebuild the Javadoc at any time using the Project->Generate Javadoc...
menu item.
Greetings
surfer0 -
Add to classpath
Hi Surfer,
To make the eclipse recognise files create by slice2java compiler, create jar files for the files created by the slice2java compiler, refresh the project (this is often neccessary) and make the eclipse dependent on your jar files (Right click your project --> properties -->javabuild path --->Libraries tab ---> add jar)
Creating the jar file can be done using the ant-tool.
Once you created the jar files add imports wherever necessary
or
If u dont want to create the jar files ,
Right click your project --> properties -->javabuild path ---> Sources -->Add folder (Here specify the generated source files folder)
Cheers,
Narendranath.K0