Rails Lib files loading error - file

In my project I'm using some custom liquid tags and I have created a folder called 'Liquid' inside my 'lib' directory and there I have a liquid module called helpers,
module Liquid::Helpers
end
So the project tree is as follows
Root
--> lib
--> Liquid
And I'm trying to register my tags in my environment.rb file
Liquid::Template.register_filter(Liquid::Helpers)
To load my lib files when the server starts, I'm trying this in application.rb
config.autoload_paths << File.join(Rails.root.to_s, "lib")
But I'm getting the following error
': uninitialized constant Liquid::Helpers (NameError)
What am i missing here, can someone help me, thanks in advance
cheers
sameera
Update -
I'm on Rails3 with Ubuntu. Following is my full error code
`<top (required)>': uninitialized constant Liquid::Helpers (NameError)
from <project path>/config.ru:3:in `require'
from <project path>/config.ru:3:in `block in <main>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from <project path>/config.ru:1:in `new'
from <project path>/config.ru:1:in `<main>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:35:in `eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:35:in `parse_file'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:162:in `app'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:248:in `wrapped_app'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:213:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands/server.rb:65:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:30:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `tap'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

I'm not a high enough level yet to ask clarifying questions, but my first piece of advice is to clarify your question in the following way (consider this solid advice for posting any question anywhere):
list the versions of rails, liquid, gems, ruby, etc that you are using (especially the rails version)
copy-paste the entire output of your terminal where the error message is arising. While you may not understand that output, it is useful for someone else to debug your situation. Copy-pasting from the terminal (including the command you ran) leaves zero question
provide better info on your file structure. Once again a terminal copy-paste is perfect. From your rails root, you could run the command find lib (unless you're on Windows, in which case you can't use find and it's time to consider switching to OSX or ubuntu).
Here's an example of a terminal copy-paste that includes all that information:
dhcp-c-200:foo luke$ rails -v && gem -v && ruby -v && gem list | grep liquid
Rails 2.3.5
1.3.5
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
dhcp-c-200:foo luke$ find lib
lib
lib/Liquid
lib/Liquid/some_module_file.rb
lib/tasks
dhcp-c-200:foo luke$ script/server
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Liquid::Template (NameError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
from /Users/luke/Sites/foo/config/environment.rb:43
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
dhcp-c-200:foo luke$ cat lib/Liquid/some_module_file.rb
module Liquid
end
module Liquid::Foo
enddhcp-c-200:foo luke$
... all in one terminal.

Related

How to compile WPF IronPython project to exe

I've seen many questions in this forum which are questions of how to fix a problems of compiling IronPython WPF to exe.
But the problem is that I haven't seen any guide Step-by-step of how to compile my project.
I understood it includes using the clr module.
I've 6 files:
Window.py, Window.xaml.
Window1.py, Window1.xaml.
Window2.py, Window2.xaml.
That's all the files
Thanks
((irrelevant: Update- 3 hours later:
I've started using SharpDevelop and when I run it through the software itself it can be run. However , when I try to run this through the .exe file in the project's folder it doesn't work... ))
Update 2 - SharpDevelop created an exe file which works but the problem is it didn't encrypt my xaml to dll ..
Have you tried the script from this thread: Ironpython 2.6 .py -> .exe
Supposedly it includes wpf support:
#!/usr/bin/env python
# CompileToStandalone, a Python to .NET ILR compiler which produces standalone binaries
# (C) 2012 Niall Douglas http://www.nedproductions.biz/
# Created: March 2012
import modulefinder, sys, os, subprocess, _winreg
if len(sys.argv)<2:
print("Usage: CompileEverythingToILR.py <source py> [-outdir=<dest dir>]")
sys.exit(0)
if sys.platform=="cli":
print("ERROR: IronPython's ModuleFinder currently doesn't work, so run me under CPython please")
sys.exit(1)
sourcepath=sys.argv[1]
destpath=sys.argv[2][8:] if len(sys.argv)==3 else os.path.dirname(sys.argv[0])
ironpythonpath=None
try:
try:
keyh=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\IronPython\\2.7\\InstallPath")
ironpythonpath=_winreg.QueryValue(keyh, None)
except Exception as e:
try:
keyh=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\IronPython\\2.7\\InstallPath")
ironpythonpath=_winreg.QueryValue(keyh, "")
except Exception as e:
pass
finally:
if ironpythonpath is not None:
_winreg.CloseKey(keyh)
print("IronPython found at "+ironpythonpath)
else:
raise Exception("Cannot find IronPython in the registry")
# What we do now is to load the python source but against the customised IronPython runtime
# library which has been hacked to work with IronPython. This spits out the right set of
# modules mostly, but we include the main python's site-packages in order to resolve any
# third party packages
print("Scanning '"+sourcepath+"' for dependencies and outputting into '"+destpath+"' ...")
searchpaths=[".", ironpythonpath+os.sep+"Lib"]
searchpaths+=[x for x in sys.path if 'site-packages' in x]
finder=modulefinder.ModuleFinder(searchpaths)
finder.run_script(sourcepath)
print(finder.report())
modules=[]
badmodules=finder.badmodules.keys()
for name, mod in finder.modules.iteritems():
path=mod.__file__
# Ignore internal modules
if path is None: continue
# Ignore DLL internal modules
#if '\\DLLs\\' in path: continue
# Watch out for C modules
if os.path.splitext(path)[1]=='.pyd':
print("WARNING: I don't support handling C modules at '"+path+"'")
badmodules.append(name)
continue
modules.append((name, os.path.abspath(path)))
modules.sort()
print("Modules not imported due to not found, error or being a C module:")
print("\n".join(badmodules))
raw_input("\nPress Return if you are happy with these missing modules ...")
with open(destpath+os.sep+"files.txt", "w") as oh:
oh.writelines([x[1]+'\n' for x in modules])
cmd='ipy64 '+destpath+os.sep+'pyc.py /main:"'+os.path.abspath(sourcepath)+'" /out:'+os.path.splitext(os.path.basename(sourcepath))[0]+' /target:exe /standalone /platform:x86 /files:'+destpath+os.sep+'files.txt'
print(cmd)
cwd=os.getcwd()
try:
os.chdir(destpath)
retcode=subprocess.call(cmd, shell=True)
finally:
os.chdir(cwd)
sys.exit(retcode)

Cocoapods: invalid byte sequence in US-ASCII

Doing step by step as shown here:
http://www.raywenderlich.com/12139/introduction-to-cocoapods
I get an error when running pod install in different projects:
### Stack
```
CocoaPods : 0.15.2
Ruby : ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
RubyGems : 1.8.24
Host : Mac OS X 10.8.2 (12C60)
Xcode : 4.5.2 (4G2008a)
Ruby lib dir : /usr/local/rvm/rubies/ruby-1.9.3-p194/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 60b51e341f727b7d715ed541ea9cb52f6e0cc819
```
### Podfile
```ruby
platform :ios, '6.0'
pod 'AFNetworking', '1.0'
```
### Error
```
invalid byte sequence in US-ASCII
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/local_pod.rb:540:in `glob'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/local_pod.rb:540:in `glob'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/local_pod.rb:540:in `block in expanded_paths'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/local_pod.rb:534:in `map'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/local_pod.rb:534:in `expanded_paths'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/local_pod.rb:327:in `readme_file'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/generator/documentation.rb:50:in `index_file'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/generator/documentation.rb:70:in `appledoc_options'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/generator/documentation.rb:81:in `generate'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:91:in `generate_docs'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:60:in `block (2 levels) in install_dependencies!'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/user_interface.rb:37:in `section'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:53:in `block in install_dependencies!'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:50:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:50:in `install_dependencies!'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:119:in `block in install!'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/user_interface.rb:37:in `section'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/installer.rb:118:in `install!'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/command/install.rb:51:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/lib/cocoapods/command.rb:75:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.15.2/bin/pod:16:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/pod:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/pod:19:in `<main>'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
```
Upd.:
➜ ~ gem install cocoapods
zsh: correct 'cocoapods' to '.cocoapods' [nyae]? n
Fetching: xcodeproj-0.4.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from extconf.rb:24:in `block in <main>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from extconf.rb:23:in `<main>'
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xcodeproj-0.4.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xcodeproj-0.4.0/ext/xcodeproj/gem_make.out
add export LC_ALL="en_US.UTF-8" to your ~/.zshrc or ~/.bashrc
https://github.com/CocoaPods/CocoaPods/issues/639
Opening a new terminal window was sufficient to solve the problem for me.
Some how my terminal instance/session got messed up. pod install would work in the new window but continue to fail in the old window.
The problem was in Ruby compiler, it was corrupted by some other app.
After reinstall everything worked fine.

jad and jar size do not match in j2me

I am using N97 and Nokia 5530 for my application. More often whenever I install my application. I find this error. I have searched the internet and found a number of ways to solve this problem. I did use them such as check size of jar and the one written in jad and corrected it but still problem is not solved.
How can I remove this error in my build. Any help in this regard is highly appreciated.
I have read the stuff--- Unification of .jar and .jad files in a J2ME application --- but today devices and internet are much faster. Can't we ignore the creation of jad file.
EDIT
Following are jad and manifest attributes. I am using NetBeans 6.9 and Nokia S60 5th Edition SDK to generate and build the MIDlet.
jad attributes are as follows
Backkey: -11
LGE-MIDlet-Height: 400
LGE-MIDlet-Target-LCD-Height: 400
LGE-MIDlet-Target-LCD-Width: 240
LGE-MIDlet-Width: 240
LeftSoftKey: -6
MIDlet-1: MyAppName,/icon.png,com.main.MainMidlet
MIDlet-Jar-Size: 964642
MIDlet-Jar-URL: MyAppName.jar
MIDlet-Name: MyAppName
MIDlet-Permissions: javax.microedition.io.Connector.http
MIDlet-Touch-Support: true
MIDlet-Vendor: www.MyApp.com
MIDlet-Version: 1.4
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
Navi-Key-Hidden: true
Nokia-MIDlet-App-Orientation: portrait
Nokia-MIDlet-On-Screen-Keypad: no
RightSoftKey: -7
UseNativeTextButton: true
and Manifest attributes are
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.0
Created-By: 1.6.0_21-b06 (Sun Microsystems Inc.)
MIDlet-1: MyAppName,/icon.png,com.main.MainMidlet
MIDlet-Permissions: javax.microedition.io.Connector.http
MIDlet-Vendor: www.MyApp.com
Nokia-MIDlet-App-Orientation: portrait
LGE-MIDlet-Height: 400
Nokia-MIDlet-On-Screen-Keypad: no
MIDlet-Name: MyAppName
Navi-Key-Hidden: true
MIDlet-Touch-Support: true
LGE-MIDlet-Width: 240
MIDlet-Version: 1.4
Backkey: -11
LeftSoftKey: -6
UseNativeTextButton: true
LGE-MIDlet-Target-LCD-Height: 400
RightSoftKey: -7
LGE-MIDlet-Target-LCD-Width: 240
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
The only thing I can think of is that I usually see MIDlet-Jar-Size in the manifest, not in the jad.
Unfortunately, I never figured out how the build system managed to insert it in a compressed file (jars are basically zip files) and I don't know how to tell Netbeans to move the property from the jad to the manifest.
I was under the impression that if you ask Netbeans to generate a simple HelloWorld MIDlet and don't modify the ant script, MIDlet-Jar-Size ends up in the manifest.
I do think there is a relation between the property and the MIDlet being signed. It may act as a checksum.

Problem Running Ant Script In Netbeans 6.1

I tried to import my ant script. And it successful. But when i compile it. I got this error:
run-selected-file-in-src:
java.io.FileNotFoundException: ..\sounds\voice.wav (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.media.sound.WaveFileReader.getAudioInputStream(WaveFileReader.java:205)
at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1162)
at SimpleSoundPlayer.<init>(SimpleSoundPlayer.java:35)
at SimpleSoundPlayer.main(SimpleSoundPlayer.java:12)
Exception in thread "main" java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
at SimpleSoundPlayer.main(SimpleSoundPlayer.java:16)
D:\Windows\My Document\Latihan\Java\allsrc\ch04src\nbproject\ide-file-targets.xml:7: Java returned: 1
BUILD FAILED (total time: 0 seconds)
This is my folder structure
root
+-build(all *.class store here)
+-images
+-nbproject(netbeans create it)
+-sounds(voice.wav where i want to load)
+-src(all *.java - When i compile. All *.class will store to "build" folder)
+-build.xml
My question is why the class file(SimpleSoundPlayer.class) didn't find "..\sounds\voice.wav". But when i tried it from command-line "java SimpleSoundPlayer" it fine.
Why this happen?
This happens because you use a relative path to load the file : ..\sounds\voice.wav. When you do this, your app is very fragile, because it must be launched from a specific directory to work correctly.
I suspect that NetBeans launches your app from the root folder instead of launching it from the src or build folder.
I would recommend to put the voice.wav in your sources, so that it's copied into the build directory, along with your class files. Then you may load the file using the classloader, thanks to a call to Class.getResourceAsStream().
I FIGURE IT OUT!!!
Special Thx to "JB Nizet". Because him i know why it didn't find the wav file. So i just search how to change the default location(this case in root) netbeans to compile(I want netbeans to compile from "build" folder).
The key is in nbproject/ide-file-target.xml
root
+-build(all *.class store here)
+-images
+-nbproject(netbeans create it)
+-sounds(voice.wav where i want to load)
+-src(all *.java - When i compile. All *.class will store to "build" folder)
+-build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="../build" name="chap04 - Sound Effects and Music-IDE">
<!-- TODO: edit the following target according to your needs -->
<!-- (more info: http://www.netbeans.org/kb/41/freeform-config.html#runsingle) -->
<target name="run-selected-file-in-src">
<fail unless="run.class">Must set property 'run.class'</fail>
<java classname="${run.class}" failonerror="true" fork="true">
<classpath>
<pathelement path="build"/>
<pathelement location="."/>
</classpath>
</java>
</target>
So i just change on <project basedir=".." to <project basediir="../build" where i want netbeans to compile. With this change netbeans will compile that file in "build" folder. AND... WOWWW... That file run correctly :D

Java command lastModified() not working in Clojure

I am trying to get the last modified time from a file in Clojure, by executing a Java command.
By using java.io.File.lastModified I am supposed to be able to get the UNIX-time, this does not work by execution of the script or in the REPL.
My code is:
(java.io.File.lastModified "/home/lol/lolness.txt")
and my error is:
java.lang.ClassNotFoundException: java.io.File.lastModified (NO_SOURCE_FILE:24)
(java.io.File.separator) works, however.
EDIT:
Clojure version 1.2.0-master-SNAPSHOT
Java version OpenJDK 1.6.0
lastModified is a method of java.io.File objects. To access it in Clojure, use the following syntax:
(.lastModified (java.io.File. "/home/lol/lolness.txt"))
Note that the namespaces clojure.contrib.java-utils (1.1) / clojure.java.io (bleeding edge) provide a function file which makes the creation of java.io.File objects more convenient. Since you're on the bleeding edge, the following should work for you:
(require '[clojure.java.io :as io])
(.lastModified (io/file "/home/lol/lolness.txt"))

Resources