简体   繁体   中英

I can't run a program on Blue J

My programs on Blue J compile correctly and when I want to run it, the "run button" is gone. It is replaced with these buttons:

-new A2_1()

-void main(String[] args)

-Open Editor .......(letters in red color)

-Compile .............(letters in red color)

-Inspect ..............(letters in red color)

-Remove .............(letters in red color)

************ It does that to all programs I am trying to run.********

A2_1 is just the class name of the program. I will say again: I can compile it but CANNOT RUN IT. I have no further technical experience with BlueJ to fix this problem.

If it helps:

-I have the current JDK. java version "1.8.0_11" Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

-I have OS X 10.9.5

This problem came after I changed something in my Mac. I was taking a programming class at the time and we were studying inheritance. And I needed programs to access other previous written programs in order to run. Upon request of the professor I changed something in my Mac that deals with folder locations. That is all I remember.

After you compiled the class:

  1. Right click on the class (on its icon)
  2. Click on void main(String args[])
  3. Click on Ok (because probably you don't need arguments for the main method)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM