0

I accidentally deleted my .bashrc a few days ago. I attempted to recreate it, but unfortunately I still have some problems. A Java debugger that I used to use no longer works properly because it can't find this class:

aetherboard:Home shwangster$ java ucb.gjdb.GJDB
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jdi/VMDisconnectedException

For my class I am using Java 1.7. Here is my reconstructed .bash_profile for reference.

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/"                                                                                                                       
export CS61B_LIB_DIR="/Users/shwangster/Documents/gitrepos/cs61b/lib/*"          
export CLASSPATH="$CLASSPATH:$JAVA_HOME/bin/:$CS61B_LIB_DIR:./"       
alias tls="tmux ls"                                                              
alias tat="tmux attach -t"                                                       
alias tns="tmux new-session -s"

Confirmation that my .bash_profile works (albeit only after I source it)

aetherboard:Home shwangster$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/
twink_ml
  • 512
  • 3
  • 14
  • I guess I've used Java for a total of five times throughout my life, so consider my advice with a grain of salt, but I think you'd better ask your (CS 61B) TA for help. I suppose most of us have no knowledge about your institution-specific `ucb.gjdb.GJDB`, and we have very limited knowledge about your filesystem structure (only what you provided here). – 4ae1e1 Apr 11 '15 at 23:28

1 Answers1

1

hahaha! I got it to work. The answer to this question helped.

I needed to add tools.jar to my CLASSPATH. tools.jar was in /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/lib.

Here is my resulting .bashrc:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home"                                                                                                                        
export CS61B_LIB_DIR="/Users/shwangster/Documents/gitrepos/cs61b/lib/*"          
export CLASSPATH="$CLASSPATH:$JAVA_HOME/lib/*:$CS61B_LIB_DIR:./"                 

alias tls="tmux ls"                                                              
alias tat="tmux attach -t"                                                       
alias tns="tmux new-session -s" 
Community
  • 1
  • 1
twink_ml
  • 512
  • 3
  • 14