File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes I have two questions. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "I have two questions." Watch "I have two questions." New topic

I have two questions.

larry lan

Joined: Mar 16, 2005
Posts: 2
I have two questions.
should I use chinese language in here?
because my english is very poor.
This code can be completed,but there is a problem in runtime.
I usualy ues Eclipse.This code's result in Eclipse is different than in commad(DOS,javac.exe)
In Eclipse ,the result is always whole number
In DOS,the result is always "radom" number
Who can tell me why is differenc.

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

1). This is an English website, so foreign language posts are removed. besides, I think your english is fine.

2). My guess would be that in DOS your classpath is different than what is in Eclipse. Do you have different versions of Java's SDK on your machine. One could be pointing to one version, while the other to the other version.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Figure out which JDK your eclipse project is using (right click on the project and there is an option somewhere with all the JDK jar files).

Search your machine for "java.exe" or "rt.jar".
I agree. Here's the link:
subject: I have two questions.
It's not a secret anymore!