Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem compiling and running java programs on Terminal

Hey guys:

I tried compiling my java program in Terminal (I used jEdit to write my code) but I received this:

vikram-babus-macbook-pro-2:java vikrambabu$ javac customerBill.java
customerBill.java:2: package corejava does not exist
import corejava.*;
^
...(i didn't include the other errors when compiling)

So I tried to play around with the core java package i installed (to my ability, im a beginner when it comes to coding :p) and I received this:

vikram-babus-macbook-pro-2:corejavabook vikrambabu$ jar xvf corejava.zip
java.io.FileNotFoundException: corejava.zip (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.tools.jar.Main.run(Main.java:238)
at sun.tools.jar.Main.main(Main.java:1149)

So as of now, i can't compile/run any more complicated java programs that require me to use input/output code that requires the core java package. If anyone could help with my problem, i would greatly appreciate it!

Sorry if this is the wrong thread for this question...I wasn't exactly where to ask this because it seems like there aren't that many questions for Java programming on a mac

Message was edited by: vkb008

Macbook Pro 13-inch, Mac OS X (10.6.4), Java Version 1.6.0_20

Posted on Jul 6, 2010 8:10 PM

Reply
4 replies

Problem compiling and running java programs on Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.