Author Topic: java live errors nullpointer exception  (Read 2212 times)

Russ

  • Community Member
  • Posts: 55
  • Hero Points: 3
java live errors nullpointer exception
« on: August 09, 2012, 04:04:12 pm »
Ubuntu 64 bit - using vanilla config & loading the sample java project

going into build -> java options -> live errors and ticking the enable live errors box

I get the following output ..

Exception in thread "Thread-1" java.lang.NullPointerException
   at java.io.File.<init>(File.java:239)
   at RTECompiler.CompileCode(RTECompiler.java:36)

Normal build works, as does execute and debug. So I don't think
it's a setup problem (and I'm fairly sure the last time I looked it
got further than that)

Russ

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: java live errors nullpointer exception
« Reply #1 on: August 09, 2012, 04:19:12 pm »
Looks like it is failing creating the output directory that live errors uses for class files...can you tell me where your config is located (will be listed @ Help > About SlickEdit), and what version of Java you are using?

Russ

  • Community Member
  • Posts: 55
  • Hero Points: 3
Re: java live errors nullpointer exception
« Reply #2 on: August 09, 2012, 04:38:40 pm »
Hi Ryan,

I'm using "vs -sc ." so it's writing to a 17.0.1 folder in the current directory
(I can see it build an empty folder structure inside 17.0.1/java_rte_classes)

I'm using "/usr/lib/jvm/java-6-openjdk-amd64/" for the Path to JDK 6 setting
and I set LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server:

Cheers,
Russ

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: java live errors nullpointer exception
« Reply #3 on: August 09, 2012, 05:30:23 pm »
Well, 2 things.  First, is your SlickEdit 17.0.1 installed into a directory where you would need superuser permissions to create files/folders?  Something like /opt/.../?  I think if you were to do this and attempt to create your config inside the SlickEdit installation directory, you would have numerous problems before attempting to open a project (I tried this, and I did)...but I figured it was worth a shot.  If that is the case, can you re-try this with -sc pointing to a directory where your current user has full permissions?

Second, I did have problems on Ubuntu 10.0.4 64bit when trying to use /usr/lib/jvm/java-6-openjdk as the "Path to JDK 6" for live errors.  I did see it work once, but then I had some problems ever turning it on again.  It's my understanding that it's not exactly the same implementation of Java as the official binaries distributed by Oracle...and I had no problems using Java SE 1.6.0_33 64bit downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html .  Can you try downloading this version of Java, installing it, and using it for live errors?  Also, you should be able to unset LD_LIBRARY_PATH...you shouldn't have to do that.

Thanks.

Russ

  • Community Member
  • Posts: 55
  • Hero Points: 3
Re: java live errors nullpointer exception
« Reply #4 on: August 09, 2012, 09:51:07 pm »
I'm loading the sample project from the slickedit config folder (~/.slickedit/17.0.1/SampleProjects/java) it's under my home directory and the permissions looks fine.
Also I can build and execute the project.

I'll try using Oracle Java 1.6 to see if that fixes the problem

Russ

  • Community Member
  • Posts: 55
  • Hero Points: 3
Re: java live errors nullpointer exception
« Reply #5 on: August 09, 2012, 10:40:06 pm »
I'm running Xubuntu 12.04 amd64

I downloaded the jdk-6u33-linux-x64.bin file from
http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html

and followed these instructions
http://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6

and it's fine now!
thanks for your help!

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: java live errors nullpointer exception
« Reply #6 on: August 10, 2012, 02:15:33 pm »
Ok cool...you are quite welcome :).