| | |
what are "prejava" files?
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2006
Posts: 6
Reputation:
Solved Threads: 0
I'm a total nubie. I thought it would be useful to download the source for an applet and study the code. I picked a wonderful applet by Don Hatch:
http://www.plunk.org/~hatch/HyperbolicApplet/?size=513. The code in the jar file is all in .prejava files. My IDE (NetBeans) doesn't know what to do with these files. When I rename the extension of the main class source from .prejava to .java I get a lot of errors. Can anyone help me understand what .prejava files are and how to work with them?
Thanks.
http://www.plunk.org/~hatch/HyperbolicApplet/?size=513. The code in the jar file is all in .prejava files. My IDE (NetBeans) doesn't know what to do with these files. When I rename the extension of the main class source from .prejava to .java I get a lot of errors. Can anyone help me understand what .prejava files are and how to work with them?
Thanks.
•
•
Join Date: Apr 2006
Posts: 6
Reputation:
Solved Threads: 0
hooknc,
I tried what you suggested: I changed the extension on all 15 .prejava files to .java (before, I had only changed the extension on the source for the main class). I got the same errors as before. I noticed that Don has a file called "javacpp" (without an extension). Within my IDE I could read that file, which says that javacpp "Runs the C preprocessor (cpp) on .prejava files to create .java files". I tried to run javacpp at the DOS prompt to create the .java files, without success (DOS said it couldn't find an executable by that name). Any suggestions?
Thanks.
I tried what you suggested: I changed the extension on all 15 .prejava files to .java (before, I had only changed the extension on the source for the main class). I got the same errors as before. I noticed that Don has a file called "javacpp" (without an extension). Within my IDE I could read that file, which says that javacpp "Runs the C preprocessor (cpp) on .prejava files to create .java files". I tried to run javacpp at the DOS prompt to create the .java files, without success (DOS said it couldn't find an executable by that name). Any suggestions?
Thanks.
•
•
Join Date: Aug 2005
Posts: 216
Reputation:
Solved Threads: 8
He has built this applet using a linux machine and so all his scripts will only run on linux. So, trying to run the scripts on a windows machine most likely will not work.
Overall I'm not exactly sure what he is doing (I'm not very good with c or linux scripts). But, this is not how a majority of java developers do their development and is most likely not a good example to learn java or java applets.
If still want to try and fallow what he is doing... I would recommend decompiling his java files instead of reading the .prejava files. There are numerous free java decompilers if you do a search on google.
Overall I'm not exactly sure what he is doing (I'm not very good with c or linux scripts). But, this is not how a majority of java developers do their development and is most likely not a good example to learn java or java applets.
If still want to try and fallow what he is doing... I would recommend decompiling his java files instead of reading the .prejava files. There are numerous free java decompilers if you do a search on google.
•
•
Join Date: Apr 2006
Posts: 6
Reputation:
Solved Threads: 0
hooknc,
Thanks for the advice. I was attracted to Don Hatch's applet both because I am interested in the subject (hyperbolic tessellations), and because it seemed to be a very well designed program. Maybe I should concentrate on very simple things until I gain some experience with Java. I sent Don an email asking for his help; if he can't help me, maybe I'll try the decompiler approach. I greatly appreciate you taking the time to help me out. I think it would be nearly impossible for beginners to get started without the help of people like yourself.
Kind regards,
Steve
Thanks for the advice. I was attracted to Don Hatch's applet both because I am interested in the subject (hyperbolic tessellations), and because it seemed to be a very well designed program. Maybe I should concentrate on very simple things until I gain some experience with Java. I sent Don an email asking for his help; if he can't help me, maybe I'll try the decompiler approach. I greatly appreciate you taking the time to help me out. I think it would be nearly impossible for beginners to get started without the help of people like yourself.
Kind regards,
Steve
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
You can try DJ Java Decompiler: http://members.fortunecity.com/neshkov/dj.html or http://www.neshkov.com/
DJ Java Decompiler is Windows 95/98/Me/NT/2000/XP/2003/Vista decompiler and disassembler for Java that reconstructs the original source code from the compiled binary CLASS files (for example Java applets).
DJ Java Decompiler is Windows 95/98/Me/NT/2000/XP/2003/Vista decompiler and disassembler for Java that reconstructs the original source code from the compiled binary CLASS files (for example Java applets).
This thread is from 2006!
The whole point is java is platform independant. It is CORA. Compile to bytecode once, run (in the VM) anywhere
yeah it looks like crap
•
•
•
•
He has built this applet using a linux machine and so all his scripts will only run on linux. So, trying to run the scripts on a windows machine most likely will not work.
•
•
•
•
Overall I'm not exactly sure what he is doing (I'm not very good with c or linux scripts). But, this is not how a majority of java developers do their development and is most likely not a good example to learn java or java applets.
If i am helpful, please give me reputation points.
![]() |
Similar Threads
- WIN XP AND "SCRUBING" FILES (Windows NT / 2000 / XP)
- Cant upload dreamweaver "files folder" to site (Networking Hardware Configuration)
Other Threads in the Java Forum
- Previous Thread: Iterating through a collection
- Next Thread: documentation
| Thread Tools | Search this Thread |
-xlint android api applet application array arrays automation bi binary blackberry block bluetooth chat class classes client code compile compiler component database developmenthelp eclipse error exception fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui html ide image input integer j2me j2seprojects java javac javaprojects jetbrains jni jpanel jtable julia learningresources lego linux list login loop loops mac map method methods mobile myregfun netbeans newbie notdisplaying number online page print problem program programming project qt recursion scanner screen server set singleton size sms sort spamblocker sql string swing system template textfields threads time title tree tutorial-sample update variablebinding windows working xor






