473,511 Members | 16,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Eclipse Question Mac and PC

122 New Member
I have a question for Eclipse user.
I have a PC at work and a Mac at home.
Do you know if these two operate differently.
ie for instance the Scanner seems to operate differently. printf is diffrent.
Maybe that is one reason I can not figure why my projects are not working right.

sandy
Apr 14 '07 #1
19 2425
r035198x
13,262 MVP
I have a question for Eclipse user.
I have a PC at work and a Mac at home.
Do you know if these two operate differently.
ie for instance the Scanner seems to operate differently. printf is diffrent.
Maybe that is one reason I can not figure why my projects are not working right.

sandy
How different are they? Are you getting different results with them?
Apr 14 '07 #2
sandyw
122 New Member
They will show up as errors unless you add a statement (value or code) to it.
Apr 14 '07 #3
JosAH
11,448 Recognized Expert MVP
They will show up as errors unless you add a statement (value or code) to it.
Do you have the same runtime version for Java installed on both of your machines?

kind regards,

Jos
Apr 14 '07 #4
sandyw
122 New Member
Do you have the same runtime version for Java installed on both of your machines?

kind regards,

Jos

On my Mac I have 3.2.2 at work I think I have the latest version. Will need to check on that one.
When I'm using the scanner on the mac it as if I want to: (ie Quick fix)
import Scanner (com.sun.tools.javac.v8.parser
import Scanner (sun.tools.jaa
Create class Scanner
Create interface scanner
Change to Signer (java Security
Create emun Scanner
rename in faile
add type parameter Scanner to fid Employee().

for printf
change to print(...)
add cast to System.out
rename in file

These are just a few things that seem to be diffrent.

thanks
sandy
Apr 15 '07 #5
JosAH
11,448 Recognized Expert MVP
On my Mac I have 3.2.2 at work I think I have the latest version. Will need to check on that one.
When I'm using the scanner on the mac it as if I want to: (ie Quick fix)
import Scanner (com.sun.tools.javac.v8.parser
import Scanner (sun.tools.jaa
Create class Scanner
Create interface scanner
Change to Signer (java Security
Create emun Scanner
rename in faile
add type parameter Scanner to fid Employee().

for printf
change to print(...)
add cast to System.out
rename in file

These are just a few things that seem to be diffrent.

thanks
sandy
I was talking about the version of your Java runtime, not Eclipe's version. btw,
you're not supposed to import anything from com.sun.tools.* yourself. The
Scanner class is in the package java.util.

I'm afraid it's an installation issue. The Scanner class is available starting at
Java 1.5. It seems that on your Mac Eclipse can't find it and accidentally finds
a Scanner class in the com.sun.tools.javac package and goed totally berzerk
afterwards. You're also not supposed to add the tools.jar to Eclipse's build
path. The tools.jar is for Sun's own JDK (development tools) which isn't needed
by Eclipse.

Are you, by any chance, developing JSPs? (just a guess)

kind regards,

Jos
Apr 15 '07 #6
sandyw
122 New Member
I was talking about the version of your Java runtime, not Eclipe's version. btw,
you're not supposed to import anything from com.sun.tools.* yourself. The
Scanner class is in the package java.util.

I'm afraid it's an installation issue. The Scanner class is available starting at
Java 1.5. It seems that on your Mac Eclipse can't find it and accidentally finds
a Scanner class in the com.sun.tools.javac package and goed totally berzerk
afterwards. You're also not supposed to add the tools.jar to Eclipse's build
path. The tools.jar is for Sun's own JDK (development tools) which isn't needed
by Eclipse.

Are you, by any chance, developing JSPs? (just a guess)

kind regards,

Jos
Hi Jos:
I did a search on my mac for Java Run time, There was no Java Run time listed. also I don't think I'm develping JSP
When I'm use eclipe I click on New Projects. I select Java
Then double click Java Project. I click the next button.
Type in a Project Name (Employee).
Click the Finish button.

When Im in the Project Window
Under the JRE I'm using the default which is JRE Current jvm 1.4.2
thanks
Sandy
Apr 15 '07 #7
r035198x
13,262 MVP
Hi Jos:
I did a search on my mac for Java Run time, There was no Java Run time listed. also I don't think I'm develping JSP
When I'm use eclipe I click on New Projects. I select Java
Then double click Java Project. I click the next button.
Type in a Project Name (Employee).
Click the Finish button.

When Im in the Project Window
Under the JRE I'm using the default which is JRE Current jvm 1.4.2
thanks
Sandy
Yep, Like Jos said, you will need 1.5 for the java.util.Scanner to work.
Apr 16 '07 #8
JosAH
11,448 Recognized Expert MVP
When Im in the Project Window
Under the JRE I'm using the default which is JRE Current jvm 1.4.2
thanks
Sandy
Carefully reread my reply #6 again. Your PC and you Mac run different Java
versions. You need at least version 1.5 (you've got that installed on your PC)
but your Mac has version 1.4.2. installed which doesn't have a Scanner class.

But worse is that Eclipse on your Mac has a wrong builder path, i.e. it can
find *another* Scanner thing which actually is part of Sun's tools.jar. Eclipse
is not supposed to find that one because it contains packages and classes
that are not for public use. You should remove that tools.jar from your build path.

kind regards,

Jos
Apr 16 '07 #9
sandyw
122 New Member
Thanks Jos the info


Where do I find the tools.jar. Will it be located in the plug in folder or do I have to find it in the Pref section in Eclipse.

Sandy,
PS
Apr 17 '07 #10
JosAH
11,448 Recognized Expert MVP
Thanks Jos the info


Where do I find the tools.jar. Will it be located in the plug in folder or do I have to find it in the Pref section in Eclipse.

Sandy,
PS
Select your project then go to your menu bar and select:
Project>Properties>Java Build Path. Then select the "libraries" tab and see
if that tools.jar is there; if it is, remove it.

kind regards,

Jos
Apr 18 '07 #11
sandyw
122 New Member
Thanks Jos I will look into that one.

sandy
Apr 18 '07 #12
sandyw
122 New Member
Select your project then go to your menu bar and select:
Project>Properties>Java Build Path. Then select the "libraries" tab and see
if that tools.jar is there; if it is, remove it.

kind regards,

Jos
Never did find tool.jar in the libraries. There was on item in the library.
and I open it to see what was in it. no listing of tools.jar.
Sorry I do not have the name of that file.
Should I just delete it anyways. On my PC there is no listing at in the library.

thanks
Sandyw
Apr 19 '07 #13
JosAH
11,448 Recognized Expert MVP
Never did find tool.jar in the libraries. There was on item in the library.
and I open it to see what was in it. no listing of tools.jar.
Sorry I do not have the name of that file.
Should I just delete it anyways. On my PC there is no listing at in the library.

thanks
Sandyw
I think (just a guess) that you fell in a silly Sun trap: when you just install
a JRE (Java Runtime Environment) you get one JRE/lib directory on your
machine. When you install a JDK however (Java Development Kit) you get
*two* JREs, one for you and one for internal use. The JDK also has another
/lib subdirectory which contains the tools.jar file.

Don't remove anything for now but also don't import any class coming from
the com.sun.* packages. Not even when Eclipse suggests to do so.

I can't give any more detailed help without scrutinizing your installation.

kind regards,

Jos
Apr 19 '07 #14
sandyw
122 New Member
I think (just a guess) that you fell in a silly Sun trap: when you just install
a JRE (Java Runtime Environment) you get one JRE/lib directory on your
machine. When you install a JDK however (Java Development Kit) you get
*two* JREs, one for you and one for internal use. The JDK also has another
/lib subdirectory which contains the tools.jar file.

Don't remove anything for now but also don't import any class coming from
the com.sun.* packages. Not even when Eclipse suggests to do so.

I can't give any more detailed help without scrutinizing your installation.

kind regards,

Jos
Thanks Jos
I just going uninstall it and find another version where I have control over it.
Thanks again for the time you have given me. We let you know what the out come is.
sandyw
Apr 19 '07 #15
sandyw
122 New Member
I think (just a guess) that you fell in a silly Sun trap: when you just install
a JRE (Java Runtime Environment) you get one JRE/lib directory on your
machine. When you install a JDK however (Java Development Kit) you get
*two* JREs, one for you and one for internal use. The JDK also has another
/lib subdirectory which contains the tools.jar file.

Don't remove anything for now but also don't import any class coming from
the com.sun.* packages. Not even when Eclipse suggests to do so.

I can't give any more detailed help without scrutinizing your installation.

kind regards,

Jos
Well I end up re formatting my Mac. I also found out that the problems is with the mac when it load updates for java because I installed Eclipse and tried to and it do not work it gave a window list errors. I then updated the system and tried again to run Eclipse, and I got a copy of errors on my project, mostly the scanner error.
I need to goto Eclipse website to see if there is away around this.

thanks again Jos
Sandyw
Apr 25 '07 #16
JosAH
11,448 Recognized Expert MVP
Fire up a shell and type "java -version". If you see a 1.4.x version it's not
Eclipse to blame. You need version 1.5 or later for the Scanner class.
Eclipse is just an IDE and can deal with several Java versions.

kind regards,

Jos
Apr 25 '07 #17
sandyw
122 New Member
Fire up a shell and type "java -version". If you see a 1.4.x version it's not
Eclipse to blame. You need version 1.5 or later for the Scanner class.
Eclipse is just an IDE and can deal with several Java versions.

kind regards,

Jos
I alway thought it was Eclipse that's way I did a reformat for because you gave me a clue it wasn't and I was hoping that when I did a reformat the problem would not appear. I will look into your suggestion.
Thanks Jos for the help and looking forward for more help either on this site or the other one.
Sandyw or sandyR
Apr 25 '07 #18
beatTheDevil
16 New Member
Sandy, your problem may have something to do with the fact that Apple, being somewhat stubborn and stingy with the implementation details of their operating system, doesn't allow Sun to write Java for the Mac. They write their own version and install it on their computers.

At the moment, only Java 1.5.x is available for Mac users. It looks like you need to upgrade from 1.4.2, so go to Apple's website, not Sun's or Eclipse's, and search for a Java download.

Hope that helps!
Apr 27 '07 #19
sandyw
122 New Member
Sandy, your problem may have something to do with the fact that Apple, being somewhat stubborn and stingy with the implementation details of their operating system, doesn't allow Sun to write Java for the Mac. They write their own version and install it on their computers.

At the moment, only Java 1.5.x is available for Mac users. It looks like you need to upgrade from 1.4.2, so go to Apple's website, not Sun's or Eclipse's, and search for a Java download.

Hope that helps!
thanks for the tip. Will look into it. I think I have that version

Sandyw
Apr 27 '07 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

0
5580
by: Donovan | last post by:
Hello. I am interested in learning about and using the Eclipse framework and Java -- both of which are new to me. I have prior programming experience with VB.NET and c#.NET; but not Java. As...
4
2192
by: junee | last post by:
I tried to develop php on eclipse installed are prerequisites but it didn't work help me, if any one experienced with it succeeded. it is 0.7 build help plz
16
3980
by: Amir Michail | last post by:
Hi, It seems to me that measuring productivity in a programming language must take into account available tools and libraries. Eclipse for example provides such an amazing IDE for java that it...
0
1974
by: Husey | last post by:
Hi, I am trying to create a very simple EJB project which requires me to create a new jboss configuration in Eclipse. I keep getting the error message "An error has occurred. See error log for...
5
3314
by: chenhong | last post by:
Is there a way to highlight variable in vs2005 like what eclipse do?
16
10738
by: Ananthu | last post by:
Hi I dont know how to connect mysql with ECLIPSE in RCP application. Please send me the sample code of connecting mysql sever with ECLIPSE in RCP application. Coding Part: RCP Application...
15
3663
by: Ramon F Herrera | last post by:
I have been using Eclipse for a few weeks, and IMO there is no better IDE. Since my experience has been so productive -and hence satisfactory- in Java, I would like to use the same IDE...
0
1361
by: Pesho318i | last post by:
hello, I'm writing in the Java forum, because I believe here I can find ppl comfortable with Eclipse. I'd like to install the PLDT plugin for Eclipse, but always run into compatibility...
7
4494
by: R.A.M. | last post by:
Hello, I have started learning PHP5. I would like to programme in Windows XP and Fedora Linux. I have found two IDEs for PHP (if I understood correctly): - Eclipse PDT, - EasyEclipse for PHP....
3
6749
by: ravit | last post by:
Hello All, I am trying to execute an application that is developed using eclipse libraries. Jface, SWT , etc. While I execute the application , i have received an exception which I am unable...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.