Author Topic: Workspace Properties: How to set it up to get Execute to run a Java class?  (Read 457 times)

tinker123

  • Community Member
  • Posts: 98
  • Hero Points: 3
SlickEdit 2011 (v16.0.3.0 64-bit)
Linux Mint 21.1
Configuration Directory: /home/steve/.slickedit/16.0.3/

In Projects > Work Space Properties > Properties > Tools this is what I have for the Execute command:

https://i.paste.pics/270df73073120216e818be017ba057b4.png

How would I set the execute command up to find the *.class files in the classes directory on the same level as the Java source files?

tinker123

  • Community Member
  • Posts: 98
  • Hero Points: 3
Re: Workspace Properties: How to set it up to get Execute to run a Java class?
« Reply #1 on: February 10, 2023, 03:21:14 PM »
I figured it out for myself.

I wanted a directory where I could dump standalone Java classes where I could use Slicked edit to compile and run each file individually.

This is how I set it up.

1.  Create a Slickedit workspace
2.  Create a project & directory in that workspace directory.  Use the “Other” project type ( New > Project > Other )
3.  Set up the Workspace Properties > Properties "Compile" and "Execute" tabs

 //Compile - put all of the class files in a “classes” directory at the same level as the files
 javac  -d classes -deprecation "%f"


//Execute - run *.class files from the “classes” directory at the same level as the file
Command Line:  java "%n"
Run from dir:  %(CLASSPATH)

Set the CLASSPATH for *.nix operating systems in the .bashrc file to be:
   export CLASSPATH=".:./classes"


Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Workspace Properties: How to set it up to get Execute to run a Java class?
« Reply #2 on: February 10, 2023, 07:51:50 PM »
Newer releases of SlickEdit have single-file project support which makes this even easier, you don't have to create a project manually for each file.