Results 1 to 5 of 5
Thread: Little Help Plz
- 03-29-2008, 01:04 AM #1
Member
- Join Date
- Mar 2008
- Posts
- 1
- Rep Power
- 0
Little Help Plz
Can anyone tell me how to compile a .java file to a .class file with errors.. i have some problems. I know how to compile a .java file to a .class file but i need to compile one more .java to .class but i cant because i get some errors. I know the code is right but i don't know why i get the error. So i kindly ask... Does anyone know how to compile the .java to .class with the errors. Or some kind of program to do it or something. Your help is very appreciated. Thank you.
- 03-29-2008, 04:01 AM #2
Member
- Join Date
- Mar 2008
- Posts
- 2
- Rep Power
- 0
you can put all of your javaFiles(*.java) in one folder. we assume that whose name is aaa.then you can get all corresponding classFiles useing command: javac aaa\*.java.
Sorry,my english is poor.I give this example:
C:> dir
aaa\
C:> dir aaa
1.java 2.java 3.java 4.java ....
C:> javac aaa\*.java
C:> dir aaa
1.class 2.class 3.class 4.class ...
1.java 2.java 3.java 4.java ...
I hope you can solve your problem. ^-^
- 03-31-2008, 10:40 AM #3
I'm not sure if you can compile with errors. Is it a large program? If not, maybe you could paste the code here and we could take a look to see if we can fix the errors for you.
Did this post help you? Please
me! :cool:
- 03-31-2008, 11:42 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 04-01-2008, 02:33 AM #5
Member
- Join Date
- Feb 2008
- Location
- Oregon, USA
- Posts
- 49
- Rep Power
- 0
You can't compile with errors because when there's an error, the compiler couldn't possibly know what to convert it to, it's like trying to compile this:
you can't return an int when the return type is void, so an error is generated because there is nothing the compiler can do. I'd suggest fixing the errors because, no offense, the code is obviously wrong, unless you are using a deprecated API. Otherwise, like DonCash said, you can post your code and we'll fix it if we can.Java Code:public void getInt() { return number; }Last edited by Bluefox815; 04-01-2008 at 02:37 AM.


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks